Simbody  3.6
SimTK::ContactGeometry::TriangleMesh::OBBTreeNode Class Reference

This class represents a node in the Oriented Bounding Box Tree for a TriangleMesh. More...

Public Member Functions

 OBBTreeNode (const OBBTreeNodeImpl &impl)
 
const OrientedBoundingBoxgetBounds () const
 Get the OrientedBoundingBox which encloses all triangles in this node or its children. More...
 
bool isLeafNode () const
 Get whether this is a leaf node. More...
 
const OBBTreeNode getFirstChildNode () const
 Get the first child node. More...
 
const OBBTreeNode getSecondChildNode () const
 Get the second child node. More...
 
const Array_< int > & getTriangles () const
 Get the indices of all triangles contained in this node. More...
 
int getNumTriangles () const
 Get the number of triangles inside this node. More...
 

Detailed Description

This class represents a node in the Oriented Bounding Box Tree for a TriangleMesh.

Each node has an OrientedBoundingBox that fully encloses all triangles contained within it or its children. This is a binary tree: each non-leaf node has two children. Triangles are stored only in the leaf nodes.

Constructor & Destructor Documentation

◆ OBBTreeNode()

SimTK::ContactGeometry::TriangleMesh::OBBTreeNode::OBBTreeNode ( const OBBTreeNodeImpl &  impl)

Member Function Documentation

◆ getBounds()

const OrientedBoundingBox& SimTK::ContactGeometry::TriangleMesh::OBBTreeNode::getBounds ( ) const

Get the OrientedBoundingBox which encloses all triangles in this node or its children.

◆ isLeafNode()

bool SimTK::ContactGeometry::TriangleMesh::OBBTreeNode::isLeafNode ( ) const

Get whether this is a leaf node.

◆ getFirstChildNode()

const OBBTreeNode SimTK::ContactGeometry::TriangleMesh::OBBTreeNode::getFirstChildNode ( ) const

Get the first child node.

Calling this on a leaf node will produce an exception.

◆ getSecondChildNode()

const OBBTreeNode SimTK::ContactGeometry::TriangleMesh::OBBTreeNode::getSecondChildNode ( ) const

Get the second child node.

Calling this on a leaf node will produce an exception.

◆ getTriangles()

const Array_<int>& SimTK::ContactGeometry::TriangleMesh::OBBTreeNode::getTriangles ( ) const

Get the indices of all triangles contained in this node.

Calling this on a non-leaf node will produce an exception.

◆ getNumTriangles()

int SimTK::ContactGeometry::TriangleMesh::OBBTreeNode::getNumTriangles ( ) const

Get the number of triangles inside this node.

If this is not a leaf node, this is the total number of triangles contained by all children of this node.


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