Octree node constituting incremental octree (in support of both point location and point insertion)
More...
|
virtual vtkTypeBool | IsA (const char *type) |
| Return 1 if this class is the same type of (or a subclass of) the named class. More...
|
|
vtkIncrementalOctreeNode * | NewInstance () const |
|
void | PrintSelf (ostream &os, vtkIndent indent) override |
| Methods invoked by print to print information about the object including superclasses. More...
|
|
virtual int | GetNumberOfPoints () |
| Get the number of points inside or under this node. More...
|
|
virtual vtkIdList * | GetPointIdSet () |
| Get the list of point indices, nullptr for a non-leaf node. More...
|
|
void | DeleteChildNodes () |
| Delete the eight child nodes. More...
|
|
void | SetBounds (double x1, double x2, double y1, double y2, double z1, double z2) |
| Set the spatial bounding box of the node. More...
|
|
void | GetBounds (double bounds[6]) const |
| Get the spatial bounding box of the node. More...
|
|
virtual double * | GetMinBounds () |
| Get access to MinBounds. More...
|
|
virtual void | GetMinBounds (double &, double &, double &) |
|
virtual void | GetMinBounds (double[3]) |
|
virtual double * | GetMaxBounds () |
| Get access to MaxBounds. More...
|
|
virtual void | GetMaxBounds (double &, double &, double &) |
|
virtual void | GetMaxBounds (double[3]) |
|
double * | GetMinDataBounds () |
| Get access to MinDataBounds. More...
|
|
double * | GetMaxDataBounds () |
| Get access to MaxDataBounds. More...
|
|
int | IsLeaf () |
| Determine whether or not this node is a leaf. More...
|
|
int | GetChildIndex (const double point[3]) |
| Determine which specific child / octant contains a given point. More...
|
|
vtkIncrementalOctreeNode * | GetChild (int i) |
| Get quick access to a child of this node. More...
|
|
vtkTypeBool | ContainsPoint (const double pnt[3]) |
| A point is in a node if and only if MinBounds[i] < p[i] <= MaxBounds[i], which allows a node to be divided into eight non-overlapping children. More...
|
|
vtkTypeBool | ContainsPointByData (const double pnt[3]) |
| A point is in a node, in terms of data, if and only if MinDataBounds[i] <= p[i] <= MaxDataBounds[i]. More...
|
|
int | InsertPoint (vtkPoints *points, const double newPnt[3], int maxPts, vtkIdType *pntId, int ptMode) |
| This function is called after a successful point-insertion check and only applies to a leaf node. More...
|
|
double | GetDistance2ToInnerBoundary (const double point[3], vtkIncrementalOctreeNode *rootNode) |
| Given a point inside this node, get the minimum squared distance to all inner boundaries. More...
|
|
double | GetDistance2ToBoundary (const double point[3], vtkIncrementalOctreeNode *rootNode, int checkData) |
| Compute the minimum squared distance from a point to this node, with all six boundaries considered. More...
|
|
double | GetDistance2ToBoundary (const double point[3], double closest[3], vtkIncrementalOctreeNode *rootNode, int checkData) |
| Compute the minimum squared distance from a point to this node, with all six boundaries considered. More...
|
|
void | ExportAllPointIdsByInsertion (vtkIdList *idList) |
| Export all the indices of the points (contained in or under this node) by inserting them to an allocated vtkIdList via vtkIdList::InsertNextId(). More...
|
|
void | ExportAllPointIdsByDirectSet (vtkIdType *pntIdx, vtkIdList *idList) |
| Export all the indices of the points (contained in or under this node) by directly setting them in an allocated vtkIdList object. More...
|
|
| vtkBaseTypeMacro (vtkObject, vtkObjectBase) |
|
virtual void | DebugOn () |
| Turn debugging output on. More...
|
|
virtual void | DebugOff () |
| Turn debugging output off. More...
|
|
bool | GetDebug () |
| Get the value of the debug flag. More...
|
|
void | SetDebug (bool debugFlag) |
| Set the value of the debug flag. More...
|
|
virtual void | Modified () |
| Update the modification time for this object. More...
|
|
virtual vtkMTimeType | GetMTime () |
| Return this object's modified time. More...
|
|
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
|
vtkCommand * | GetCommand (unsigned long tag) |
|
void | RemoveObserver (vtkCommand *) |
|
void | RemoveObservers (unsigned long event, vtkCommand *) |
|
void | RemoveObservers (const char *event, vtkCommand *) |
|
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
|
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
|
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) |
|
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. More...
|
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
|
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. More...
|
|
int | InvokeEvent (unsigned long event, void *callData) |
| This method invokes an event and return whether the event was aborted or not. More...
|
|
int | InvokeEvent (const char *event, void *callData) |
|
int | InvokeEvent (unsigned long event) |
|
int | InvokeEvent (const char *event) |
|
const char * | GetClassName () const |
| Return the class name as a string. More...
|
|
virtual void | Delete () |
| Delete a VTK object. More...
|
|
virtual void | FastDelete () |
| Delete a reference to this object. More...
|
|
void | InitializeObjectBase () |
|
void | Print (ostream &os) |
| Print an object to an ostream. More...
|
|
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
|
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
|
virtual void | Register (vtkObjectBase *o) |
| Increase the reference count (mark as used by another object). More...
|
|
virtual void | UnRegister (vtkObjectBase *o) |
| Decrease the reference count (release by another object). More...
|
|
int | GetReferenceCount () |
| Return the current reference count of this object. More...
|
|
void | SetReferenceCount (int) |
| Sets the reference count. More...
|
|
void | PrintRevisions (ostream &) |
| Legacy. More...
|
|
Octree node constituting incremental octree (in support of both point location and point insertion)
Octree nodes serve as spatial sub-division primitives to build the search structure of an incremental octree in a recursive top-down manner. The hierarchy takes the form of a tree-like representation by which a parent node contains eight mutually non-overlapping child nodes. Each child is assigned with an axis-aligned rectangular volume (Spatial Bounding Box) and the eight children together cover exactly the same region as governed by their parent. The eight child nodes / octants are ordered as
{ (xBBoxMin, xBBoxMid] & (yBBoxMin, yBBoxMid] & (zBBoxMin, zBBoxMid] }, { (xBBoxMid, xBBoxMax] & (yBBoxMin, yBBoxMid] & (zBBoxMin, zBBoxMid] }, { (xBBoxMin, xBBoxMid] & (yBBoxMid, yBBoxMax] & (zBBoxMin, zBBoxMid] }, { (xBBoxMid, xBBoxMax] & (yBBoxMid, yBBoxMax] & (zBBoxMin, zBBoxMid] }, { (xBBoxMin, xBBoxMid] & (yBBoxMin, yBBoxMid] & (zBBoxMid, zBBoxMax] }, { (xBBoxMid, xBBoxMax] & (yBBoxMin, yBBoxMid] & (zBBoxMid, zBBoxMax] }, { (xBBoxMin, xBBoxMid] & (yBBoxMid, yBBoxMax] & (zBBoxMid, zBBoxMax] }, { (xBBoxMid, xBBoxMax] & (yBBoxMid, yBBoxMax] & (zBBoxMid, zBBoxMax] },
where { xrange & yRange & zRange } defines the region of each 3D octant. In addition, the points falling within and registered, by means of point indices, in the parent node are distributed to the child nodes for delegated maintenance. In fact, only leaf nodes, i.e., those without any descendants, actually store point indices while each node, regardless of a leaf or non- leaf node, keeps a dynamically updated Data Bounding Box of the inhabitant points, if any. Given a maximum number of points per leaf node, an octree is initialized with an empty leaf node that is then recursively sub-divided, but only on demand as points are incrementally inserted, to construct a populated tree.
Please note that this octree node class is able to handle a large number of EXACTLY duplicate points that is greater than the specified maximum number of points per leaf node. In other words, as an exception, a leaf node may maintain an arbitrary number of exactly duplicate points to deal with possible extreme cases.
- See also
- vtkIncrementalOctreePointLocator
Definition at line 68 of file vtkIncrementalOctreeNode.h.