VTK  9.5.2
vtkOBBTree Class Reference

generate oriented bounding box (OBB) tree More...

#include <vtkOBBTree.h>

Detailed Description

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.

Warning
vtkOBBTree utilizes the following parent class parameters:
  • Tolerance (default 0.01)
  • Level (default 4)
  • MaxLevel (default 12)
  • NumberOfCellsPerNode (default 32)
  • RetainCellLists (default true)
  • UseExistingSearchStructure (default false)

vtkOBBTree does NOT utilize the following parameters:

  • Automatic
  • CacheCellBounds
Warning
Since this algorithms works from a list of cells, the OBB tree will only bound the "geometry" attached to the cells if the convex hull of the cells bounds the geometry.
Long, skinny cells (i.e., cells with poor aspect ratio) may cause unsatisfactory results. This is due to the fact that this is a top-down implementation of the OBB tree, requiring that one or more complete cells are contained in each OBB. This requirement makes it hard to find good split planes during the recursion process. A bottom-up implementation would go a long way to correcting this problem.
See also
vtkAbstractCellLocator vtkCellLocator vtkStaticCellLocator vtkCellTreeLocator vtkModifiedBSPTree
Tests:
vtkOBBTree (Tests) */

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.


The documentation for this class was generated from the following file: