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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user