|
VTK
9.6.1
|
generate oriented bounding box (OBB) tree More...
#include <vtkOBBTree.h>
generate oriented bounding box (OBB) tree
vtkOBBTree is an object to generate oriented bounding box (OBB) trees. An oriented bounding box is a bounding box that does not necessarily line up along coordinate axes. The OBB tree is a hierarchical tree structure of such boxes, where deeper levels of OBB confine smaller regions of space.
To build the OBB, a recursive, top-down process is used. First, the root OBB is constructed by finding the mean and covariance matrix of the cells (and their points) that define the dataset. The eigenvectors of the covariance matrix are extracted, giving a set of three orthogonal vectors that define the tightest-fitting OBB. To create the two children OBB's, a split plane is found that (approximately) divides the number cells in half. These are then assigned to the children OBB's. This process then continues until the MaxLevel ivar limits the recursion, or no split plane can be found.
A good reference for OBB-trees is Gottschalk & Manocha in Proceedings of Siggraph `96.
vtkOBBTree does NOT utilize the following parameters:
For export macro
class vtkMatrix4x4;
Special class defines node for the OBB tree class VTKFILTERSGENERAL_EXPORT vtkOBBNode { //;prevent man page generation public: vtkOBBNode(); ~vtkOBBNode();
double Corner[3]; // center point of this node double Axes[3][3]; // the axes defining the OBB - ordered from long->short vtkOBBNode* Parent; // parent node; nullptr if root vtkOBBNode** Kids; // two children of this node; nullptr if leaf vtkIdList* Cells; // list of cells in node void DebugPrintTree(int level, double* leaf_vol, int* minCells, int* maxCells);
private: vtkOBBNode(const vtkOBBNode& other) = delete; vtkOBBNode& operator=(const vtkOBBNode& rhs) = delete; };
class VTKFILTERSGENERAL_EXPORT vtkOBBTree : public vtkAbstractCellLocator { public: / /** Standard methods to print and obtain type-related information.