Go to the documentation of this file.
59 #ifndef vtkStaticPointLocator2D_h
60 #define vtkStaticPointLocator2D_h
62 #include "vtkCommonDataModelModule.h"
66 struct vtkBucketList2D;
93 vtkGetMacro(NumberOfPointsPerBucket,
int);
103 vtkSetVector2Macro(Divisions,
int);
104 vtkGetVectorMacro(Divisions,
int,2);
132 double radius,
const double x[3],
double& dist2)
override;
134 double inputDataLength,
167 double lineX[3],
double ptX[3],
vtkIdType &ptId);
248 bounds[0] = this->Bounds[0];
249 bounds[1] = this->Bounds[1];
250 bounds[2] = this->Bounds[2];
251 bounds[3] = this->Bounds[3];
void FindClosestNPoints(int N, const double x[3], vtkIdList *result) override
Find the closest N points to a position.
void MergePoints(double tol, vtkIdType *mergeMap)
Merge points in the locator given a tolerance.
virtual void GetSpacing(double spacing[3])
vtkIdType FindClosestPoint(const double x[3]) override
Given a position x, return the id of the point closest to it.
vtkBucketList2D * Buckets
vtkIdType MaxNumberOfBuckets
virtual vtkIdType FindClosestPointWithinRadius(double radius, const double x[3], double inputDataLength, double &dist2)
virtual double * GetSpacing()
Provide an accessor to the bucket spacing.
virtual double * GetBounds()
Provide an accessor to the bounds.
vtkStaticPointLocator2D()
int NumberOfPointsPerBucket
void BuildLocator() override
Build the locator from the input dataset.
~vtkStaticPointLocator2D() override
void GenerateRepresentation(int level, vtkPolyData *pd) override
Populate a polydata with the faces of the bins that potentially contain cells.
quickly locate points in 2-space
void GetBucketIds(vtkIdType bNum, vtkIdList *bList)
Given a bucket number bNum between 0 <= bNum < this->GetNumberOfBuckets(), return a list of point ids...
vtkIdType GetNumberOfPointsInBucket(vtkIdType bNum)
Given a bucket number bNum between 0 <= bNum < this->GetNumberOfBuckets(), return the number of point...
void GetBucketIndices(const double *x, int ij[2]) const
Given a point x[3], return the locator index (i,j) which contains the point.
static vtkStaticPointLocator2D * New()
Construct with automatic computation of divisions, averaging 5 points per bucket.
virtual void FindPointsWithinRadius(double R, const double x[3], vtkIdList *result)=0
Find all points within a specified radius R of position x.
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 within that radius...
a simple class to control print indentation
list of point or cell ids
void GetBounds(double *bounds) override
Provide an accessor to the bounds.
void FreeSearchStructure() override
Free the memory required for the spatial data structure.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void FindClosestNPoints(int N, const double x[3], vtkIdList *result)=0
Find the closest N points to a position.
int IntersectWithLine(double a0[3], double a1[3], double tol, double &t, double lineX[3], double ptX[3], vtkIdType &ptId)
Intersect the points contained in the locator with the line defined by (a0,a1).
double FindCloseNBoundedPoints(int N, const double x[3], vtkIdList *result)
Special method for 2D operations (e.g., vtkVoronoi2D).
concrete dataset represents vertices, lines, polygons, and triangle strips
abstract class to quickly locate points in 3-space
void Initialize() override
See vtkLocator and vtkAbstractPointLocator interface documentation.
virtual vtkIdType FindClosestPoint(const double x[3])=0
Given a position x, return the id of the point closest to it.
bool GetLargeIds()
Inform the user as to whether large ids are being used.
void FindPointsWithinRadius(double R, const double x[3], vtkIdList *result) override
Find all points within a specified radius R of position x.
vtkIdType GetBucketIndex(const double *x) const