Blender V2.61 - r43446
Public Member Functions | Protected Member Functions | Protected Attributes

btGImpactBvh Class Reference

Structure for containing Boxes. More...

#include <btGImpactBvh.h>

List of all members.

Public Member Functions

 btGImpactBvh ()
 this constructor doesn't build the tree. you must call buildSet
 btGImpactBvh (btPrimitiveManagerBase *primitive_manager)
 this constructor doesn't build the tree. you must call buildSet
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
btPrimitiveManagerBasem_primitive_manager

SIMD_FORCE_INLINE void update ()
 this attemps to refit the box set.
void buildSet ()
 this rebuild the entire set
bool boxQuery (const btAABB &box, btAlignedObjectArray< int > &collided_results) const
 returns the indices of the primitives in the m_primitive_manager
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
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
SIMD_FORCE_INLINE bool hasHierarchy () const
 tells if this set has hierarcht
SIMD_FORCE_INLINE bool isTrimesh () const
 tells if this set is a trimesh
SIMD_FORCE_INLINE int getNodeCount () const
 node count
SIMD_FORCE_INLINE bool isLeafNode (int nodeindex) const
 tells if the node is a leaf
SIMD_FORCE_INLINE int getNodeData (int nodeindex) const
 this attemps to refit the box set.
SIMD_FORCE_INLINE void getNodeBound (int nodeindex, btAABB &bound) const
 this attemps to refit the box set.
SIMD_FORCE_INLINE void setNodeBound (int nodeindex, const btAABB &bound)
 this attemps to refit the box set.
SIMD_FORCE_INLINE int getLeftNode (int nodeindex) const
 this attemps to refit the box set.
SIMD_FORCE_INLINE int getRightNode (int nodeindex) const
 this attemps to refit the box set.
SIMD_FORCE_INLINE int getEscapeNodeIndex (int nodeindex) const
 this attemps to refit the box set.
SIMD_FORCE_INLINE void getNodeTriangle (int nodeindex, btPrimitiveTriangle &triangle) const
 this attemps to refit the box set.
SIMD_FORCE_INLINE const
GIM_BVH_TREE_NODE
get_node_pointer (int index=0) const
 this attemps to refit the box set.
static void find_collision (btGImpactBvh *boxset1, const btTransform &trans1, btGImpactBvh *boxset2, const btTransform &trans2, btPairSet &collision_pairs)
 this attemps to refit the box set.

Detailed Description

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 250 of file btGImpactBvh.h.


Constructor & Destructor Documentation

btGImpactBvh::btGImpactBvh ( ) [inline]

this constructor doesn't build the tree. you must call buildSet

Definition at line 262 of file btGImpactBvh.h.

References m_primitive_manager, and NULL.

btGImpactBvh::btGImpactBvh ( btPrimitiveManagerBase primitive_manager) [inline]

this constructor doesn't build the tree. you must call buildSet

Definition at line 268 of file btGImpactBvh.h.

References m_primitive_manager.


Member Function Documentation

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 281 of file btGImpactBvh.cpp.

References getEscapeNodeIndex(), getNodeBound(), getNodeCount(), getNodeData(), isLeafNode(), btAlignedObjectArray< T >::push_back(), and btAlignedObjectArray< T >::size().

Referenced by boxQueryTrans().

SIMD_FORCE_INLINE bool btGImpactBvh::boxQueryTrans ( const btAABB &  box,
const btTransform transform,
btAlignedObjectArray< int > &  collided_results 
) const [inline]

returns the indices of the primitives in the m_primitive_manager

Definition at line 307 of file btGImpactBvh.h.

References boxQuery().

void btGImpactBvh::buildSet ( )
void btGImpactBvh::find_collision ( btGImpactBvh boxset1,
const btTransform trans1,
btGImpactBvh boxset2,
const btTransform trans2,
btPairSet collision_pairs 
) [static]

this attemps to refit the box set.

node manager prototype functions

Definition at line 475 of file btGImpactBvh.cpp.

References _find_collision_pairs_recursive(), and getNodeCount().

SIMD_FORCE_INLINE const GIM_BVH_TREE_NODE* btGImpactBvh::get_node_pointer ( int  index = 0) const [inline]

this attemps to refit the box set.

node manager prototype functions

Definition at line 381 of file btGImpactBvh.h.

References btBvhTree::get_node_pointer(), and m_box_tree.

SIMD_FORCE_INLINE int btGImpactBvh::getEscapeNodeIndex ( int  nodeindex) const [inline]

this attemps to refit the box set.

node manager prototype functions

Definition at line 370 of file btGImpactBvh.h.

References btBvhTree::getEscapeNodeIndex(), and m_box_tree.

Referenced by boxQuery(), and rayQuery().

SIMD_FORCE_INLINE btAABB btGImpactBvh::getGlobalBox ( ) const [inline]

Definition at line 273 of file btGImpactBvh.h.

References getNodeBound().

SIMD_FORCE_INLINE int btGImpactBvh::getLeftNode ( int  nodeindex) const [inline]

this attemps to refit the box set.

node manager prototype functions

Definition at line 360 of file btGImpactBvh.h.

References btBvhTree::getLeftNode(), and m_box_tree.

Referenced by _find_collision_pairs_recursive(), and refit().

SIMD_FORCE_INLINE void btGImpactBvh::getNodeBound ( int  nodeindex,
btAABB &  bound 
) const [inline]

this attemps to refit the box set.

node manager prototype functions

Definition at line 349 of file btGImpactBvh.h.

References btBvhTree::getNodeBound(), and m_box_tree.

Referenced by _node_collision(), boxQuery(), getGlobalBox(), rayQuery(), and refit().

SIMD_FORCE_INLINE int btGImpactBvh::getNodeCount ( ) const [inline]

node count

Definition at line 333 of file btGImpactBvh.h.

References btBvhTree::getNodeCount(), and m_box_tree.

Referenced by boxQuery(), find_collision(), rayQuery(), and refit().

SIMD_FORCE_INLINE int btGImpactBvh::getNodeData ( int  nodeindex) const [inline]

this attemps to refit the box set.

node manager prototype functions

Definition at line 344 of file btGImpactBvh.h.

References btBvhTree::getNodeData(), and m_box_tree.

Referenced by _find_collision_pairs_recursive(), boxQuery(), getNodeTriangle(), rayQuery(), and refit().

SIMD_FORCE_INLINE void btGImpactBvh::getNodeTriangle ( int  nodeindex,
btPrimitiveTriangle triangle 
) const [inline]

this attemps to refit the box set.

node manager prototype functions

Definition at line 375 of file btGImpactBvh.h.

References btPrimitiveManagerBase::get_primitive_triangle(), getNodeData(), and m_primitive_manager.

SIMD_FORCE_INLINE btPrimitiveManagerBase* btGImpactBvh::getPrimitiveManager ( ) const [inline]

Definition at line 285 of file btGImpactBvh.h.

References m_primitive_manager.

SIMD_FORCE_INLINE int btGImpactBvh::getRightNode ( int  nodeindex) const [inline]

this attemps to refit the box set.

node manager prototype functions

Definition at line 365 of file btGImpactBvh.h.

References btBvhTree::getRightNode(), and m_box_tree.

Referenced by _find_collision_pairs_recursive(), and refit().

SIMD_FORCE_INLINE bool btGImpactBvh::hasHierarchy ( ) const [inline]

tells if this set has hierarcht

Definition at line 321 of file btGImpactBvh.h.

SIMD_FORCE_INLINE bool btGImpactBvh::isLeafNode ( int  nodeindex) const [inline]

tells if the node is a leaf

Definition at line 339 of file btGImpactBvh.h.

References btBvhTree::isLeafNode(), and m_box_tree.

Referenced by _find_collision_pairs_recursive(), boxQuery(), rayQuery(), and refit().

SIMD_FORCE_INLINE bool btGImpactBvh::isTrimesh ( ) const [inline]

tells if this set is a trimesh

Definition at line 327 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 319 of file btGImpactBvh.cpp.

References getEscapeNodeIndex(), getNodeBound(), getNodeCount(), getNodeData(), isLeafNode(), btAlignedObjectArray< T >::push_back(), and btAlignedObjectArray< T >::size().

void btGImpactBvh::refit ( ) [protected]
SIMD_FORCE_INLINE void btGImpactBvh::setNodeBound ( int  nodeindex,
const btAABB &  bound 
) [inline]

this attemps to refit the box set.

node manager prototype functions

Definition at line 354 of file btGImpactBvh.h.

References m_box_tree, and btBvhTree::setNodeBound().

Referenced by refit().

SIMD_FORCE_INLINE void btGImpactBvh::setPrimitiveManager ( btPrimitiveManagerBase primitive_manager) [inline]

Definition at line 280 of file btGImpactBvh.h.

References m_primitive_manager.

SIMD_FORCE_INLINE void btGImpactBvh::update ( ) [inline]

this attemps to refit the box set.

node manager prototype functions

Definition at line 295 of file btGImpactBvh.h.

References refit().


Member Data Documentation


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