Documentation for vtkPointLocator

vtkPointLocator - quickly locate points in 3-space

Super Class: vtkLocator

Description:

vtkPointLocator is a spatial search object to quickly locate points in 3D. vtkPointLocator works by dividing a specified region of space into a regular array of "rectangular" buckets, and then keeping a list of points that lie in each bucket. Typical operation involves giving a position in 3D and finding the closest point. vtkPointLocator has two distinct methods of interaction. In the first method, you suppy it with a dataset, and it operates on the points in the dataset. In the second method, you supply it with an array of points, and the object operates on the array.

 

Caveats:

Many other types of spatial locators have been developed such as octrees and kd-trees. These are often more efficient for the operations described here.

 

See Also:

vtkCellPicker vtkPointPicker

 

Methods:

void vtkPointLocator ()
void vtkPointLocator ()
static vtkPointLocator *New ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
void SetDivisions (int ,int ,int )
void SetDivisions (int *)
int *GetDivisions ()
void SetNumberOfPointsPerBucket (int )
int GetNumberOfPointsPerBucket ()
int FindClosestPoint (float )
int InitPointInsertion (vtkPoints * ,float )
int InitPointInsertion (vtkPoints * ,float ,int )
void InsertPoint (int ,float )
int InsertNextPoint (float )
int IsInsertedPoint (float )
int FindClosestInsertedPoint (float )
void Initialize ()
void FreeSearchStructure ()
void BuildLocator ()
void GenerateRepresentation (int ,vtkPolyData *)
void GetBucketNeighbors (int ,int ,int )
void GetOverlappingBuckets (float ,int ,float )
void GenerateFace (int ,int ,int ,int ,vtkPoints * ,vtkCellArray *)

 

Detailed Method Descriptions:

Construct with automatic computation of divisions, averaging 25 points per bucket.

void vtkPointLocator ()

Set the number of divisions in x-y-z directions.

void SetDivisions (int ,int ,int )
void SetDivisions (int *)
int *GetDivisions ()

Specify the average number of points in each bucket.

void SetNumberOfPointsPerBucket (int )
int GetNumberOfPointsPerBucket ()

Given a position x, return the id of the point closest to it.

int FindClosestPoint (float )

Initialize the point insertion process. The newPts is an object representing point coordinates into which incremental insertion methods place their data. Bounds are the box that the points lie in.

int InitPointInsertion (vtkPoints * ,float )
int InitPointInsertion (vtkPoints * ,float ,int )

Incrementally insert a point into search structure with a particular index value. You should use the method IsInsertedPoint() to see whether this point has already been inserted (that is, if you desire to prevent dulicate points). Before using this method you must make sure that newPts have been supplied, the bounds has been set properly, and that divs are properly set. (See InitPointInsertion().)

void InsertPoint (int ,float )

Incrementally insert a point into search structure. The method returns the insertion location (i.e., point id). You should use the method IsInsertedPoint() to see whether this point has already been inserted (that is, if you desire to prevent dulicate points). Before using this method you must make sure that newPts have been supplied, the bounds has been set properly, and that divs are properly set. (See InitPointInsertion().)

int InsertNextPoint (float )

Determine whether point given by x[3] has been inserted into points list. Return id of previously inserted point if this is true, otherwise return -1.

int IsInsertedPoint (float )

Given a position x, return the id of the point closest to it. This method is used when performing incremental point insertion.

int FindClosestInsertedPoint (float )

See vtkLocator interface documentation.

void Initialize ()
void FreeSearchStructure ()
void BuildLocator ()
void GenerateRepresentation (int ,vtkPolyData *)