Blender
V3.3
|
Structure for containing Boxes. More...
#include <btGImpactBvh.h>
Public Member Functions | |
btGImpactBvh () | |
this constructor doesn't build the tree. you must call buildSet More... | |
btGImpactBvh (btPrimitiveManagerBase *primitive_manager) | |
this constructor doesn't build the tree. you must call buildSet More... | |
SIMD_FORCE_INLINE btAABB | getGlobalBox () const |
SIMD_FORCE_INLINE void | setPrimitiveManager (btPrimitiveManagerBase *primitive_manager) |
SIMD_FORCE_INLINE btPrimitiveManagerBase * | getPrimitiveManager () const |
Protected Member Functions | |
void | refit () |
Protected Attributes | |
btBvhTree | m_box_tree |
btPrimitiveManagerBase * | m_primitive_manager |
SIMD_FORCE_INLINE void | update () |
this attemps to refit the box set. More... | |
void | buildSet () |
this rebuild the entire set More... | |
bool | boxQuery (const btAABB &box, btAlignedObjectArray< int > &collided_results) const |
returns the indices of the primitives in the m_primitive_manager More... | |
SIMD_FORCE_INLINE bool | boxQueryTrans (const btAABB &box, const btTransform &transform, btAlignedObjectArray< int > &collided_results) const |
returns the indices of the primitives in the m_primitive_manager More... | |
bool | rayQuery (const btVector3 &ray_dir, const btVector3 &ray_origin, btAlignedObjectArray< int > &collided_results) const |
returns the indices of the primitives in the m_primitive_manager More... | |
SIMD_FORCE_INLINE bool | hasHierarchy () const |
tells if this set has hierarcht More... | |
SIMD_FORCE_INLINE bool | isTrimesh () const |
tells if this set is a trimesh More... | |
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 void | getNodeTriangle (int nodeindex, btPrimitiveTriangle &triangle) const |
SIMD_FORCE_INLINE const GIM_BVH_TREE_NODE * | get_node_pointer (int index=0) const |
static void | find_collision (btGImpactBvh *boxset1, const btTransform &trans1, btGImpactBvh *boxset2, const btTransform &trans2, btPairSet &collision_pairs) |
Structure for containing Boxes.
This class offers an structure for managing a box tree of primitives. Requires a Primitive prototype (like btPrimitiveManagerBase )
Definition at line 167 of file btGImpactBvh.h.
|
inline |
this constructor doesn't build the tree. you must call buildSet
Definition at line 179 of file btGImpactBvh.h.
References m_primitive_manager, and NULL.
|
inline |
this constructor doesn't build the tree. you must call buildSet
Definition at line 185 of file btGImpactBvh.h.
References m_primitive_manager.
bool btGImpactBvh::boxQuery | ( | const btAABB & | box, |
btAlignedObjectArray< int > & | collided_results | ||
) | const |
returns the indices of the primitives in the m_primitive_manager
Definition at line 269 of file btGImpactBvh.cpp.
References btAABB, getEscapeNodeIndex(), getNodeBound(), getNodeCount(), getNodeData(), isLeafNode(), btAlignedObjectArray< T >::push_back(), and btAlignedObjectArray< T >::size().
Referenced by boxQueryTrans().
|
inline |
returns the indices of the primitives in the m_primitive_manager
Definition at line 223 of file btGImpactBvh.h.
References boxQuery(), btAABB, and transform().
void btGImpactBvh::buildSet | ( | ) |
this rebuild the entire set
Definition at line 253 of file btGImpactBvh.cpp.
References btBvhTree::build_tree(), btPrimitiveManagerBase::get_primitive_box(), btPrimitiveManagerBase::get_primitive_count(), m_box_tree, m_primitive_manager, btAlignedObjectArray< T >::resize(), and btAlignedObjectArray< T >::size().
|
static |
Definition at line 444 of file btGImpactBvh.cpp.
References _find_collision_pairs_recursive(), BT_BOX_BOX_TRANSFORM_CACHE, and getNodeCount().
|
inline |
Definition at line 295 of file btGImpactBvh.h.
References btBvhTree::get_node_pointer(), and m_box_tree.
|
inline |
Definition at line 285 of file btGImpactBvh.h.
References btBvhTree::getEscapeNodeIndex(), and m_box_tree.
Referenced by boxQuery(), and rayQuery().
|
inline |
Definition at line 190 of file btGImpactBvh.h.
References btAABB, and getNodeBound().
|
inline |
Definition at line 275 of file btGImpactBvh.h.
References btBvhTree::getLeftNode(), and m_box_tree.
Referenced by _find_collision_pairs_recursive(), and refit().
|
inline |
Definition at line 265 of file btGImpactBvh.h.
References btBvhTree::getNodeBound(), and m_box_tree.
Referenced by _node_collision(), boxQuery(), getGlobalBox(), rayQuery(), and refit().
|
inline |
node count
Definition at line 249 of file btGImpactBvh.h.
References btBvhTree::getNodeCount(), and m_box_tree.
Referenced by boxQuery(), find_collision(), rayQuery(), and refit().
|
inline |
Definition at line 260 of file btGImpactBvh.h.
References btBvhTree::getNodeData(), and m_box_tree.
Referenced by _find_collision_pairs_recursive(), boxQuery(), getNodeTriangle(), rayQuery(), and refit().
|
inline |
Definition at line 290 of file btGImpactBvh.h.
References btPrimitiveManagerBase::get_primitive_triangle(), getNodeData(), and m_primitive_manager.
|
inline |
Definition at line 202 of file btGImpactBvh.h.
References m_primitive_manager.
|
inline |
Definition at line 280 of file btGImpactBvh.h.
References btBvhTree::getRightNode(), and m_box_tree.
Referenced by _find_collision_pairs_recursive(), and refit().
|
inline |
tells if this set has hierarcht
Definition at line 237 of file btGImpactBvh.h.
|
inline |
tells if the node is a leaf
Definition at line 255 of file btGImpactBvh.h.
References btBvhTree::isLeafNode(), and m_box_tree.
Referenced by _find_collision_pairs_recursive(), boxQuery(), rayQuery(), and refit().
|
inline |
tells if this set is a trimesh
Definition at line 243 of file btGImpactBvh.h.
References btPrimitiveManagerBase::is_trimesh(), and m_primitive_manager.
bool btGImpactBvh::rayQuery | ( | const btVector3 & | ray_dir, |
const btVector3 & | ray_origin, | ||
btAlignedObjectArray< int > & | collided_results | ||
) | const |
returns the indices of the primitives in the m_primitive_manager
Definition at line 305 of file btGImpactBvh.cpp.
References btAABB, getEscapeNodeIndex(), getNodeBound(), getNodeCount(), getNodeData(), isLeafNode(), btAlignedObjectArray< T >::push_back(), and btAlignedObjectArray< T >::size().
|
protected |
Definition at line 213 of file btGImpactBvh.cpp.
References btAABB, btPrimitiveManagerBase::get_primitive_box(), getLeftNode(), getNodeBound(), getNodeCount(), getNodeData(), getRightNode(), isLeafNode(), m_primitive_manager, and setNodeBound().
Referenced by update().
|
inline |
Definition at line 270 of file btGImpactBvh.h.
References m_box_tree, and btBvhTree::setNodeBound().
Referenced by refit().
|
inline |
Definition at line 197 of file btGImpactBvh.h.
References m_primitive_manager.
|
inline |
this attemps to refit the box set.
node manager prototype functions
Definition at line 211 of file btGImpactBvh.h.
References refit().
|
protected |
Definition at line 170 of file btGImpactBvh.h.
Referenced by buildSet(), get_node_pointer(), getEscapeNodeIndex(), getLeftNode(), getNodeBound(), getNodeCount(), getNodeData(), getRightNode(), isLeafNode(), and setNodeBound().
|
protected |
Definition at line 171 of file btGImpactBvh.h.
Referenced by btGImpactBvh(), buildSet(), getNodeTriangle(), getPrimitiveManager(), isTrimesh(), refit(), and setPrimitiveManager().