VTK
9.4.20241121
|
abstract base class for objects that accelerate spatial searches More...
#include <vtkLocator.h>
Public Member Functions | |
virtual void | Update () |
Cause the locator to rebuild itself if it or its input dataset has changed. | |
virtual void | Initialize () |
Initialize locator. | |
virtual void | BuildLocator ()=0 |
Build the locator from the input dataset. | |
virtual void | ForceBuildLocator () |
Build the locator from the input dataset (even if UseExistingSearchStructure is on). | |
virtual void | FreeSearchStructure ()=0 |
Free the memory required for the spatial data structure. | |
virtual void | GenerateRepresentation (int level, vtkPolyData *pd)=0 |
Method to build a representation at a particular level. | |
virtual void | SetDataSet (vtkDataSet *) |
Build the locator from the points/cells defining this dataset. | |
virtual vtkDataSet * | GetDataSet () |
Build the locator from the points/cells defining this dataset. | |
virtual void | SetMaxLevel (int) |
Set the maximum allowable level for the tree. | |
virtual int | GetMaxLevel () |
Set the maximum allowable level for the tree. | |
virtual int | GetLevel () |
Get the level of the locator (determined automatically if Automatic is true). | |
virtual void | SetAutomatic (vtkTypeBool) |
Boolean controls whether locator depth/resolution of locator is computed automatically from average number of entities in bucket. | |
virtual vtkTypeBool | GetAutomatic () |
Boolean controls whether locator depth/resolution of locator is computed automatically from average number of entities in bucket. | |
virtual void | AutomaticOn () |
Boolean controls whether locator depth/resolution of locator is computed automatically from average number of entities in bucket. | |
virtual void | AutomaticOff () |
Boolean controls whether locator depth/resolution of locator is computed automatically from average number of entities in bucket. | |
virtual void | SetTolerance (double) |
Specify absolute tolerance (in world coordinates) for performing geometric operations. | |
virtual double | GetTolerance () |
Specify absolute tolerance (in world coordinates) for performing geometric operations. | |
virtual void | SetUseExistingSearchStructure (vtkTypeBool) |
Get/Set UseExistingSearchStructure, which when enabled it allows the locator to NOT be built again. | |
virtual vtkTypeBool | GetUseExistingSearchStructure () |
Get/Set UseExistingSearchStructure, which when enabled it allows the locator to NOT be built again. | |
virtual void | UseExistingSearchStructureOn () |
Get/Set UseExistingSearchStructure, which when enabled it allows the locator to NOT be built again. | |
virtual void | UseExistingSearchStructureOff () |
Get/Set UseExistingSearchStructure, which when enabled it allows the locator to NOT be built again. | |
virtual vtkMTimeType | GetBuildTime () |
Return the time of the last data structure build. | |
bool | UsesGarbageCollector () const override |
Handle the PointSet <-> Locator loop. | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. | |
virtual void | DebugOff () |
Turn debugging output off. | |
bool | GetDebug () |
Get the value of the debug flag. | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. | |
virtual void | Modified () |
Update the modification time for this object. | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
vtkTypeBool | HasObserver (unsigned long event) |
vtkTypeBool | HasObserver (const char *event) |
vtkTypeBool | InvokeEvent (unsigned long event) |
vtkTypeBool | InvokeEvent (const char *event) |
std::string | GetObjectDescription () const override |
The object description printed in messages and PrintSelf output. | |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Allow user to set the AbortFlagOn() with the return value of the callback method. | |
vtkTypeBool | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
vtkTypeBool | InvokeEvent (const char *event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
virtual void | SetObjectName (const std::string &objectName) |
Set/get the name of this object for reporting purposes. | |
virtual std::string | GetObjectName () const |
Set/get the name of this object for reporting purposes. | |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
Return the class name as a string. | |
virtual std::string | GetObjectDescription () const |
The object description printed in messages and PrintSelf output. | |
virtual vtkTypeBool | IsA (const char *name) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name) |
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
virtual void | Delete () |
Delete a VTK object. | |
virtual void | FastDelete () |
Delete a reference to this object. | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. | |
void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). | |
int | GetReferenceCount () |
Return the current reference count of this object. | |
void | SetReferenceCount (int) |
Sets the reference count. | |
bool | GetIsInMemkind () const |
A local state flag that remembers whether this object lives in the normal or extended memory space. | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
Protected Member Functions | |
vtkLocator () | |
~vtkLocator () override | |
virtual void | BuildLocatorInternal () |
This function is not pure virtual to maintain backwards compatibility. | |
void | ReportReferences (vtkGarbageCollector *) override |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr) |
These methods allow a command to exclusively grab all events. | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. | |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | ReportReferences (vtkGarbageCollector *) |
virtual void | ObjectFinalize () |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
vtkDataSet * | DataSet |
vtkTypeBool | UseExistingSearchStructure |
vtkTypeBool | Automatic |
double | Tolerance |
int | MaxLevel |
int | Level |
vtkTimeStamp | BuildTime |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
std::string | ObjectName |
Protected Attributes inherited from vtkObjectBase | |
std::atomic< int32_t > | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
typedef vtkObject | Superclass |
Standard type and print methods. | |
static vtkTypeBool | IsTypeOf (const char *type) |
Standard type and print methods. | |
static vtkLocator * | SafeDownCast (vtkObjectBase *o) |
Standard type and print methods. | |
virtual vtkTypeBool | IsA (const char *type) |
Standard type and print methods. | |
vtkLocator * | NewInstance () const |
Standard type and print methods. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Standard type and print methods. | |
virtual vtkObjectBase * | NewInstanceInternal () const |
Standard type and print methods. | |
Additional Inherited Members | |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. | |
static void | SetGlobalWarningDisplay (vtkTypeBool val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static vtkTypeBool | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
Static Public Member Functions inherited from vtkObjectBase | |
static vtkTypeBool | IsTypeOf (const char *name) |
Return 1 if this class type is the same type of (or a subclass of) the named class. | |
static vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name) |
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | SetMemkindDirectory (const char *directoryname) |
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. | |
static bool | GetUsingMemkind () |
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. | |
Static Protected Member Functions inherited from vtkObjectBase | |
static vtkMallocingFunction | GetCurrentMallocFunction () |
static vtkReallocingFunction | GetCurrentReallocFunction () |
static vtkFreeingFunction | GetCurrentFreeFunction () |
static vtkFreeingFunction | GetAlternateFreeFunction () |
abstract base class for objects that accelerate spatial searches
vtkLocator is an abstract base class for spatial search objects, or locators. The principle behind locators is that they divide 3-space into small regions (or "buckets") that can be quickly found in response to queries about point location, line intersection, or object-object intersection.
The purpose of this base class is to provide data members 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 locator structure. 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 77 of file vtkLocator.h.
typedef vtkObject vtkLocator::Superclass |
Standard type and print methods.
Definition at line 84 of file vtkLocator.h.
|
protected |
|
overrideprotected |
|
static |
Standard type and print methods.
|
virtual |
Standard type and print methods.
Reimplemented from vtkObjectBase.
Reimplemented in vtkAbstractCellLocator, vtkAbstractPointLocator, vtkCellLocator, vtkCellTreeLocator, vtkIncrementalOctreePointLocator, vtkIncrementalPointLocator, vtkKdTree, vtkKdTreePointLocator, vtkMergePoints, vtkNonMergingPointLocator, vtkOctreePointLocator, vtkPointLocator, vtkStaticCellLocator, vtkStaticPointLocator, vtkStaticPointLocator2D, vtkLinearTransformCellLocator, vtkModifiedBSPTree, vtkOBBTree, vtkPKdTree, and vtkSMPMergePoints.
|
static |
Standard type and print methods.
|
protectedvirtual |
Standard type and print methods.
Reimplemented in vtkAbstractCellLocator, vtkAbstractPointLocator, vtkCellLocator, vtkCellTreeLocator, vtkIncrementalOctreePointLocator, vtkIncrementalPointLocator, vtkKdTree, vtkKdTreePointLocator, vtkMergePoints, vtkNonMergingPointLocator, vtkOctreePointLocator, vtkPointLocator, vtkStaticCellLocator, vtkStaticPointLocator, vtkStaticPointLocator2D, vtkLinearTransformCellLocator, vtkModifiedBSPTree, vtkOBBTree, vtkPKdTree, and vtkSMPMergePoints.
vtkLocator * vtkLocator::NewInstance | ( | ) | const |
Standard type and print methods.
|
overridevirtual |
Standard type and print methods.
Reimplemented from vtkObjectBase.
Reimplemented in vtkMergePoints, vtkNonMergingPointLocator, vtkOctreePointLocator, vtkPointLocator, vtkStaticCellLocator, vtkStaticPointLocator, vtkStaticPointLocator2D, vtkModifiedBSPTree, vtkOBBTree, vtkPKdTree, and vtkSMPMergePoints.
|
virtual |
Build the locator from the points/cells defining this dataset.
Reimplemented in vtkKdTree.
|
virtual |
Build the locator from the points/cells defining this dataset.
Reimplemented in vtkKdTree.
|
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Specify absolute tolerance (in world coordinates) for performing geometric operations.
|
virtual |
Specify absolute tolerance (in world coordinates) for performing geometric operations.
|
virtual |
Get/Set UseExistingSearchStructure, which when enabled it allows the locator to NOT be built again.
This is useful when you have a dataset that either changes because the FieldData (PointData/CellData) changed or the actual dataset object changed but it's actually the same geometry (useful when a dataset has timesteps).
When this flag is on you need to use ForceBuildLocator() to rebuild the locator, if your dataset changes.
Default is off.
|
virtual |
Get/Set UseExistingSearchStructure, which when enabled it allows the locator to NOT be built again.
This is useful when you have a dataset that either changes because the FieldData (PointData/CellData) changed or the actual dataset object changed but it's actually the same geometry (useful when a dataset has timesteps).
When this flag is on you need to use ForceBuildLocator() to rebuild the locator, if your dataset changes.
Default is off.
|
virtual |
Get/Set UseExistingSearchStructure, which when enabled it allows the locator to NOT be built again.
This is useful when you have a dataset that either changes because the FieldData (PointData/CellData) changed or the actual dataset object changed but it's actually the same geometry (useful when a dataset has timesteps).
When this flag is on you need to use ForceBuildLocator() to rebuild the locator, if your dataset changes.
Default is off.
|
virtual |
Get/Set UseExistingSearchStructure, which when enabled it allows the locator to NOT be built again.
This is useful when you have a dataset that either changes because the FieldData (PointData/CellData) changed or the actual dataset object changed but it's actually the same geometry (useful when a dataset has timesteps).
When this flag is on you need to use ForceBuildLocator() to rebuild the locator, if your dataset changes.
Default is off.
|
virtual |
Cause the locator to rebuild itself if it or its input dataset has changed.
|
virtual |
Initialize locator.
Frees memory and resets object as appropriate.
Reimplemented in vtkIncrementalOctreePointLocator, vtkPointLocator, vtkStaticPointLocator, and vtkStaticPointLocator2D.
|
pure virtual |
Build the locator from the input dataset.
This will NOT do anything if UseExistingSearchStructure is on.
Implemented in vtkCellLocator, vtkCellTreeLocator, vtkIncrementalOctreePointLocator, vtkKdTree, vtkKdTreePointLocator, vtkOctreePointLocator, vtkPointLocator, vtkStaticCellLocator, vtkStaticPointLocator, vtkStaticPointLocator2D, vtkLinearTransformCellLocator, vtkModifiedBSPTree, vtkOBBTree, and vtkPKdTree.
|
inlinevirtual |
Build the locator from the input dataset (even if UseExistingSearchStructure is on).
This function is not pure virtual to maintain backwards compatibility.
Reimplemented in vtkCellLocator, vtkCellTreeLocator, vtkIncrementalOctreePointLocator, vtkKdTree, vtkKdTreePointLocator, vtkOctreePointLocator, vtkPointLocator, vtkStaticCellLocator, vtkStaticPointLocator, vtkStaticPointLocator2D, vtkLinearTransformCellLocator, vtkModifiedBSPTree, and vtkOBBTree.
Definition at line 175 of file vtkLocator.h.
|
pure virtual |
Free the memory required for the spatial data structure.
Implemented in vtkCellLocator, vtkCellTreeLocator, vtkIncrementalOctreePointLocator, vtkKdTree, vtkKdTreePointLocator, vtkOctreePointLocator, vtkPointLocator, vtkStaticCellLocator, vtkStaticPointLocator, vtkStaticPointLocator2D, vtkLinearTransformCellLocator, vtkModifiedBSPTree, and vtkOBBTree.
|
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 vtkCellLocator, vtkCellTreeLocator, vtkKdTree, vtkKdTreePointLocator, vtkOctreePointLocator, vtkPointLocator, vtkStaticCellLocator, vtkStaticPointLocator, vtkStaticPointLocator2D, vtkLinearTransformCellLocator, vtkModifiedBSPTree, vtkOBBTree, and vtkIncrementalOctreePointLocator.
|
virtual |
Return the time of the last data structure build.
|
inlineoverridevirtual |
Handle the PointSet <-> Locator loop.
Reimplemented from vtkObjectBase.
Definition at line 201 of file vtkLocator.h.
|
inlineprotectedvirtual |
This function is not pure virtual to maintain backwards compatibility.
Reimplemented in vtkCellLocator, vtkCellTreeLocator, vtkKdTree, vtkKdTreePointLocator, vtkOctreePointLocator, vtkPointLocator, vtkStaticCellLocator, vtkStaticPointLocator, vtkStaticPointLocator2D, vtkLinearTransformCellLocator, vtkModifiedBSPTree, and vtkOBBTree.
Definition at line 211 of file vtkLocator.h.
|
overrideprotectedvirtual |
Reimplemented from vtkObjectBase.
|
protected |
Definition at line 213 of file vtkLocator.h.
|
protected |
Definition at line 214 of file vtkLocator.h.
|
protected |
Definition at line 215 of file vtkLocator.h.
|
protected |
Definition at line 216 of file vtkLocator.h.
|
protected |
Definition at line 217 of file vtkLocator.h.
|
protected |
Definition at line 218 of file vtkLocator.h.
|
protected |
Definition at line 220 of file vtkLocator.h.