fix removeCollisionObject for Deformable world
This commit is contained in:
@@ -386,3 +386,12 @@ void btDeformableMultiBodyDynamicsWorld::removeSoftBody(btSoftBody* body)
|
|||||||
// force a reinitialize so that node indices get updated.
|
// force a reinitialize so that node indices get updated.
|
||||||
m_deformableBodySolver->reinitialize(m_softBodies, btScalar(-1));
|
m_deformableBodySolver->reinitialize(m_softBodies, btScalar(-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void btDeformableMultiBodyDynamicsWorld::removeCollisionObject(btCollisionObject* collisionObject)
|
||||||
|
{
|
||||||
|
btSoftBody* body = btSoftBody::upcast(collisionObject);
|
||||||
|
if (body)
|
||||||
|
removeSoftBody(body);
|
||||||
|
else
|
||||||
|
btDiscreteDynamicsWorld::removeCollisionObject(collisionObject);
|
||||||
|
}
|
||||||
|
|||||||
@@ -147,6 +147,8 @@ public:
|
|||||||
|
|
||||||
void removeSoftBody(btSoftBody* body);
|
void removeSoftBody(btSoftBody* body);
|
||||||
|
|
||||||
|
void removeCollisionObject(btCollisionObject* collisionObject);
|
||||||
|
|
||||||
int getDrawFlags() const { return (m_drawFlags); }
|
int getDrawFlags() const { return (m_drawFlags); }
|
||||||
void setDrawFlags(int f) { m_drawFlags = f; }
|
void setDrawFlags(int f) { m_drawFlags = f; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user