39 #ifndef vtkPointLocator_h 40 #define vtkPointLocator_h 42 #include "vtkCommonDataModelModule.h" 47 class vtkNeighborPoints;
71 vtkSetVector3Macro(Divisions,
int);
72 vtkGetVectorMacro(Divisions,
int, 3);
79 vtkSetClampMacro(NumberOfPointsPerBucket,
int, 1,
VTK_INT_MAX);
80 vtkGetMacro(NumberOfPointsPerBucket,
int);
104 double radius,
const double x[3],
double inputDataLength,
double& dist2);
201 virtual void FindDistributedPoints(
int N,
const double x[3],
vtkIdList* result,
int M);
202 virtual void FindDistributedPoints(
int N,
double x,
double y,
double z,
vtkIdList* result,
int M);
219 virtual vtkIdList* GetPointsInBucket(
const double x[3],
int ijk[3]);
244 void GetBucketNeighbors(
245 vtkNeighborPoints* buckets,
const int ijk[3],
const int ndivs[3],
int level);
246 void GetOverlappingBuckets(
247 vtkNeighborPoints* buckets,
const double x[3],
const int ijk[3],
double dist,
int level);
248 void GetOverlappingBuckets(vtkNeighborPoints* buckets,
const double x[3],
double dist,
249 int prevMinLevel[3],
int prevMaxLevel[3]);
251 double Distance2ToBucket(
const double x[3],
const int nei[3]);
252 double Distance2ToBounds(
const double x[3],
const double bounds[6]);
266 double FX, FY,
FZ, BX, BY, BZ;
276 ijk[0] = tmp0 < 0 ? 0 : (tmp0 >= this->XD ? this->XD - 1 : tmp0);
277 ijk[1] = tmp1 < 0 ? 0 : (tmp1 >= this->YD ? this->YD - 1 : tmp1);
278 ijk[2] = tmp2 < 0 ? 0 : (tmp2 >= this->ZD ? this->ZD - 1 : tmp2);
284 this->GetBucketIndices(x, ijk);
285 return ijk[0] + ijk[1] * this->XD + ijk[2] * this->SliceSize;
288 void ComputePerformanceFactors();
int NumberOfPointsPerBucket
vtkIdType IsInsertedPoint(double x, double y, double z) override
Determine whether point given by x[3] has been inserted into points list.
virtual void BuildLocator()=0
Build the locator from the input dataset.
virtual vtkIdType FindClosestPointWithinRadius(double radius, const double x[3], double &dist2)=0
Given a position x and a radius r, return the id of the point closest to the point in that radius...
quickly locate points in 3-space
virtual int InsertUniquePoint(const double x[3], vtkIdType &ptId)=0
Insert a point unless there has been a duplicate in the search structure.
vtkIdType InsertionPointId
virtual vtkIdType IsInsertedPoint(double x, double y, double z)=0
Determine whether or not a given point has been inserted.
vtkIdType GetBucketIndex(const double *x) const
Abstract class in support of both point location and point insertion.
concrete dataset represents vertices, lines, polygons, and triangle strips
virtual void FreeSearchStructure()=0
Free the memory required for the spatial data structure.
void GetBucketIndices(const double *x, int ijk[3]) const
virtual int InitPointInsertion(vtkPoints *newPts, const double bounds[6])=0
Initialize the point insertion process.
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
Find all points within a specified radius R of position x.
virtual void FindClosestNPoints(int N, const double x[3], vtkIdList *result)=0
Find the closest N points to a position.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
object to represent cell connectivity
virtual vtkIdType InsertNextPoint(const double x[3])=0
Insert a given point and return the point index.
virtual vtkIdType FindClosestInsertedPoint(const double x[3])=0
Given a point x assumed to be covered by the search structure, return the index of the closest point ...
virtual vtkIdType FindClosestPoint(const double x[3])=0
Given a position x, return the id of the point closest to it.
virtual void Initialize()
Initialize locator.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual void InsertPoint(vtkIdType ptId, const double x[3])=0
Insert a given point with a specified point index ptId.
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
Method to build a representation at a particular level.
represent and manipulate 3D points