52        inline bool         HasChildren()
 const                     { 
return mChild[0] != 
nullptr || mChild[1] != 
nullptr; }
 
   55        uint                GetMinDepth() 
const;
 
   58        uint                GetMaxDepth() 
const;
 
   61        uint                GetNodeCount() 
const;
 
   64        uint                GetLeafNodeCount() 
const;
 
   67        uint                GetTriangleCountInTree() 
const;
 
   70        void                GetTriangleCountPerNode(
float &outAverage, 
uint &outMin, 
uint &outMax) 
const;
 
   73        float               CalculateSAHCost(
float inCostTraversal, 
float inCostLeaf) 
const;
 
   91        float               CalculateSAHCostInternal(
float inCostTraversalDivSurfaceArea, 
float inCostLeafDivSurfaceArea) 
const;
 
   94        void                GetTriangleCountPerNodeInternal(
float &outAverage, 
uint &outAverageDivisor, 
uint &outMin, 
uint &outMax) 
const;
 
  107    const uint              mMaxTrianglesPerLeaf;
 
#define JPH_EXPORT
Definition: Core.h:236
 
unsigned int uint
Definition: Core.h:452
 
#define JPH_NAMESPACE_END
Definition: Core.h:378
 
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
 
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition: Memory.h:31
 
A node in the tree, contains the AABox for the tree and any child nodes or triangles.
Definition: AABBTreeBuilder.h:40
 
AABox mBounds
Bounding box.
Definition: AABBTreeBuilder.h:79
 
IndexedTriangleList mTriangles
Triangles (if no child nodes)
Definition: AABBTreeBuilder.h:82
 
uint GetTriangleCount() const
Get number of triangles in this node.
Definition: AABBTreeBuilder.h:49
 
bool HasChildren() const
Check if this node has any children.
Definition: AABBTreeBuilder.h:52
 
Helper class to build an AABB tree.
Definition: AABBTreeBuilder.h:36
 
Axis aligned box.
Definition: AABox.h:16
 
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition: NonCopyable.h:11
 
A class that splits a triangle list into two parts for building a tree.
Definition: TriangleSplitter.h:14
 
Definition: AABBTreeBuilder.h:14
 
int mTreeMinTrianglesPerLeaf
Minimal amount of triangles in a leaf.
Definition: AABBTreeBuilder.h:29
 
float mSAHCost
Surface Area Heuristic cost of this tree.
Definition: AABBTreeBuilder.h:19
 
int mMaxTrianglesPerLeaf
Configured max triangles per leaf.
Definition: AABBTreeBuilder.h:26
 
int mMaxDepth
Maximum depth of tree (number of nodes)
Definition: AABBTreeBuilder.h:21
 
int mLeafNodeCount
Number of leaf nodes (that contain triangles)
Definition: AABBTreeBuilder.h:23
 
float mTreeAvgTrianglesPerLeaf
Average amount of triangles in leaf nodes.
Definition: AABBTreeBuilder.h:31
 
int mMinDepth
Minimal depth of tree (number of nodes)
Definition: AABBTreeBuilder.h:20
 
TriangleSplitter::Stats mSplitterStats
Stats returned by the triangle splitter algorithm.
Definition: AABBTreeBuilder.h:16
 
int mNodeCount
Number of nodes in the tree.
Definition: AABBTreeBuilder.h:22
 
int mTreeMaxTrianglesPerLeaf
Maximal amount of triangles in a leaf.
Definition: AABBTreeBuilder.h:30
 
Helper struct to indicate triangle range before and after the split.
Definition: TriangleSplitter.h:33
 
Definition: TriangleSplitter.h:23