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
00056 #ifndef __vtkPointLocator2D_h
00057 #define __vtkPointLocator2D_h
00058
00059 #include "vtkLocator.h"
00060
00061 class vtkCellArray;
00062 class vtkIdList;
00063 class vtkNeighborPoints2D;
00064 class vtkPoints;
00065
00066 class VTK_COMMON_EXPORT vtkPointLocator2D : public vtkLocator
00067 {
00068 public:
00071 static vtkPointLocator2D *New();
00072
00073 vtkTypeRevisionMacro(vtkPointLocator2D,vtkLocator);
00074 void PrintSelf(ostream& os, vtkIndent indent);
00075
00077
00078 vtkSetVector2Macro(Divisions,int);
00079 vtkGetVectorMacro(Divisions,int,2);
00081
00083
00084 vtkSetClampMacro(NumberOfPointsPerBucket,int,1,VTK_LARGE_INTEGER);
00085 vtkGetMacro(NumberOfPointsPerBucket,int);
00087
00089 virtual int FindClosestPoint(float x[2]);
00090
00094 virtual int IsInsertedPoint(float x[2]);
00095
00097
00101 virtual void FindClosestNPoints(int N, float x[2], vtkIdList *result);
00102 virtual void FindClosestNPoints(int N, float x, float y,
00103 vtkIdList *result);
00105
00107
00110 virtual void FindDistributedPoints(int N, float x[2],
00111 vtkIdList *result, int M);
00112 virtual void FindDistributedPoints(int N, float x, float y,
00113 vtkIdList *result, int M);
00115
00117
00119 virtual void FindPointsWithinRadius(float R, float x[2], vtkIdList *result);
00120 virtual void FindPointsWithinRadius(float R, float x, float y,
00121 vtkIdList *result);
00122
00123
00124 void Initialize();
00125 void FreeSearchStructure();
00126 void BuildLocator();
00127 void GenerateRepresentation(int level, vtkPolyData *pd);
00129
00131
00132 virtual void SetPoints(vtkPoints*);
00133 vtkGetObjectMacro(Points,vtkPoints);
00135
00136 protected:
00137 vtkPointLocator2D();
00138 ~vtkPointLocator2D();
00139
00140
00141 void GetBucketNeighbors(int ijk[2], int ndivs[2], int level);
00142 void GetOverlappingBuckets(float x[2], int ijk[2], float dist, int level);
00143 void GenerateFace(int face, int i, int j, int k,
00144 vtkPoints *pts, vtkCellArray *polys);
00145
00146 vtkPoints *Points;
00147 int Divisions[2];
00148 int NumberOfPointsPerBucket;
00149 float Bounds[4];
00150 vtkIdList **HashTable;
00151 int NumberOfBuckets;
00152 float H[2];
00153 vtkNeighborPoints2D *Buckets;
00154 float InsertionTol2;
00155 private:
00156 vtkPointLocator2D(const vtkPointLocator2D&);
00157 void operator=(const vtkPointLocator2D&);
00158 };
00159
00160 #endif
00161
00162