6 #include "SingleSphere.h"
8 #include "AllVertexTypes.h"
10 #include "VectorMath.h"
28 u16 QuantizedSphereRadius()
const {
return m_quantizedSphereRadius; }
30 inline int FirstChildIndex()
const;
31 inline int ChildCount()
const;
32 inline bool IsLeafNode()
const;
36 u16 m_quantizedSphereRadius;
42 ChildCountMask = (1 << ChildCountBits) - 1,
44 FirstChildIndexBits = 19,
45 FirstChildIndexShift = ChildCountBits,
46 MaxFirstChildIndex = (1 << FirstChildIndexBits) - 1,
47 FirstChildIndexMask = MaxFirstChildIndex << FirstChildIndexShift,
49 IsLeafShift = FirstChildIndexShift + FirstChildIndexBits,
50 IsLeafMask = (1 << IsLeafShift)
54 inline int CollisionBvhNode::FirstChildIndex()
const
56 return (m_packedRanges & FirstChildIndexMask) >> FirstChildIndexShift;
59 inline int CollisionBvhNode::ChildCount()
const
61 return m_packedRanges & ChildCountMask;
64 inline bool CollisionBvhNode::IsLeafNode()
const
66 return ((m_packedRanges & IsLeafMask) != 0) ?
true :
false;