Blender  V3.3
Classes | Macros | Typedefs | Functions | Variables
btQuantizedBvh.h File Reference
#include "LinearMath/btVector3.h"
#include "LinearMath/btAlignedAllocator.h"
#include "LinearMath/btAlignedObjectArray.h"

Go to the source code of this file.

Classes

class  btNodeOverlapCallback
 

Macros

#define btQuantizedBvhData   btQuantizedBvhFloatData
 
#define btOptimizedBvhNodeData   btOptimizedBvhNodeFloatData
 
#define btQuantizedBvhDataName   "btQuantizedBvhFloatData"
 
#define MAX_SUBTREE_SIZE_IN_BYTES   2048
 
#define MAX_NUM_PARTS_IN_BITS   10
 

Typedefs

typedef btAlignedObjectArray< btOptimizedBvhNodeNodeArray
 for code readability: More...
 
typedef btAlignedObjectArray< btQuantizedBvhNodeQuantizedNodeArray
 
typedef btAlignedObjectArray< btBvhSubtreeInfoBvhSubtreeInfoArray
 

Functions

bool isLeafNode () const
 
int getEscapeIndex () const
 
int getTriangleIndex () const
 
int getPartId () const
 
void setAabbFromQuantizeNode (const btQuantizedBvhNode &quantizedNode)
 
void setInternalNodeAabbMin (int nodeIndex, const btVector3 &aabbMin)
 
void setInternalNodeAabbMax (int nodeIndex, const btVector3 &aabbMax)
 
btVector3 getAabbMin (int nodeIndex) const
 
btVector3 getAabbMax (int nodeIndex) const
 
void setInternalNodeEscapeIndex (int nodeIndex, int escapeIndex)
 
void mergeInternalNodeAabb (int nodeIndex, const btVector3 &newAabbMin, const btVector3 &newAabbMax)
 
void swapLeafNodes (int firstIndex, int secondIndex)
 
void assignInternalNodeFromLeafNode (int internalNode, int leafNodeIndex)
 
void buildTree (int startIndex, int endIndex)
 
int calcSplittingAxis (int startIndex, int endIndex)
 
int sortAndCalcSplittingIndex (int startIndex, int endIndex, int splitAxis)
 
void walkStacklessTree (btNodeOverlapCallback *nodeCallback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 
void walkStacklessQuantizedTreeAgainstRay (btNodeOverlapCallback *nodeCallback, const btVector3 &raySource, const btVector3 &rayTarget, const btVector3 &aabbMin, const btVector3 &aabbMax, int startNodeIndex, int endNodeIndex) const
 
void walkStacklessQuantizedTree (btNodeOverlapCallback *nodeCallback, unsigned short int *quantizedQueryAabbMin, unsigned short int *quantizedQueryAabbMax, int startNodeIndex, int endNodeIndex) const
 
void walkStacklessTreeAgainstRay (btNodeOverlapCallback *nodeCallback, const btVector3 &raySource, const btVector3 &rayTarget, const btVector3 &aabbMin, const btVector3 &aabbMax, int startNodeIndex, int endNodeIndex) const
 
void walkStacklessQuantizedTreeCacheFriendly (btNodeOverlapCallback *nodeCallback, unsigned short int *quantizedQueryAabbMin, unsigned short int *quantizedQueryAabbMax) const
 tree traversal designed for small-memory processors like PS3 SPU More...
 
void walkRecursiveQuantizedTreeAgainstQueryAabb (const btQuantizedBvhNode *currentNode, btNodeOverlapCallback *nodeCallback, unsigned short int *quantizedQueryAabbMin, unsigned short int *quantizedQueryAabbMax) const
 use the 16-byte stackless 'skipindex' node tree to do a recursive traversal More...
 
void walkRecursiveQuantizedTreeAgainstQuantizedTree (const btQuantizedBvhNode *treeNodeA, const btQuantizedBvhNode *treeNodeB, btNodeOverlapCallback *nodeCallback) const
 use the 16-byte stackless 'skipindex' node tree to do a recursive traversal More...
 
void updateSubtreeHeaders (int leftChildNodexIndex, int rightChildNodexIndex)
 
 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
virtual ~btQuantizedBvh ()
 
void setQuantizationValues (const btVector3 &bvhAabbMin, const btVector3 &bvhAabbMax, btScalar quantizationMargin=btScalar(1.0))
 ‍***************************************** expert/internal use only ************************* More...
 
QuantizedNodeArraygetLeafNodeArray ()
 
void buildInternal ()
 buildInternal is expert use only: assumes that setQuantizationValues and LeafNodeArray are initialized More...
 
void reportAabbOverlappingNodex (btNodeOverlapCallback *nodeCallback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 ‍***************************************** expert/internal use only ************************* More...
 
void reportRayOverlappingNodex (btNodeOverlapCallback *nodeCallback, const btVector3 &raySource, const btVector3 &rayTarget) const
 
void reportBoxCastOverlappingNodex (btNodeOverlapCallback *nodeCallback, const btVector3 &raySource, const btVector3 &rayTarget, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 
SIMD_FORCE_INLINE void quantize (unsigned short *out, const btVector3 &point, int isMax) const
 
SIMD_FORCE_INLINE void quantizeWithClamp (unsigned short *out, const btVector3 &point2, int isMax) const
 
SIMD_FORCE_INLINE btVector3 unQuantize (const unsigned short *vecIn) const
 
void setTraversalMode (btTraversalMode traversalMode)
 setTraversalMode let's you choose between stackless, recursive or stackless cache friendly tree traversal. Note this is only implemented for quantized trees. More...
 
SIMD_FORCE_INLINE QuantizedNodeArraygetQuantizedNodeArray ()
 
SIMD_FORCE_INLINE BvhSubtreeInfoArraygetSubtreeInfoArray ()
 
unsigned calculateSerializeBufferSize () const
 
virtual bool serialize (void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) const
 Data buffer MUST be 16 byte aligned. More...
 
static btQuantizedBvhdeSerializeInPlace (void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian)
 deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place' More...
 
static unsigned int getAlignmentSerializationPadding ()
 
virtual int calculateSerializeBufferSizeNew () const
 
virtual const char * serialize (void *dataBuffer, btSerializer *serializer) const
 fills the dataBuffer and returns the struct name (and 0 on failure) More...
 
virtual void deSerializeFloat (struct btQuantizedBvhFloatData &quantizedBvhFloatData)
 
virtual void deSerializeDouble (struct btQuantizedBvhDoubleData &quantizedBvhDoubleData)
 
SIMD_FORCE_INLINE bool isQuantized ()
 

Variables

 btQuantizedBvhNode
 
unsigned short int m_quantizedAabbMin [3]
 
unsigned short int m_quantizedAabbMax [3]
 
int m_escapeIndexOrTriangleIndex
 
 btOptimizedBvhNode
 
btVector3 m_aabbMinOrg
 
btVector3 m_aabbMaxOrg
 
int m_escapeIndex
 
int m_subPart
 
int m_triangleIndex
 
char m_padding [20]
 
 btBvhSubtreeInfo
 btBvhSubtreeInfo provides info to gather a subtree of limited size More...
 
int m_rootNodeIndex
 
int m_subtreeSize
 
 btQuantizedBvh
 
btVector3 m_bvhAabbMin
 
btVector3 m_bvhAabbMax
 
btVector3 m_bvhQuantization
 
int m_bulletVersion
 
int m_curNodeIndex
 
bool m_useQuantization
 
NodeArray m_leafNodes
 
NodeArray m_contiguousNodes
 
QuantizedNodeArray m_quantizedLeafNodes
 
QuantizedNodeArray m_quantizedContiguousNodes
 
btTraversalMode m_traversalMode
 
BvhSubtreeInfoArray m_SubtreeHeaders
 
int m_subtreeHeaderCount
 

Macro Definition Documentation

◆ btOptimizedBvhNodeData

#define btOptimizedBvhNodeData   btOptimizedBvhNodeFloatData

Definition at line 40 of file btQuantizedBvh.h.

◆ btQuantizedBvhData

#define btQuantizedBvhData   btQuantizedBvhFloatData

Definition at line 39 of file btQuantizedBvh.h.

◆ btQuantizedBvhDataName

#define btQuantizedBvhDataName   "btQuantizedBvhFloatData"

Definition at line 41 of file btQuantizedBvh.h.

◆ MAX_NUM_PARTS_IN_BITS

#define MAX_NUM_PARTS_IN_BITS   10

Definition at line 51 of file btQuantizedBvh.h.

◆ MAX_SUBTREE_SIZE_IN_BYTES

#define MAX_SUBTREE_SIZE_IN_BYTES   2048

Definition at line 47 of file btQuantizedBvh.h.

Typedef Documentation

◆ BvhSubtreeInfoArray

Definition at line 161 of file btQuantizedBvh.h.

◆ NodeArray

for code readability:

Definition at line 159 of file btQuantizedBvh.h.

◆ QuantizedNodeArray

Definition at line 160 of file btQuantizedBvh.h.

Function Documentation

◆ assignInternalNodeFromLeafNode()

void btQuantizedBvh::assignInternalNodeFromLeafNode ( int  internalNode,
int  leafNodeIndex 
)
protected

◆ BT_DECLARE_ALIGNED_ALLOCATOR()

BT_DECLARE_ALIGNED_ALLOCATOR ( )

◆ buildInternal()

void btQuantizedBvh::buildInternal ( )

buildInternal is expert use only: assumes that setQuantizationValues and LeafNodeArray are initialized

assumes that caller filled in the m_quantizedLeafNodes

if the entire tree is small then subtree size, we need to create a header info for the tree

Definition at line 36 of file btQuantizedBvh.cpp.

References btBvhSubtreeInfo, buildTree(), btAlignedObjectArray< T >::clear(), btAlignedObjectArray< T >::expand(), m_curNodeIndex, m_leafNodes, m_quantizedContiguousNodes, m_quantizedLeafNodes, m_subtreeHeaderCount, m_SubtreeHeaders, m_useQuantization, btAlignedObjectArray< T >::resize(), and btAlignedObjectArray< T >::size().

◆ buildTree()

void buildTree ( int  startIndex,
int  endIndex 
)
protected

Referenced by buildInternal().

◆ calcSplittingAxis()

int btQuantizedBvh::calcSplittingAxis ( int  startIndex,
int  endIndex 
)
protected

Definition at line 285 of file btQuantizedBvh.cpp.

References btVector3, center, getAabbMax(), getAabbMin(), and numIndices().

◆ calculateSerializeBufferSize()

unsigned calculateSerializeBufferSize ( ) const

Referenced by serializeSingleShape().

◆ calculateSerializeBufferSizeNew()

SIMD_FORCE_INLINE int btQuantizedBvh::calculateSerializeBufferSizeNew ( ) const
virtual

Definition at line 538 of file btQuantizedBvh.h.

References btQuantizedBvhData.

◆ deSerializeDouble()

virtual void deSerializeDouble ( struct btQuantizedBvhDoubleData &  quantizedBvhDoubleData)
virtual

◆ deSerializeFloat()

virtual void deSerializeFloat ( struct btQuantizedBvhFloatData &  quantizedBvhFloatData)
virtual

◆ deSerializeInPlace()

static btQuantizedBvh* deSerializeInPlace ( void i_alignedDataBuffer,
unsigned int  i_dataBufferSize,
bool  i_swapEndian 
)
static

deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place'

◆ getAabbMax()

btVector3 getAabbMax ( int  nodeIndex) const
protected

◆ getAabbMin()

btVector3 getAabbMin ( int  nodeIndex) const
protected

◆ getAlignmentSerializationPadding()

unsigned int btQuantizedBvh::getAlignmentSerializationPadding ( )
static

Definition at line 807 of file btQuantizedBvh.cpp.

◆ getEscapeIndex()

int getEscapeIndex ( ) const

Definition at line 71 of file btQuantizedBvh.h.

References btAssert, isLeafNode(), and m_escapeIndexOrTriangleIndex.

◆ getLeafNodeArray()

QuantizedNodeArray& getLeafNodeArray ( )

Definition at line 317 of file btQuantizedBvh.h.

References m_quantizedLeafNodes.

◆ getPartId()

int getPartId ( ) const

◆ getQuantizedNodeArray()

SIMD_FORCE_INLINE QuantizedNodeArray& getQuantizedNodeArray ( )

Definition at line 418 of file btQuantizedBvh.h.

References m_quantizedContiguousNodes.

◆ getSubtreeInfoArray()

SIMD_FORCE_INLINE BvhSubtreeInfoArray& getSubtreeInfoArray ( )

Definition at line 423 of file btQuantizedBvh.h.

References m_SubtreeHeaders.

◆ getTriangleIndex()

int getTriangleIndex ( ) const

◆ isLeafNode()

bool isLeafNode ( ) const

◆ isQuantized()

SIMD_FORCE_INLINE bool isQuantized ( )

Definition at line 453 of file btQuantizedBvh.h.

References m_useQuantization.

◆ mergeInternalNodeAabb()

void mergeInternalNodeAabb ( int  nodeIndex,
const btVector3 newAabbMin,
const btVector3 newAabbMax 
)
protected

◆ quantize()

SIMD_FORCE_INLINE void quantize ( unsigned short *  out,
const btVector3 point,
int  isMax 
) const

Make sure rounding is done in a way that unQuantize(quantizeWithClamp(...)) is conservative end-points always set the first bit, so that they are sorted properly (so that neighbouring AABBs overlap properly)

Todo:
: double-check this

Definition at line 326 of file btQuantizedBvh.h.

References btAssert, btVector3, m_bvhAabbMax, m_bvhAabbMin, m_bvhQuantization, m_useQuantization, usdtokens::out(), point, unQuantize(), and v.

Referenced by btAxisSweep3Internal< BP_FP_INT_TYPE >::addHandle(), mergeInternalNodeAabb(), quantizeWithClamp(), refitPartial(), setInternalNodeAabbMax(), setInternalNodeAabbMin(), setQuantizationValues(), updateBvhNodes(), and btAxisSweep3Internal< BP_FP_INT_TYPE >::updateHandle().

◆ quantizeWithClamp()

SIMD_FORCE_INLINE void quantizeWithClamp ( unsigned short *  out,
const btVector3 point2,
int  isMax 
) const

◆ reportAabbOverlappingNodex()

void btQuantizedBvh::reportAabbOverlappingNodex ( btNodeOverlapCallback nodeCallback,
const btVector3 aabbMin,
const btVector3 aabbMax 
) const

‍***************************************** expert/internal use only *************************

quantize query AABB

Definition at line 312 of file btQuantizedBvh.cpp.

References btAssert, btQuantizedBvhNode, m_curNodeIndex, m_quantizedContiguousNodes, m_traversalMode, m_useQuantization, quantizeWithClamp(), walkRecursiveQuantizedTreeAgainstQueryAabb(), walkStacklessQuantizedTree(), walkStacklessQuantizedTreeCacheFriendly(), and walkStacklessTree().

◆ reportBoxCastOverlappingNodex()

void btQuantizedBvh::reportBoxCastOverlappingNodex ( btNodeOverlapCallback nodeCallback,
const btVector3 raySource,
const btVector3 rayTarget,
const btVector3 aabbMin,
const btVector3 aabbMax 
) const

◆ reportRayOverlappingNodex()

void btQuantizedBvh::reportRayOverlappingNodex ( btNodeOverlapCallback nodeCallback,
const btVector3 raySource,
const btVector3 rayTarget 
) const

Definition at line 737 of file btQuantizedBvh.cpp.

References btVector3, and reportBoxCastOverlappingNodex().

◆ serialize() [1/2]

virtual const char* serialize ( void dataBuffer,
btSerializer serializer 
) const
virtual

fills the dataBuffer and returns the struct name (and 0 on failure)

◆ serialize() [2/2]

virtual bool serialize ( void o_alignedDataBuffer,
unsigned  i_dataBufferSize,
bool  i_swapEndian 
) const
virtual

◆ setAabbFromQuantizeNode()

void setAabbFromQuantizeNode ( const btQuantizedBvhNode quantizedNode)

Definition at line 136 of file btQuantizedBvh.h.

References m_quantizedAabbMax, and m_quantizedAabbMin.

◆ setInternalNodeAabbMax()

void setInternalNodeAabbMax ( int  nodeIndex,
const btVector3 aabbMax 
)
protected

◆ setInternalNodeAabbMin()

void setInternalNodeAabbMin ( int  nodeIndex,
const btVector3 aabbMin 
)
protected

two versions, one for quantized and normal nodes. This allows code-reuse while maintaining readability (no template/macro!) this might be refactored into a virtual, it is usually not calculated at run-time

Definition at line 201 of file btQuantizedBvh.h.

References m_contiguousNodes, m_quantizedAabbMin, m_quantizedContiguousNodes, m_useQuantization, and quantize().

◆ setInternalNodeEscapeIndex()

void setInternalNodeEscapeIndex ( int  nodeIndex,
int  escapeIndex 
)
protected

◆ setQuantizationValues()

void btQuantizedBvh::setQuantizationValues ( const btVector3 bvhAabbMin,
const btVector3 bvhAabbMax,
btScalar  quantizationMargin = btScalar(1.0) 
)

‍***************************************** expert/internal use only *************************

just for debugging, to visualize the individual patches/subtrees

Definition at line 81 of file btQuantizedBvh.cpp.

References btVector3, m_bvhAabbMax, m_bvhAabbMin, m_bvhQuantization, m_useQuantization, quantize(), unQuantize(), and v.

◆ setTraversalMode()

void setTraversalMode ( btTraversalMode  traversalMode)

setTraversalMode let's you choose between stackless, recursive or stackless cache friendly tree traversal. Note this is only implemented for quantized trees.

Definition at line 413 of file btQuantizedBvh.h.

References m_traversalMode.

◆ sortAndCalcSplittingIndex()

int btQuantizedBvh::sortAndCalcSplittingIndex ( int  startIndex,
int  endIndex,
int  splitAxis 
)
protected

◆ swapLeafNodes()

void btQuantizedBvh::swapLeafNodes ( int  firstIndex,
int  secondIndex 
)
protected

◆ unQuantize()

SIMD_FORCE_INLINE btVector3 unQuantize ( const unsigned short *  vecIn) const

◆ updateSubtreeHeaders()

void btQuantizedBvh::updateSubtreeHeaders ( int  leftChildNodexIndex,
int  rightChildNodexIndex 
)
protected

◆ walkRecursiveQuantizedTreeAgainstQuantizedTree()

void walkRecursiveQuantizedTreeAgainstQuantizedTree ( const btQuantizedBvhNode treeNodeA,
const btQuantizedBvhNode treeNodeB,
btNodeOverlapCallback nodeCallback 
) const
protected

use the 16-byte stackless 'skipindex' node tree to do a recursive traversal

◆ walkRecursiveQuantizedTreeAgainstQueryAabb()

void btQuantizedBvh::walkRecursiveQuantizedTreeAgainstQueryAabb ( const btQuantizedBvhNode currentNode,
btNodeOverlapCallback nodeCallback,
unsigned short int *  quantizedQueryAabbMin,
unsigned short int *  quantizedQueryAabbMax 
) const
protected

use the 16-byte stackless 'skipindex' node tree to do a recursive traversal

Definition at line 411 of file btQuantizedBvh.cpp.

References btAssert, btQuantizedBvhNode, isLeafNode(), m_useQuantization, btNodeOverlapCallback::processNode(), and testQuantizedAabbAgainstQuantizedAabb().

Referenced by reportAabbOverlappingNodex().

◆ walkStacklessQuantizedTree()

void btQuantizedBvh::walkStacklessQuantizedTree ( btNodeOverlapCallback nodeCallback,
unsigned short int *  quantizedQueryAabbMin,
unsigned short int *  quantizedQueryAabbMax,
int  startNodeIndex,
int  endNodeIndex 
) const
protected

◆ walkStacklessQuantizedTreeAgainstRay()

void btQuantizedBvh::walkStacklessQuantizedTreeAgainstRay ( btNodeOverlapCallback nodeCallback,
const btVector3 raySource,
const btVector3 rayTarget,
const btVector3 aabbMin,
const btVector3 aabbMax,
int  startNodeIndex,
int  endNodeIndex 
) const
protected

what about division by zero? --> just set rayDirection[i] to 1.0

careful with this check: need to check division by zero (above) and fix the unQuantize method thanks Joerg/hiker for the reproduction case! http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1858

Definition at line 530 of file btQuantizedBvh.cpp.

References bounds(), BT_LARGE_FLOAT, btAssert, btQuantizedBvhNode, btRayAabb(), btRayAabb2(), btVector3, color, btIDebugDraw::drawAabb(), isLeafNode(), m_quantizedContiguousNodes, m_useQuantization, normal, btNodeOverlapCallback::processNode(), quantizeWithClamp(), KDL::sign(), testQuantizedAabbAgainstQuantizedAabb(), unQuantize(), and void.

Referenced by reportBoxCastOverlappingNodex().

◆ walkStacklessQuantizedTreeCacheFriendly()

void btQuantizedBvh::walkStacklessQuantizedTreeCacheFriendly ( btNodeOverlapCallback nodeCallback,
unsigned short int *  quantizedQueryAabbMin,
unsigned short int *  quantizedQueryAabbMax 
) const
protected

tree traversal designed for small-memory processors like PS3 SPU

Definition at line 716 of file btQuantizedBvh.cpp.

References btAssert, btBvhSubtreeInfo, m_SubtreeHeaders, m_useQuantization, btAlignedObjectArray< T >::size(), testQuantizedAabbAgainstQuantizedAabb(), and walkStacklessQuantizedTree().

Referenced by reportAabbOverlappingNodex().

◆ walkStacklessTree()

void btQuantizedBvh::walkStacklessTree ( btNodeOverlapCallback nodeCallback,
const btVector3 aabbMin,
const btVector3 aabbMax 
) const
protected

◆ walkStacklessTreeAgainstRay()

void btQuantizedBvh::walkStacklessTreeAgainstRay ( btNodeOverlapCallback nodeCallback,
const btVector3 raySource,
const btVector3 rayTarget,
const btVector3 aabbMin,
const btVector3 aabbMax,
int  startNodeIndex,
int  endNodeIndex 
) const
protected

what about division by zero? --> just set rayDirection[i] to 1.0

careful with this check: need to check division by zero (above) and fix the unQuantize method thanks Joerg/hiker for the reproduction case! http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1858

Definition at line 442 of file btQuantizedBvh.cpp.

References bounds(), BT_LARGE_FLOAT, btAssert, btOptimizedBvhNode, btRayAabb(), btRayAabb2(), btVector3, isLeafNode(), m_contiguousNodes, m_curNodeIndex, m_useQuantization, normal, btNodeOverlapCallback::processNode(), KDL::sign(), and TestAabbAgainstAabb2().

Referenced by reportBoxCastOverlappingNodex().

◆ ~btQuantizedBvh()

btQuantizedBvh::~btQuantizedBvh ( )
virtual

Definition at line 112 of file btQuantizedBvh.cpp.

Variable Documentation

◆ btBvhSubtreeInfo

btBvhSubtreeInfo
Initial value:
{
public:
BT_DECLARE_ALIGNED_ALLOCATOR()

btBvhSubtreeInfo provides info to gather a subtree of limited size

Definition at line 117 of file btQuantizedBvh.h.

Referenced by buildInternal(), refitPartial(), updateSubtreeHeaders(), and walkStacklessQuantizedTreeCacheFriendly().

◆ btOptimizedBvhNode

btOptimizedBvhNode
Initial value:

btOptimizedBvhNode contains both internal and leaf node information. Total node size is 44 bytes / node. You can use the compressed version of 16 bytes.

Definition at line 95 of file btQuantizedBvh.h.

Referenced by swapLeafNodes(), walkStacklessTree(), and walkStacklessTreeAgainstRay().

◆ btQuantizedBvh

btQuantizedBvh
Initial value:
{
public:
enum btTraversalMode
{
TRAVERSAL_STACKLESS = 0,
TRAVERSAL_STACKLESS_CACHE_FRIENDLY,
TRAVERSAL_RECURSIVE
}

The btQuantizedBvh class stores an AABB tree that can be quickly traversed on CPU and Cell SPU. It is used by the btBvhTriangleMeshShape as midphase. It is recommended to use quantization for better performance and lower memory requirements.

Definition at line 167 of file btQuantizedBvh.h.

◆ btQuantizedBvhNode

btQuantizedBvhNode
Initial value:

btQuantizedBvhNode is a compressed aabb node, 16 bytes. Node can be used for leafnode or internal node. Leafnodes can point to 32-bit triangle index (non-negative range).

Definition at line 56 of file btQuantizedBvh.h.

Referenced by reportAabbOverlappingNodex(), swapLeafNodes(), updateBvhNodes(), updateSubtreeHeaders(), walkRecursiveQuantizedTreeAgainstQueryAabb(), walkStacklessQuantizedTree(), and walkStacklessQuantizedTreeAgainstRay().

◆ m_aabbMaxOrg

btVector3 m_aabbMaxOrg

Definition at line 101 of file btQuantizedBvh.h.

◆ m_aabbMinOrg

btVector3 m_aabbMinOrg

Definition at line 100 of file btQuantizedBvh.h.

◆ m_bulletVersion

int m_bulletVersion
protected

Definition at line 182 of file btQuantizedBvh.h.

◆ m_bvhAabbMax

btVector3 m_bvhAabbMax
protected

Definition at line 179 of file btQuantizedBvh.h.

Referenced by quantize(), quantizeWithClamp(), refitPartial(), and setQuantizationValues().

◆ m_bvhAabbMin

btVector3 m_bvhAabbMin
protected

◆ m_bvhQuantization

btVector3 m_bvhQuantization
protected

Definition at line 180 of file btQuantizedBvh.h.

Referenced by quantize(), setQuantizationValues(), and unQuantize().

◆ m_contiguousNodes

NodeArray m_contiguousNodes
protected

◆ m_curNodeIndex

int m_curNodeIndex
protected

◆ m_escapeIndex

int m_escapeIndex

Definition at line 104 of file btQuantizedBvh.h.

◆ m_escapeIndexOrTriangleIndex

int m_escapeIndexOrTriangleIndex

Definition at line 64 of file btQuantizedBvh.h.

Referenced by getEscapeIndex(), getPartId(), getTriangleIndex(), and isLeafNode().

◆ m_leafNodes

NodeArray m_leafNodes
protected

◆ m_padding

int m_padding

Definition at line 112 of file btQuantizedBvh.h.

Referenced by btSphereShape().

◆ m_quantizedAabbMax

unsigned short int m_quantizedAabbMax

◆ m_quantizedAabbMin

unsigned short int m_quantizedAabbMin

◆ m_quantizedContiguousNodes

QuantizedNodeArray m_quantizedContiguousNodes
protected

◆ m_quantizedLeafNodes

QuantizedNodeArray m_quantizedLeafNodes
protected

◆ m_rootNodeIndex

int m_rootNodeIndex

Definition at line 126 of file btQuantizedBvh.h.

◆ m_subPart

int m_subPart

Definition at line 108 of file btQuantizedBvh.h.

◆ m_subtreeHeaderCount

int m_subtreeHeaderCount
mutableprotected

Definition at line 197 of file btQuantizedBvh.h.

Referenced by buildInternal(), and updateSubtreeHeaders().

◆ m_SubtreeHeaders

BvhSubtreeInfoArray m_SubtreeHeaders
protected

◆ m_subtreeSize

int m_subtreeSize

Definition at line 128 of file btQuantizedBvh.h.

◆ m_traversalMode

btTraversalMode m_traversalMode
protected

Definition at line 193 of file btQuantizedBvh.h.

Referenced by reportAabbOverlappingNodex(), and setTraversalMode().

◆ m_triangleIndex

int m_triangleIndex

Definition at line 109 of file btQuantizedBvh.h.

◆ m_useQuantization

bool m_useQuantization
protected