NAME
vtkCellLocator - octree-based spatial search object to quickly locate cells
SYNOPSIS
#include "/opt/vtk-c++/graphics/vtkCellLocator.h"
class VTK_EXPORT vtkCellLocator : public vtkLocator
vtkCellLocator();
static vtkCellLocator *New() {return new vtkCellLocator;};
const char *GetClassName() {return "vtkCellLocator";};
void PrintSelf(ostream& os, vtkIndent indent);
void SetNumberOfCellsPerBucket(int);
int GetNumberOfCellsPerBucket();
virtual int IntersectWithLine(float a0[3], float a1[3], float tol,
float& t, float x[3], float pcoords[3],
int &subId);
virtual vtkIdList *GetCells(int bucket);
virtual void InitializeIntersection(vtkCellLocator& locator);
virtual int GetNextIntersection(int& bucket1, int& bucket2);
void FreeSearchStructure();
void BuildLocator();
void GenerateRepresentation(int level, vtkPolyData *pd);
DESCRIPTION
vtkCellLocator is a spatial search object to quickly locate cells in 3D. vtkCellLocator uses a uniform-level octree subdivision, where each octant (an octant is also referred to as a bucket) carries an indication of whether it is empty or not, and each leaf octant carries a list of the cells inside of it. (An octant is not empty if it has one or more cells inside of it.) Typical operations are intersection with a line to return candidate cells, or intersection with another vtkCellLocator to return candidate cells.
CAVEATS
Many other types of spatial locators have been developed, such as variable depth octrees and kd-trees. These are often more efficient for the operations described here. vtkCellLocator has been designed for subclassing; so these locators can be derived if necessary.
SEE ALSO
vtkLocator vtkPointLocator vtkOBBTree
SUMMARY
void SetNumberOfCellsPerBucket(int)
Specify the average number of cells in each octant.
vtkCellLocator()
Construct with automatic computation of divisions, averaging 25 cells per bucket.
int IntersectWithLine(float a0[3], float a1[3], float tol, float& t, float x[3], float
void InitializeIntersection(vtkCellLocator& )
Intersect against another vtkCellLocator returning cells that lie in intersecting octants. Not implimented yet.