Fix issues with btCompoundShape when adding/removing child shapes after construction of a btRigidBody.

Thanks tp for the report:
http://bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2925&p=11700#p11700
This commit is contained in:
erwin.coumans
2008-12-07 20:57:38 +00:00
parent 06167a0b31
commit f3a70b65eb
4 changed files with 63 additions and 6 deletions

View File

@@ -59,6 +59,9 @@ ATTRIBUTE_ALIGNED16(class) btCompoundShape : public btCollisionShape
btDbvt* m_dynamicAabbTree;
///increment m_updateRevision when adding/removing/replacing child shapes, so that some caches can be updated
int m_updateRevision;
public:
BT_DECLARE_ALIGNED_ALLOCATOR();
@@ -152,6 +155,10 @@ public:
///of the collision object by the principal transform.
void calculatePrincipalAxisTransform(btScalar* masses, btTransform& principal, btVector3& inertia) const;
int getUpdateRevision() const
{
return m_updateRevision;
}
private:
btScalar m_collisionMargin;