#include <vtkLocator.h>
vtkLocator is an abstract base class for spatial search objects, or locators. The principle behind locators is that they divide 3-space into small pieces (or "buckets") that can be quickly found in response to queries like point location, line intersection, or object-object intersection.
The purpose of this base class is to provide ivars and methods shared by all locators. The GenerateRepresentation() is one such interesting method. This method works in conjunction with vtkLocatorFilter to create polygonal representations for the locator. For example, if the locator is an OBB tree (i.e., vtkOBBTree.h), then the representation is a set of one or more oriented bounding boxes, depending upon the specified level.
Locators typically work as follows. One or more "entities", such as points or cells, are inserted into the tree. These entities are associated with one or more buckets. Then, when performing geometric operations, the operations are performed first on the buckets, and then if the operation tests positive, then on the entities in the bucket. For example, during collision tests, the locators are collided first to identify intersecting buckets. If an intersection is found, more expensive operations are then carried out on the entities in the bucket.
To obtain good performance, locators are often organized in a tree structure. In such a structure, there are frequently multiple "levels" corresponding to different nodes in the tree. So the word level (in the context of the locator) can be used to specify a particular representation in the tree. For example, in an octree (which is a tree with 8 children), level 0 is the bounding box, or root octant, and level 1 consists of its eight children.
Definition at line 60 of file vtkLocator.h.
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
vtkLocator () | |
~vtkLocator () | |
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | Update () |
virtual void | Initialize () |
virtual void | BuildLocator ()=0 |
virtual void | FreeSearchStructure ()=0 |
virtual void | GenerateRepresentation (int level, vtkPolyData *pd)=0 |
virtual void | SetDataSet (vtkDataSet *) |
virtual vtkDataSet * | GetDataSet () |
virtual void | SetMaxLevel (int) |
virtual int | GetMaxLevel () |
virtual int | GetLevel () |
virtual void | SetAutomatic (int) |
virtual int | GetAutomatic () |
virtual void | AutomaticOn () |
virtual void | AutomaticOff () |
virtual void | SetTolerance (double) |
virtual double | GetTolerance () |
virtual unsigned long | GetBuildTime () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkLocator * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
virtual void | ReportReferences (vtkGarbageCollector *) |
Protected Attributes | |
vtkDataSet * | DataSet |
int | Automatic |
double | Tolerance |
int | MaxLevel |
int | Level |
vtkTimeStamp | BuildTime |
typedef vtkObject vtkLocator::Superclass |
Reimplemented from vtkObject.
Reimplemented in vtkAbstractCellLocator, vtkAbstractPointLocator, vtkCellLocator, vtkIncrementalOctreePointLocator, vtkIncrementalPointLocator, vtkKdTree, vtkKdTreePointLocator, vtkMergePoints, vtkNonMergingPointLocator, vtkOctreePointLocator, vtkPointLocator, vtkModifiedBSPTree, vtkOBBTree, and vtkPKdTree.
Definition at line 63 of file vtkLocator.h.
vtkLocator::vtkLocator | ( | ) | [protected] |
Handle the PointSet <-> Locator loop.
vtkLocator::~vtkLocator | ( | ) | [protected] |
Handle the PointSet <-> Locator loop.
virtual const char* vtkLocator::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkObject.
Reimplemented in vtkAbstractCellLocator, vtkAbstractPointLocator, vtkCellLocator, vtkIncrementalOctreePointLocator, vtkIncrementalPointLocator, vtkKdTree, vtkKdTreePointLocator, vtkMergePoints, vtkNonMergingPointLocator, vtkOctreePointLocator, vtkPointLocator, vtkModifiedBSPTree, vtkOBBTree, and vtkPKdTree.
static int vtkLocator::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkAbstractCellLocator, vtkAbstractPointLocator, vtkCellLocator, vtkIncrementalOctreePointLocator, vtkIncrementalPointLocator, vtkKdTree, vtkKdTreePointLocator, vtkMergePoints, vtkNonMergingPointLocator, vtkOctreePointLocator, vtkPointLocator, vtkModifiedBSPTree, vtkOBBTree, and vtkPKdTree.
virtual int vtkLocator::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkAbstractCellLocator, vtkAbstractPointLocator, vtkCellLocator, vtkIncrementalOctreePointLocator, vtkIncrementalPointLocator, vtkKdTree, vtkKdTreePointLocator, vtkMergePoints, vtkNonMergingPointLocator, vtkOctreePointLocator, vtkPointLocator, vtkModifiedBSPTree, vtkOBBTree, and vtkPKdTree.
static vtkLocator* vtkLocator::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkObject.
Reimplemented in vtkAbstractCellLocator, vtkAbstractPointLocator, vtkCellLocator, vtkIncrementalOctreePointLocator, vtkIncrementalPointLocator, vtkKdTree, vtkKdTreePointLocator, vtkMergePoints, vtkNonMergingPointLocator, vtkOctreePointLocator, vtkPointLocator, vtkModifiedBSPTree, vtkOBBTree, and vtkPKdTree.
void vtkLocator::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkObject.
Reimplemented in vtkAbstractCellLocator, vtkAbstractPointLocator, vtkCellLocator, vtkIncrementalOctreePointLocator, vtkIncrementalPointLocator, vtkKdTree, vtkKdTreePointLocator, vtkMergePoints, vtkNonMergingPointLocator, vtkOctreePointLocator, vtkPointLocator, vtkModifiedBSPTree, vtkOBBTree, and vtkPKdTree.
virtual void vtkLocator::SetDataSet | ( | vtkDataSet * | ) | [virtual] |
Build the locator from the points/cells defining this dataset.
Reimplemented in vtkKdTree.
virtual vtkDataSet* vtkLocator::GetDataSet | ( | ) | [virtual] |
Build the locator from the points/cells defining this dataset.
Reimplemented in vtkKdTree.
virtual void vtkLocator::SetMaxLevel | ( | int | ) | [virtual] |
Set the maximum allowable level for the tree. If the Automatic ivar is off, this will be the target depth of the locator. Initial value is 8.
virtual int vtkLocator::GetMaxLevel | ( | ) | [virtual] |
Set the maximum allowable level for the tree. If the Automatic ivar is off, this will be the target depth of the locator. Initial value is 8.
virtual int vtkLocator::GetLevel | ( | ) | [virtual] |
Get the level of the locator (determined automatically if Automatic is true). The value of this ivar may change each time the locator is built. Initial value is 8.
virtual void vtkLocator::SetAutomatic | ( | int | ) | [virtual] |
Boolean controls whether locator depth/resolution of locator is computed automatically from average number of entities in bucket. If not set, there will be an explicit method to control the construction of the locator (found in the subclass).
virtual int vtkLocator::GetAutomatic | ( | ) | [virtual] |
Boolean controls whether locator depth/resolution of locator is computed automatically from average number of entities in bucket. If not set, there will be an explicit method to control the construction of the locator (found in the subclass).
virtual void vtkLocator::AutomaticOn | ( | ) | [virtual] |
Boolean controls whether locator depth/resolution of locator is computed automatically from average number of entities in bucket. If not set, there will be an explicit method to control the construction of the locator (found in the subclass).
virtual void vtkLocator::AutomaticOff | ( | ) | [virtual] |
Boolean controls whether locator depth/resolution of locator is computed automatically from average number of entities in bucket. If not set, there will be an explicit method to control the construction of the locator (found in the subclass).
virtual void vtkLocator::SetTolerance | ( | double | ) | [virtual] |
Specify absolute tolerance (in world coordinates) for performing geometric operations.
virtual double vtkLocator::GetTolerance | ( | ) | [virtual] |
Specify absolute tolerance (in world coordinates) for performing geometric operations.
virtual void vtkLocator::Update | ( | ) | [virtual] |
Cause the locator to rebuild itself if it or its input dataset has changed.
virtual void vtkLocator::Initialize | ( | ) | [virtual] |
Initialize locator. Frees memory and resets object as appropriate.
Reimplemented in vtkIncrementalOctreePointLocator, vtkIncrementalPointLocator, and vtkPointLocator.
virtual void vtkLocator::BuildLocator | ( | ) | [pure virtual] |
Build the locator from the input dataset.
Implemented in vtkAbstractPointLocator, vtkCellLocator, vtkIncrementalOctreePointLocator, vtkKdTree, vtkKdTreePointLocator, vtkOctreePointLocator, vtkPointLocator, vtkModifiedBSPTree, vtkOBBTree, and vtkPKdTree.
virtual void vtkLocator::FreeSearchStructure | ( | ) | [pure virtual] |
Free the memory required for the spatial data structure.
Implemented in vtkAbstractPointLocator, vtkCellLocator, vtkIncrementalOctreePointLocator, vtkKdTree, vtkKdTreePointLocator, vtkOctreePointLocator, vtkPointLocator, vtkModifiedBSPTree, and vtkOBBTree.
virtual void vtkLocator::GenerateRepresentation | ( | int | level, | |
vtkPolyData * | pd | |||
) | [pure virtual] |
Method to build a representation at a particular level. Note that the method GetLevel() returns the maximum number of levels available for the tree. You must provide a vtkPolyData object into which to place the data.
Implemented in vtkAbstractPointLocator, vtkCellLocator, vtkIncrementalOctreePointLocator, vtkKdTree, vtkKdTreePointLocator, vtkOctreePointLocator, vtkPointLocator, vtkModifiedBSPTree, and vtkOBBTree.
virtual unsigned long vtkLocator::GetBuildTime | ( | ) | [virtual] |
Return the time of the last data structure build.
virtual void vtkLocator::Register | ( | vtkObjectBase * | o | ) | [virtual] |
Handle the PointSet <-> Locator loop.
Reimplemented from vtkObjectBase.
virtual void vtkLocator::UnRegister | ( | vtkObjectBase * | o | ) | [virtual] |
Handle the PointSet <-> Locator loop.
Reimplemented from vtkObjectBase.
virtual void vtkLocator::ReportReferences | ( | vtkGarbageCollector * | ) | [protected, virtual] |
vtkDataSet* vtkLocator::DataSet [protected] |
Definition at line 137 of file vtkLocator.h.
int vtkLocator::Automatic [protected] |
Definition at line 138 of file vtkLocator.h.
double vtkLocator::Tolerance [protected] |
Definition at line 139 of file vtkLocator.h.
int vtkLocator::MaxLevel [protected] |
Definition at line 140 of file vtkLocator.h.
int vtkLocator::Level [protected] |
Definition at line 141 of file vtkLocator.h.
vtkTimeStamp vtkLocator::BuildTime [protected] |
Definition at line 143 of file vtkLocator.h.