VTK
9.1.0
|
This class represents a single spatial region in an 3D axis aligned binary spatial partitioning. More...
#include <vtkKdNode.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
vtkKdNode * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. More... | |
virtual double | GetDivisionPosition () |
Get the location of the division plane along the axis the region is divided. More... | |
void | SetDataBounds (float *v) |
Given a pointer to NumberOfPoints points, set the DataBounds of this node to the bounds of these points. More... | |
double * | GetMinBounds () |
Get a pointer to the 3 bound minima (xmin, ymin and zmin) or the 3 bound maxima (xmax, ymax, zmax). More... | |
double * | GetMaxBounds () |
void | SetMinBounds (const double *mb) |
Set the xmin, ymin and zmin value of the bounds of this region. More... | |
void | SetMaxBounds (const double *mb) |
Set the xmax, ymax and zmax value of the bounds of this region. More... | |
double * | GetMinDataBounds () |
Get a pointer to the 3 data bound minima (xmin, ymin and zmin) or the 3 data bound maxima (xmax, ymax, zmax). More... | |
double * | GetMaxDataBounds () |
void | SetMinDataBounds (const double *mb) |
Set the xmin, ymin and zmin value of the bounds of this data within this region. More... | |
void | SetMaxDataBounds (const double *mb) |
Set the xmax, ymax and zmax value of the bounds of this data within this region. More... | |
void | AddChildNodes (vtkKdNode *left, vtkKdNode *right) |
Add the left and right children. More... | |
void | DeleteChildNodes () |
Delete the left and right children. More... | |
int | IntersectsBox (double x1, double x2, double y1, double y2, double z1, double z2, int useDataBounds) |
Return 1 if this spatial region intersects the axis-aligned box given by the bounds passed in. More... | |
int | IntersectsSphere2 (double x, double y, double z, double rSquared, int useDataBounds) |
Return 1 if this spatial region intersects a sphere described by it's center and the square of it's radius. More... | |
int | IntersectsRegion (vtkPlanesIntersection *pi, int useDataBounds) |
A vtkPlanesIntersection object represents a convex 3D region bounded by planes, and it is capable of computing intersections of boxes with itself. More... | |
int | IntersectsCell (vtkCell *cell, int useDataBounds, int cellRegion=-1, double *cellBounds=nullptr) |
Return 1 if the cell specified intersects this region. More... | |
int | ContainsBox (double x1, double x2, double y1, double y2, double z1, double z2, int useDataBounds) |
Return 1 if this spatial region entirely contains a box specified by it's bounds. More... | |
vtkTypeBool | ContainsPoint (double x, double y, double z, int useDataBounds) |
Return 1 if this spatial region entirely contains the given point. More... | |
double | GetDistance2ToBoundary (double x, double y, double z, int useDataBounds) |
Calculate the distance squared from any point to the boundary of this region. More... | |
double | GetDistance2ToBoundary (double x, double y, double z, double *boundaryPt, int useDataBounds) |
Calculate the distance squared from any point to the boundary of this region. More... | |
double | GetDistance2ToInnerBoundary (double x, double y, double z) |
Calculate the distance from the specified point (which is required to be inside this spatial region) to an interior boundary. More... | |
virtual void | SetDim (int) |
Set/Get the dimension along which this region is divided. More... | |
virtual int | GetDim () |
Set/Get the dimension along which this region is divided. More... | |
virtual void | SetNumberOfPoints (int) |
Set/Get the number of points contained in this region. More... | |
virtual int | GetNumberOfPoints () |
Set/Get the number of points contained in this region. More... | |
void | SetBounds (double x1, double x2, double y1, double y2, double z1, double z2) |
Set/Get the bounds of the spatial region represented by this node. More... | |
void | SetBounds (const double b[6]) |
Set/Get the bounds of the spatial region represented by this node. More... | |
void | GetBounds (double *b) const |
Set/Get the bounds of the spatial region represented by this node. More... | |
void | SetDataBounds (double x1, double x2, double y1, double y2, double z1, double z2) |
Set/Get the bounds of the points contained in this spatial region. More... | |
void | GetDataBounds (double *b) const |
Set/Get the bounds of the points contained in this spatial region. More... | |
virtual void | SetID (int) |
Set/Get the ID associated with the region described by this node. More... | |
virtual int | GetID () |
Set/Get the ID associated with the region described by this node. More... | |
virtual int | GetMinID () |
If this node is not a leaf node, there are leaf nodes below it whose regions represent a partitioning of this region. More... | |
virtual int | GetMaxID () |
If this node is not a leaf node, there are leaf nodes below it whose regions represent a partitioning of this region. More... | |
virtual void | SetMinID (int) |
If this node is not a leaf node, there are leaf nodes below it whose regions represent a partitioning of this region. More... | |
virtual void | SetMaxID (int) |
If this node is not a leaf node, there are leaf nodes below it whose regions represent a partitioning of this region. More... | |
virtual vtkKdNode * | GetLeft () |
Set/Get a pointer to the left child of this node. More... | |
void | SetLeft (vtkKdNode *left) |
Set/Get a pointer to the left child of this node. More... | |
virtual vtkKdNode * | GetRight () |
Set/Get a pointer to the right child of this node. More... | |
void | SetRight (vtkKdNode *right) |
Set/Get a pointer to the right child of this node. More... | |
virtual vtkKdNode * | GetUp () |
Set/Get a pointer to the parent of this node. More... | |
void | SetUp (vtkKdNode *up) |
Set/Get a pointer to the parent of this node. More... | |
void | PrintNode (int depth) |
For debugging purposes, print out this node. More... | |
void | PrintVerboseNode (int depth) |
For debugging purposes, print out this node. More... | |
Public Member Functions inherited from vtkObject | |
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... | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. More... | |
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) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
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) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
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) |
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, 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) |
This method invokes an event and return whether the event was aborted or not. More... | |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
Return the class name as a string. More... | |
virtual vtkTypeBool | IsA (const char *name) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
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). 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 | 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... | |
bool | GetIsInMemkind () const |
A local state flag that remembers whether this object lives in the normal or extended memory space. More... | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. More... | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. More... | |
Static Public Member Functions | |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkKdNode * | SafeDownCast (vtkObjectBase *o) |
static vtkKdNode * | New () |
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. More... | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. More... | |
static void | SetGlobalWarningDisplay (int val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static int | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
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. More... | |
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). More... | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
static void | SetMemkindDirectory (const char *directoryname) |
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. More... | |
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. More... | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkKdNode () | |
~vtkKdNode () 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. More... | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. More... | |
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 *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Additional Inherited Members | |
Static Protected Member Functions inherited from vtkObjectBase | |
static vtkMallocingFunction | GetCurrentMallocFunction () |
static vtkReallocingFunction | GetCurrentReallocFunction () |
static vtkFreeingFunction | GetCurrentFreeFunction () |
static vtkFreeingFunction | GetAlternateFreeFunction () |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
std::atomic< int32_t > | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
This class represents a single spatial region in an 3D axis aligned binary spatial partitioning.
It is assumed the region bounds some set of points. Regions are represented as nodes in a binary tree.
Definition at line 42 of file vtkKdNode.h.
typedef vtkObject vtkKdNode::Superclass |
Definition at line 45 of file vtkKdNode.h.
|
protected |
|
overrideprotected |
|
static |
|
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 vtkObjectBase.
|
static |
|
protectedvirtual |
vtkKdNode * vtkKdNode::NewInstance | ( | ) | const |
|
overridevirtual |
|
static |
|
virtual |
Set/Get the dimension along which this region is divided.
(0 - x, 1 - y, 2 - z, 3 - leaf node (default)).
|
virtual |
Set/Get the dimension along which this region is divided.
(0 - x, 1 - y, 2 - z, 3 - leaf node (default)).
|
virtual |
Get the location of the division plane along the axis the region is divided.
See also GetDim(). The result is undertermined if this node is not divided (a leaf node).
|
virtual |
Set/Get the number of points contained in this region.
|
virtual |
Set/Get the number of points contained in this region.
void vtkKdNode::SetBounds | ( | double | x1, |
double | x2, | ||
double | y1, | ||
double | y2, | ||
double | z1, | ||
double | z2 | ||
) |
Set/Get the bounds of the spatial region represented by this node.
Caller allocates storage for 6-vector in GetBounds.
|
inline |
Set/Get the bounds of the spatial region represented by this node.
Caller allocates storage for 6-vector in GetBounds.
Definition at line 80 of file vtkKdNode.h.
void vtkKdNode::GetBounds | ( | double * | b | ) | const |
Set/Get the bounds of the spatial region represented by this node.
Caller allocates storage for 6-vector in GetBounds.
void vtkKdNode::SetDataBounds | ( | double | x1, |
double | x2, | ||
double | y1, | ||
double | y2, | ||
double | z1, | ||
double | z2 | ||
) |
Set/Get the bounds of the points contained in this spatial region.
This may be smaller than the bounds of the region itself. Caller allocates storage for 6-vector in GetDataBounds.
void vtkKdNode::GetDataBounds | ( | double * | b | ) | const |
Set/Get the bounds of the points contained in this spatial region.
This may be smaller than the bounds of the region itself. Caller allocates storage for 6-vector in GetDataBounds.
void vtkKdNode::SetDataBounds | ( | float * | v | ) |
Given a pointer to NumberOfPoints points, set the DataBounds of this node to the bounds of these points.
|
inline |
Get a pointer to the 3 bound minima (xmin, ymin and zmin) or the 3 bound maxima (xmax, ymax, zmax).
Don't free this pointer.
Definition at line 104 of file vtkKdNode.h.
|
inline |
Definition at line 105 of file vtkKdNode.h.
void vtkKdNode::SetMinBounds | ( | const double * | mb | ) |
Set the xmin, ymin and zmin value of the bounds of this region.
void vtkKdNode::SetMaxBounds | ( | const double * | mb | ) |
Set the xmax, ymax and zmax value of the bounds of this region.
|
inline |
Get a pointer to the 3 data bound minima (xmin, ymin and zmin) or the 3 data bound maxima (xmax, ymax, zmax).
Don't free this pointer.
Definition at line 121 of file vtkKdNode.h.
|
inline |
Definition at line 122 of file vtkKdNode.h.
void vtkKdNode::SetMinDataBounds | ( | const double * | mb | ) |
Set the xmin, ymin and zmin value of the bounds of this data within this region.
void vtkKdNode::SetMaxDataBounds | ( | const double * | mb | ) |
Set the xmax, ymax and zmax value of the bounds of this data within this region.
|
virtual |
Set/Get the ID associated with the region described by this node.
If this is not a leaf node, this value should be -1.
|
virtual |
Set/Get the ID associated with the region described by this node.
If this is not a leaf node, this value should be -1.
|
virtual |
If this node is not a leaf node, there are leaf nodes below it whose regions represent a partitioning of this region.
The IDs of these leaf nodes form a contiguous set. Set/Get the range of the IDs of the leaf nodes below this node. If this is already a leaf node, these values should be the same as the ID.
|
virtual |
If this node is not a leaf node, there are leaf nodes below it whose regions represent a partitioning of this region.
The IDs of these leaf nodes form a contiguous set. Set/Get the range of the IDs of the leaf nodes below this node. If this is already a leaf node, these values should be the same as the ID.
|
virtual |
If this node is not a leaf node, there are leaf nodes below it whose regions represent a partitioning of this region.
The IDs of these leaf nodes form a contiguous set. Set/Get the range of the IDs of the leaf nodes below this node. If this is already a leaf node, these values should be the same as the ID.
|
virtual |
If this node is not a leaf node, there are leaf nodes below it whose regions represent a partitioning of this region.
The IDs of these leaf nodes form a contiguous set. Set/Get the range of the IDs of the leaf nodes below this node. If this is already a leaf node, these values should be the same as the ID.
Add the left and right children.
void vtkKdNode::DeleteChildNodes | ( | ) |
Delete the left and right children.
|
virtual |
Set/Get a pointer to the left child of this node.
void vtkKdNode::SetLeft | ( | vtkKdNode * | left | ) |
Set/Get a pointer to the left child of this node.
|
virtual |
Set/Get a pointer to the right child of this node.
void vtkKdNode::SetRight | ( | vtkKdNode * | right | ) |
Set/Get a pointer to the right child of this node.
|
virtual |
Set/Get a pointer to the parent of this node.
void vtkKdNode::SetUp | ( | vtkKdNode * | up | ) |
Set/Get a pointer to the parent of this node.
int vtkKdNode::IntersectsBox | ( | double | x1, |
double | x2, | ||
double | y1, | ||
double | y2, | ||
double | z1, | ||
double | z2, | ||
int | useDataBounds | ||
) |
Return 1 if this spatial region intersects the axis-aligned box given by the bounds passed in.
Use the possibly smaller bounds of the points within the region if useDataBounds is non-zero.
int vtkKdNode::IntersectsSphere2 | ( | double | x, |
double | y, | ||
double | z, | ||
double | rSquared, | ||
int | useDataBounds | ||
) |
Return 1 if this spatial region intersects a sphere described by it's center and the square of it's radius.
Use the possibly smaller bounds of the points within the region if useDataBounds is non-zero.
int vtkKdNode::IntersectsRegion | ( | vtkPlanesIntersection * | pi, |
int | useDataBounds | ||
) |
A vtkPlanesIntersection object represents a convex 3D region bounded by planes, and it is capable of computing intersections of boxes with itself.
Return 1 if this spatial region intersects the spatial region described by the vtkPlanesIntersection object. Use the possibly smaller bounds of the points within the region if useDataBounds is non-zero.
int vtkKdNode::IntersectsCell | ( | vtkCell * | cell, |
int | useDataBounds, | ||
int | cellRegion = -1 , |
||
double * | cellBounds = nullptr |
||
) |
Return 1 if the cell specified intersects this region.
If you already know the ID of the region containing the cell's centroid, provide that as an argument. If you already know the bounds of the cell, provide that as well, in the form of xmin,xmax,ymin,ymax,zmin, zmax. Either of these may speed the calculation. Use the possibly smaller bounds of the points within the region if useDataBounds is non-zero.
int vtkKdNode::ContainsBox | ( | double | x1, |
double | x2, | ||
double | y1, | ||
double | y2, | ||
double | z1, | ||
double | z2, | ||
int | useDataBounds | ||
) |
Return 1 if this spatial region entirely contains a box specified by it's bounds.
Use the possibly smaller bounds of the points within the region if useDataBounds is non-zero.
vtkTypeBool vtkKdNode::ContainsPoint | ( | double | x, |
double | y, | ||
double | z, | ||
int | useDataBounds | ||
) |
Return 1 if this spatial region entirely contains the given point.
Use the possibly smaller bounds of the points within the region if useDataBounds is non-zero.
double vtkKdNode::GetDistance2ToBoundary | ( | double | x, |
double | y, | ||
double | z, | ||
int | useDataBounds | ||
) |
Calculate the distance squared from any point to the boundary of this region.
Use the boundary of the points within the region if useDataBounds is non-zero.
double vtkKdNode::GetDistance2ToBoundary | ( | double | x, |
double | y, | ||
double | z, | ||
double * | boundaryPt, | ||
int | useDataBounds | ||
) |
Calculate the distance squared from any point to the boundary of this region.
Use the boundary of the points within the region if useDataBounds is non-zero. Set boundaryPt to the point on the boundary.
double vtkKdNode::GetDistance2ToInnerBoundary | ( | double | x, |
double | y, | ||
double | z | ||
) |
Calculate the distance from the specified point (which is required to be inside this spatial region) to an interior boundary.
An interior boundary is one that is not also an boundary of the entire space partitioned by the tree of vtkKdNode's.
void vtkKdNode::PrintNode | ( | int | depth | ) |
For debugging purposes, print out this node.
void vtkKdNode::PrintVerboseNode | ( | int | depth | ) |
For debugging purposes, print out this node.