Improved performance of convex collision shapes, cache local AABB instead of recomputation. This fixes issue with very slow performance in larger .bsp levels.

Moved some asserts into 'btFullAssert', which is disabled by default (see btScalar.h to enable them). This is to speed-up debugging.
This commit is contained in:
ejcoumans
2007-02-26 04:59:05 +00:00
parent 559c4e85d8
commit b73900bc60
18 changed files with 102 additions and 21 deletions

View File

@@ -25,6 +25,10 @@ subject to the following restrictions:
class btPolyhedralConvexShape : public btConvexShape
{
btVector3 m_localAabbMin;
btVector3 m_localAabbMax;
bool m_isLocalAabbValid;
public:
btPolyhedralConvexShape();
@@ -36,6 +40,8 @@ public:
virtual void calculateLocalInertia(btScalar mass,btVector3& inertia);
virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
void recalcLocalAabb();
virtual int getNumVertices() const = 0 ;
virtual int getNumEdges() const = 0;