Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Common/vtkPointLocator2D.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00057 #ifndef __vtkPointLocator2D_h
00058 #define __vtkPointLocator2D_h
00059
00060 #include "vtkLocator.h"
00061
00062 class vtkCellArray;
00063 class vtkIdList;
00064 class vtkNeighborPoints2D;
00065 class vtkPoints;
00066
00067 class VTK_COMMON_EXPORT vtkPointLocator2D : public vtkLocator
00068 {
00069 public:
00072 static vtkPointLocator2D *New();
00073
00074 vtkTypeRevisionMacro(vtkPointLocator2D,vtkLocator);
00075 void PrintSelf(ostream& os, vtkIndent indent);
00076
00078
00079 vtkSetVector2Macro(Divisions,int);
00080 vtkGetVectorMacro(Divisions,int,2);
00082
00084
00085 vtkSetClampMacro(NumberOfPointsPerBucket,int,1,VTK_LARGE_INTEGER);
00086 vtkGetMacro(NumberOfPointsPerBucket,int);
00088
00090 virtual int FindClosestPoint(float x[2]);
00091
00095 virtual int IsInsertedPoint(float x[2]);
00096
00098
00102 virtual void FindClosestNPoints(int N, float x[2], vtkIdList *result);
00103 virtual void FindClosestNPoints(int N, float x, float y,
00104 vtkIdList *result);
00106
00108
00111 virtual void FindDistributedPoints(int N, float x[2],
00112 vtkIdList *result, int M);
00113 virtual void FindDistributedPoints(int N, float x, float y,
00114 vtkIdList *result, int M);
00116
00118
00120 virtual void FindPointsWithinRadius(float R, float x[2], vtkIdList *result);
00121 virtual void FindPointsWithinRadius(float R, float x, float y,
00122 vtkIdList *result);
00123
00124
00125 void Initialize();
00126 void FreeSearchStructure();
00127 void BuildLocator();
00128 void GenerateRepresentation(int level, vtkPolyData *pd);
00130
00132
00133 virtual void SetPoints(vtkPoints*);
00134 vtkGetObjectMacro(Points,vtkPoints);
00136
00137 protected:
00138 vtkPointLocator2D();
00139 ~vtkPointLocator2D();
00140
00141
00142 void GetBucketNeighbors(int ijk[2], int ndivs[2], int level);
00143 void GetOverlappingBuckets(float x[2], int ijk[2], float dist, int level);
00144 void GenerateFace(int face, int i, int j, int k,
00145 vtkPoints *pts, vtkCellArray *polys);
00146
00147 vtkPoints *Points;
00148 int Divisions[2];
00149 int NumberOfPointsPerBucket;
00150 float Bounds[4];
00151 vtkIdList **HashTable;
00152 int NumberOfBuckets;
00153 float H[2];
00154 vtkNeighborPoints2D *Buckets;
00155 float InsertionTol2;
00156 private:
00157 vtkPointLocator2D(const vtkPointLocator2D&);
00158 void operator=(const vtkPointLocator2D&);
00159 };
00160
00161 #endif
00162
00163