vtkOBBTree - generate oriented bounding box (OBB) tree
Super Class: vtkCellLocator
Description:
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.
Caveats:
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 recurion process. A bottom-up implementation would go a long way to correcting this problem.
See Also:
Methods:
void vtkOBBTree () | |
void vtkOBBTree () | |
const char *GetClassName () | |
static vtkOBBTree *New () | |
void ComputeOBB (vtkPoints * ,float ,float ,float ,float ,float ) | |
int IntersectWithLine (float ,float ,float & ,float ,float ,int &) | |
void FreeSearchStructure () | |
void BuildLocator () | |
void GenerateRepresentation (int ,vtkPolyData *) | |
void BuildTree (vtkIdList * ,vtkOBBNode * ,int ) | |
void DeleteTree (vtkOBBNode *) | |
void GeneratePolygons (vtkOBBNode * ,int ,int ,vtkPoints * ,vtkCellArray *) |
Detailed Method Descriptions:
static vtkOBBTree *New () |
void ComputeOBB (vtkPoints * ,float ,float ,float ,float ,float ) |
int IntersectWithLine (float ,float ,float & ,float ,float ,int &) |
void FreeSearchStructure () | |
void BuildLocator () |
void GenerateRepresentation (int ,vtkPolyData *) |