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