prepare for AABB tree traversal for compound objects

This commit is contained in:
ejcoumans
2006-07-25 00:30:15 +00:00
parent 9da13d7628
commit 8bf47140fe
4 changed files with 25 additions and 15 deletions

View File

@@ -24,7 +24,7 @@ subject to the following restrictions:
#include <vector>
#include "CollisionShapes/CollisionMargin.h"
class OptimizedBvh;
/// CompoundShape allows to store multiple other CollisionShapes
/// This allows for concave collision objects. This is more general then the Static Concave TriangleMeshShape.
@@ -35,6 +35,7 @@ class CompoundShape : public CollisionShape
SimdVector3 m_localAabbMin;
SimdVector3 m_localAabbMax;
OptimizedBvh* m_aabbTree;
public:
CompoundShape();
@@ -96,6 +97,13 @@ public:
return "Compound";
}
//this is optional, but should make collision queries faster, by culling non-overlapping nodes
void CreateAabbTreeFromChildren();
const OptimizedBvh* GetAabbTree() const
{
return m_aabbTree;
}
private:
SimdScalar m_collisionMargin;