Go to the documentation of this file.
42 #ifndef vtkPointLocator_h
43 #define vtkPointLocator_h
45 #include "vtkCommonDataModelModule.h"
50 class vtkNeighborPoints;
74 vtkSetVector3Macro(Divisions,
int);
75 vtkGetVectorMacro(Divisions,
int,3);
83 vtkGetMacro(NumberOfPointsPerBucket,
int);
106 double radius,
const double x[3],
double& dist2)
override;
108 double radius,
const double x[3],
109 double inputDataLength,
double& dist2);
119 const double bounds[6])
override;
162 xyz[0] = x; xyz[1] = y; xyz[2] = z;
254 const int ijk[3],
const int ndivs[3],
int level);
256 const double x[3],
const int ijk[3],
double dist,
259 const double x[3],
double dist,
261 int prevMaxLevel[3]);
279 double FX, FY,
FZ, BX, BY, BZ;
289 ijk[0] = tmp0 < 0 ? 0 : (tmp0 >= this->XD ? this->XD-1 : tmp0);
290 ijk[1] = tmp1 < 0 ? 0 : (tmp1 >= this->YD ? this->YD-1 : tmp1);
291 ijk[2] = tmp2 < 0 ? 0 : (tmp2 >= this->ZD ? this->ZD-1 : tmp2);
297 this->GetBucketIndices(x, ijk);
298 return ijk[0] + ijk[1]*this->XD + ijk[2]*this->SliceSize;
represent and manipulate 3D points
vtkIdType InsertionPointId
void InsertPoint(vtkIdType ptId, const double x[3]) override
Incrementally insert a point into search structure with a particular index value.
virtual vtkIdType IsInsertedPoint(double x, double y, double z)=0
Determine whether or not a given point has been inserted.
void GenerateFace(int face, int i, int j, int k, vtkPoints *pts, vtkCellArray *polys)
vtkIdType GetBucketIndex(const double *x) const
int InitPointInsertion(vtkPoints *newPts, const double bounds[6]) override
Initialize the point insertion process.
vtkIdType FindClosestPointWithinRadius(double radius, const double x[3], double &dist2) override
Given a position x and a radius r, return the id of the point closest to the point in that radius.
void BuildLocator() override
Build the locator from the input dataset.
quickly locate points in 3-space
virtual void FindDistributedPoints(int N, double x, double y, double z, vtkIdList *result, int M)
void GetOverlappingBuckets(vtkNeighborPoints *buckets, const double x[3], const int ijk[3], double dist, int level)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType FindClosestInsertedPoint(const double x[3]) override
Given a position x, return the id of the point closest to it.
virtual vtkIdList * GetPointsInBucket(const double x[3], int ijk[3])
Given a position x, return the list of points in the bucket that contains the point.
void FreeSearchStructure() override
Free the memory required for the spatial data structure.
void GetBucketNeighbors(vtkNeighborPoints *buckets, const int ijk[3], const int ndivs[3], int level)
int NumberOfPointsPerBucket
void ComputePerformanceFactors()
void FindPointsWithinRadius(double R, const double x[3], vtkIdList *result) override
Find all points within a specified radius R of position x.
virtual void FindDistributedPoints(int N, const double x[3], vtkIdList *result, int M)
Find the closest points to a position such that each octant of space around the position contains at ...
int InsertUniquePoint(const double x[3], vtkIdType &ptId) override
Determine whether point given by x[3] has been inserted into points list.
a simple class to control print indentation
object to represent cell connectivity
Abstract class in support of both point location and point insertion.
list of point or cell ids
void GetBucketIndices(const double *x, int ijk[3]) const
int InitPointInsertion(vtkPoints *newPts, const double bounds[6], vtkIdType estSize) override
Initialize the point insertion process.
void GenerateRepresentation(int level, vtkPolyData *pd) override
Method to build a representation at a particular level.
~vtkPointLocator() override
static vtkPointLocator * New()
Construct with automatic computation of divisions, averaging 25 points per bucket.
vtkIdType IsInsertedPoint(double x, double y, double z) override
Determine whether point given by x[3] has been inserted into points list.
void Initialize() override
See vtkLocator interface documentation.
vtkIdType IsInsertedPoint(const double x[3]) override
Determine whether or not a given point has been inserted.
vtkIdType InsertNextPoint(const double x[3]) override
Incrementally insert a point into search structure.
concrete dataset represents vertices, lines, polygons, and triangle strips
vtkIdType FindClosestPoint(const double x[3]) override
Given a position x, return the id of the point closest to it.
void FindClosestNPoints(int N, const double x[3], vtkIdList *result) override
Find the closest N points to a position.
virtual vtkIdType FindClosestPoint(const double x[3])=0
Given a position x, return the id of the point closest to it.
double Distance2ToBucket(const double x[3], const int nei[3])
void GetOverlappingBuckets(vtkNeighborPoints *buckets, const double x[3], double dist, int prevMinLevel[3], int prevMaxLevel[3])
double Distance2ToBounds(const double x[3], const double bounds[6])
virtual vtkIdType FindClosestPointWithinRadius(double radius, const double x[3], double inputDataLength, double &dist2)