Bullet Collision Detection & Physics Library
|
Go to the documentation of this file. 1 #ifndef BT_GIMPACT_BVH_H_INCLUDED
2 #define BT_GIMPACT_BVH_H_INCLUDED
70 int startIndex,
int endIndex,
int splitAxis);
121 return nodeindex + 1;
127 return nodeindex + 1 +
m_node_array[nodeindex + 1].getEscapeIndex();
228 return boxQuery(transbox, collided_results);
300 #ifdef TRI_COLLISION_PROFILING
301 static float getAverageTreeCollisionTime();
302 #endif //TRI_COLLISION_PROFILING
309 #endif // BT_GIMPACT_BVH_H_INCLUDED
void getNodeTriangle(int nodeindex, btPrimitiveTriangle &triangle) const
bool isLeafNode(int nodeindex) const
tells if the node is a leaf
void setNodeBound(int nodeindex, const btAABB &bound)
btGImpactBvh()
this constructor doesn't build the tree. you must call buildSet
void buildSet()
this rebuild the entire set
int getEscapeNodeIndex(int nodeindex) const
void setPrimitiveManager(btPrimitiveManagerBase *primitive_manager)
int getNodeCount() const
node count
int _calc_splitting_axis(GIM_BVH_DATA_ARRAY &primitive_boxes, int startIndex, int endIndex)
GIM_BVH_TREE_NODE_ARRAY m_node_array
int getLeftNode(int nodeindex) const
void getNodeBound(int nodeindex, btAABB &bound) const
int getLeftNode(int nodeindex) const
int getEscapeNodeIndex(int nodeindex) const
void clear()
clear the array, deallocated memory. Generally it is better to use array.resize(0),...
int getRightNode(int nodeindex) const
void update()
node manager prototype functions
int getRightNode(int nodeindex) const
btPrimitiveManagerBase * m_primitive_manager
virtual void get_primitive_triangle(int prim_index, btPrimitiveTriangle &triangle) const =0
retrieves only the points of the triangle, and the collision margin
Node Structure for trees.
virtual bool is_trimesh() const =0
determines if this manager consist on only triangles, which special case will be optimized
void setNodeBound(int nodeindex, const btAABB &bound)
int getNodeData(int nodeindex) const
btAABB getGlobalBox() const
bool boxQuery(const btAABB &box, btAlignedObjectArray< int > &collided_results) const
returns the indices of the primitives in the m_primitive_manager
int getNodeCount() const
node count
bool isTrimesh() const
tells if this set is a trimesh
static void find_collision(btGImpactBvh *boxset1, const btTransform &trans1, btGImpactBvh *boxset2, const btTransform &trans2, btPairSet &collision_pairs)
void getNodeBound(int nodeindex, btAABB &bound) const
btVector3 can be used to represent 3D points and vectors.
void build_tree(GIM_BVH_DATA_ARRAY &primitive_boxes)
prototype functions for box tree management
bool hasHierarchy() const
tells if this set has hierarcht
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
#define SIMD_FORCE_INLINE
const GIM_BVH_TREE_NODE * get_node_pointer(int index=0) const
void push_pair_inv(int index1, int index2)
Prototype Base class for primitive classification.
int getNodeData(int nodeindex) const
bool boxQueryTrans(const btAABB &box, const btTransform &transform, btAlignedObjectArray< int > &collided_results) const
returns the indices of the primitives in the m_primitive_manager
Basic Box tree structure.
void appy_transform(const btTransform &trans)
Apply a transform to an AABB.
btPrimitiveManagerBase * getPrimitiveManager() const
bool isLeafNode(int nodeindex) const
tells if the node is a leaf
Structure for containing Boxes.
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
virtual ~btPrimitiveManagerBase()
void _build_sub_tree(GIM_BVH_DATA_ARRAY &primitive_boxes, int startIndex, int endIndex)
const GIM_BVH_TREE_NODE * get_node_pointer(int index=0) const
int _sort_and_calc_splitting_index(GIM_BVH_DATA_ARRAY &primitive_boxes, int startIndex, int endIndex, int splitAxis)
virtual void get_primitive_box(int prim_index, btAABB &primbox) const =0
void push_back(const GIM_PAIR &_Val)
virtual int get_primitive_count() const =0
btGImpactBvh(btPrimitiveManagerBase *primitive_manager)
this constructor doesn't build the tree. you must call buildSet
void push_pair(int index1, int index2)