![]() |
Jolt Physics
A multi core friendly Game Physics Engine
|
A node in the tree, contains the AABox for the tree and any child nodes or triangles. More...
#include <AABBTreeBuilder.h>
Public Member Functions | |
| JPH_OVERRIDE_NEW_DELETE | Node () |
| Constructor. | |
| ~Node () | |
| uint | GetTriangleCount () const |
| Get number of triangles in this node. | |
| bool | HasChildren () const |
| Check if this node has any children. | |
| uint | GetMinDepth () const |
| Min depth of tree. | |
| uint | GetMaxDepth () const |
| Max depth of tree. | |
| uint | GetNodeCount () const |
| Number of nodes in tree. | |
| uint | GetLeafNodeCount () const |
| Number of leaf nodes in tree. | |
| uint | GetTriangleCountInTree () const |
| Get triangle count in tree. | |
| void | GetTriangleCountPerNode (float &outAverage, uint &outMin, uint &outMax) const |
| Calculate min and max triangles per node. | |
| float | CalculateSAHCost (float inCostTraversal, float inCostLeaf) const |
| Calculate the total cost of the tree using the surface area heuristic. | |
| void | GetNChildren (uint inN, Array< const Node * > &outChildren) const |
| Recursively get children (breadth first) to get in total inN children (or less if there are no more) | |
Public Member Functions inherited from NonCopyable | |
| NonCopyable ()=default | |
| NonCopyable (const NonCopyable &)=delete | |
| void | operator= (const NonCopyable &)=delete |
Public Attributes | |
| AABox | mBounds |
| Bounding box. | |
| IndexedTriangleList | mTriangles |
| Triangles (if no child nodes) | |
| Node * | mChild [2] |
| Child nodes (if no triangles) | |
Friends | |
| class | AABBTreeBuilder |
A node in the tree, contains the AABox for the tree and any child nodes or triangles.
| JPH_NAMESPACE_BEGIN AABBTreeBuilder::Node::Node | ( | ) |
Constructor.
| AABBTreeBuilder::Node::~Node | ( | ) |
Calculate the total cost of the tree using the surface area heuristic.
| uint AABBTreeBuilder::Node::GetLeafNodeCount | ( | ) | const |
Number of leaf nodes in tree.
| uint AABBTreeBuilder::Node::GetMaxDepth | ( | ) | const |
Max depth of tree.
| uint AABBTreeBuilder::Node::GetMinDepth | ( | ) | const |
Min depth of tree.
Recursively get children (breadth first) to get in total inN children (or less if there are no more)
| uint AABBTreeBuilder::Node::GetNodeCount | ( | ) | const |
Number of nodes in tree.
|
inline |
Get number of triangles in this node.
| uint AABBTreeBuilder::Node::GetTriangleCountInTree | ( | ) | const |
Get triangle count in tree.
| void AABBTreeBuilder::Node::GetTriangleCountPerNode | ( | float & | outAverage, |
| uint & | outMin, | ||
| uint & | outMax ) const |
Calculate min and max triangles per node.
|
inline |
Check if this node has any children.
|
friend |
| AABox AABBTreeBuilder::Node::mBounds |
Bounding box.
| Node* AABBTreeBuilder::Node::mChild[2] |
Child nodes (if no triangles)
| IndexedTriangleList AABBTreeBuilder::Node::mTriangles |
Triangles (if no child nodes)