Blender  V3.3
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
btQuantizedBvhTree Class Reference

Basic Box tree structure. More...

#include <btGImpactQuantizedBvh.h>

Public Member Functions

 btQuantizedBvhTree ()
 
void build_tree (GIM_BVH_DATA_ARRAY &primitive_boxes)
 stackless build tree More...
 
SIMD_FORCE_INLINE void quantizePoint (unsigned short *quantizedpoint, const btVector3 &point) const
 
SIMD_FORCE_INLINE bool testQuantizedBoxOverlapp (int node_index, unsigned short *quantizedMin, unsigned short *quantizedMax) const
 
SIMD_FORCE_INLINE void clearNodes ()
 
SIMD_FORCE_INLINE int getNodeCount () const
 node count More...
 
SIMD_FORCE_INLINE bool isLeafNode (int nodeindex) const
 tells if the node is a leaf More...
 
SIMD_FORCE_INLINE int getNodeData (int nodeindex) const
 
SIMD_FORCE_INLINE void getNodeBound (int nodeindex, btAABB &bound) const
 
SIMD_FORCE_INLINE void setNodeBound (int nodeindex, const btAABB &bound)
 
SIMD_FORCE_INLINE int getLeftNode (int nodeindex) const
 
SIMD_FORCE_INLINE int getRightNode (int nodeindex) const
 
SIMD_FORCE_INLINE int getEscapeNodeIndex (int nodeindex) const
 
SIMD_FORCE_INLINE const BT_QUANTIZED_BVH_NODEget_node_pointer (int index=0) const
 

Protected Member Functions

void calc_quantization (GIM_BVH_DATA_ARRAY &primitive_boxes, btScalar boundMargin=btScalar(1.0))
 
int _sort_and_calc_splitting_index (GIM_BVH_DATA_ARRAY &primitive_boxes, int startIndex, int endIndex, int splitAxis)
 
int _calc_splitting_axis (GIM_BVH_DATA_ARRAY &primitive_boxes, int startIndex, int endIndex)
 
void _build_sub_tree (GIM_BVH_DATA_ARRAY &primitive_boxes, int startIndex, int endIndex)
 

Protected Attributes

int m_num_nodes
 
GIM_QUANTIZED_BVH_NODE_ARRAY m_node_array
 
btAABB m_global_bound
 
btVector3 m_bvhQuantization
 

Detailed Description

Basic Box tree structure.

Definition at line 36 of file btGImpactQuantizedBvh.h.

Constructor & Destructor Documentation

◆ btQuantizedBvhTree()

btQuantizedBvhTree::btQuantizedBvhTree ( )
inline

Definition at line 56 of file btGImpactQuantizedBvh.h.

References m_num_nodes.

Member Function Documentation

◆ _build_sub_tree()

void btQuantizedBvhTree::_build_sub_tree ( GIM_BVH_DATA_ARRAY primitive_boxes,
int  startIndex,
int  endIndex 
)
protected

◆ _calc_splitting_axis()

int btQuantizedBvhTree::_calc_splitting_axis ( GIM_BVH_DATA_ARRAY primitive_boxes,
int  startIndex,
int  endIndex 
)
protected

Definition at line 81 of file btGImpactQuantizedBvh.cpp.

References btVector3, center, and numIndices().

Referenced by _build_sub_tree().

◆ _sort_and_calc_splitting_index()

int btQuantizedBvhTree::_sort_and_calc_splitting_index ( GIM_BVH_DATA_ARRAY primitive_boxes,
int  startIndex,
int  endIndex,
int  splitAxis 
)
protected

◆ build_tree()

void btQuantizedBvhTree::build_tree ( GIM_BVH_DATA_ARRAY primitive_boxes)

stackless build tree

prototype functions for box tree management

Definition at line 216 of file btGImpactQuantizedBvh.cpp.

References _build_sub_tree(), calc_quantization(), m_node_array, m_num_nodes, btAlignedObjectArray< T >::resize(), and btAlignedObjectArray< T >::size().

Referenced by btGImpactQuantizedBvh::buildSet().

◆ calc_quantization()

void btQuantizedBvhTree::calc_quantization ( GIM_BVH_DATA_ARRAY primitive_boxes,
btScalar  boundMargin = btScalar(1.0) 
)
protected

◆ clearNodes()

SIMD_FORCE_INLINE void btQuantizedBvhTree::clearNodes ( )
inline

◆ get_node_pointer()

SIMD_FORCE_INLINE const BT_QUANTIZED_BVH_NODE* btQuantizedBvhTree::get_node_pointer ( int  index = 0) const
inline

Definition at line 143 of file btGImpactQuantizedBvh.h.

References m_node_array.

Referenced by btGImpactQuantizedBvh::get_node_pointer().

◆ getEscapeNodeIndex()

SIMD_FORCE_INLINE int btQuantizedBvhTree::getEscapeNodeIndex ( int  nodeindex) const
inline

Definition at line 138 of file btGImpactQuantizedBvh.h.

References m_node_array.

Referenced by btGImpactQuantizedBvh::getEscapeNodeIndex().

◆ getLeftNode()

SIMD_FORCE_INLINE int btQuantizedBvhTree::getLeftNode ( int  nodeindex) const
inline

Definition at line 127 of file btGImpactQuantizedBvh.h.

Referenced by btGImpactQuantizedBvh::getLeftNode().

◆ getNodeBound()

SIMD_FORCE_INLINE void btQuantizedBvhTree::getNodeBound ( int  nodeindex,
btAABB bound 
) const
inline

◆ getNodeCount()

SIMD_FORCE_INLINE int btQuantizedBvhTree::getNodeCount ( ) const
inline

node count

Definition at line 85 of file btGImpactQuantizedBvh.h.

References m_num_nodes.

Referenced by btGImpactQuantizedBvh::getNodeCount().

◆ getNodeData()

SIMD_FORCE_INLINE int btQuantizedBvhTree::getNodeData ( int  nodeindex) const
inline

Definition at line 96 of file btGImpactQuantizedBvh.h.

References m_node_array.

Referenced by btGImpactQuantizedBvh::getNodeData().

◆ getRightNode()

SIMD_FORCE_INLINE int btQuantizedBvhTree::getRightNode ( int  nodeindex) const
inline

Definition at line 132 of file btGImpactQuantizedBvh.h.

References isLeafNode(), and m_node_array.

Referenced by btGImpactQuantizedBvh::getRightNode().

◆ isLeafNode()

SIMD_FORCE_INLINE bool btQuantizedBvhTree::isLeafNode ( int  nodeindex) const
inline

tells if the node is a leaf

Definition at line 91 of file btGImpactQuantizedBvh.h.

References m_node_array.

Referenced by getRightNode(), and btGImpactQuantizedBvh::isLeafNode().

◆ quantizePoint()

SIMD_FORCE_INLINE void btQuantizedBvhTree::quantizePoint ( unsigned short *  quantizedpoint,
const btVector3 point 
) const
inline

◆ setNodeBound()

SIMD_FORCE_INLINE void btQuantizedBvhTree::setNodeBound ( int  nodeindex,
const btAABB bound 
)
inline

◆ testQuantizedBoxOverlapp()

SIMD_FORCE_INLINE bool btQuantizedBvhTree::testQuantizedBoxOverlapp ( int  node_index,
unsigned short *  quantizedMin,
unsigned short *  quantizedMax 
) const
inline

Definition at line 71 of file btGImpactQuantizedBvh.h.

References m_node_array.

Referenced by btGImpactQuantizedBvh::boxQuery().

Member Data Documentation

◆ m_bvhQuantization

btVector3 btQuantizedBvhTree::m_bvhQuantization
protected

◆ m_global_bound

btAABB btQuantizedBvhTree::m_global_bound
protected

◆ m_node_array

GIM_QUANTIZED_BVH_NODE_ARRAY btQuantizedBvhTree::m_node_array
protected

◆ m_num_nodes

int btQuantizedBvhTree::m_num_nodes
protected

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