41 #ifndef vtkPointLocator_h
42 #define vtkPointLocator_h
49 class vtkNeighborPoints;
67 vtkSetVector3Macro(Divisions,
int);
68 vtkGetVectorMacro(Divisions,
int,3);
73 vtkSetClampMacro(NumberOfPointsPerBucket,
int,1,
VTK_INT_MAX);
74 vtkGetMacro(NumberOfPointsPerBucket,
int);
92 double radius,
const double x[3],
double& dist2);
94 double radius,
const double x[3],
double inputDataLength,
double& dist2);
137 xyz[0] = x; xyz[1] = y; xyz[2] = z;
173 virtual void FindDistributedPoints(
int N,
const double x[3],
175 virtual void FindDistributedPoints(
int N,
double x,
double y,
192 virtual vtkIdList *GetPointsInBucket(
const double x[3],
int ijk[3]);
213 void GetBucketNeighbors(vtkNeighborPoints* buckets,
214 const int ijk[3],
const int ndivs[3],
int level);
215 void GetOverlappingBuckets(vtkNeighborPoints* buckets,
216 const double x[3],
const int ijk[3],
double dist,
218 void GetOverlappingBuckets(vtkNeighborPoints* buckets,
219 const double x[3],
double dist,
221 int prevMaxLevel[3]);
222 void GenerateFace(
int face,
int i,
int j,
int k,
224 double Distance2ToBucket(
const double x[3],
const int nei[3]);
225 double Distance2ToBounds(
const double x[3],
const double bounds[6]);
239 double FX, FY,
FZ, BX, BY, BZ;
245 ijk[0] =
static_cast<int>(((x[0] - this->BX) * this->FX));
246 ijk[1] =
static_cast<int>(((x[1] - this->BY) * this->FY));
247 ijk[2] =
static_cast<int>(((x[2] - this->BZ) * this->FZ));
249 ijk[0] = (ijk[0] < 0 ? 0 : (ijk[0] >= XD ? XD-1 : ijk[0]));
250 ijk[1] = (ijk[1] < 0 ? 0 : (ijk[1] >= YD ? YD-1 : ijk[1]));
251 ijk[2] = (ijk[2] < 0 ? 0 : (ijk[2] >= ZD ? ZD-1 : ijk[2]));
257 this->GetBucketIndices(x, ijk);
258 return ijk[0] + ijk[1]*this->XD + ijk[2]*this->SliceSize;
261 void ComputePerformanceFactors();
int NumberOfPointsPerBucket
vtkIdType GetBucketIndex(const double *x) const
void GetBucketIndices(const double *x, int ijk[3]) const
virtual void FreeSearchStructure()=0
virtual void Initialize()=0
virtual vtkIdType FindClosestPointWithinRadius(double radius, const double x[3], double &dist2)=0
quickly locate points in 3-space
virtual int InsertUniquePoint(const double x[3], vtkIdType &ptId)=0
vtkIdType InsertionPointId
virtual vtkIdType IsInsertedPoint(double x, double y, double z)=0
vtkIdType IsInsertedPoint(double x, double y, double z)
Abstract class in support of both point location and point insertion.
void PrintSelf(ostream &os, vtkIndent indent)
concrete dataset represents vertices, lines, polygons, and triangle strips
virtual int InitPointInsertion(vtkPoints *newPts, const double bounds[6])=0
a simple class to control print indentation
list of point or cell ids
virtual void FindPointsWithinRadius(double R, const double x[3], vtkIdList *result)=0
virtual void FindClosestNPoints(int N, const double x[3], vtkIdList *result)=0
object to represent cell connectivity
virtual vtkIdType InsertNextPoint(const double x[3])=0
virtual vtkIdType FindClosestInsertedPoint(const double x[3])=0
virtual vtkIdType FindClosestPoint(const double x[3])=0
virtual void BuildLocator()=0
virtual void InsertPoint(vtkIdType ptId, const double x[3])=0
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points