remove constraints/rigid bodies from dynamics world in btBulletWorldImporter
Thanks to vicariousentertainment, see http://code.google.com/p/dynamica/issues/detail?id=16 Enable SIMD OpenCL cloth solver by default enable keyboard 'up' for Windows (non-Glut) version
This commit is contained in:
@@ -25,24 +25,32 @@ btBulletWorldImporter::~btBulletWorldImporter()
|
||||
void btBulletWorldImporter::deleteAllData()
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<m_allocatedConstraints.size();i++)
|
||||
{
|
||||
if(m_dynamicsWorld)
|
||||
m_dynamicsWorld->removeConstraint(m_allocatedConstraints[i]);
|
||||
delete m_allocatedConstraints[i];
|
||||
}
|
||||
m_allocatedConstraints.clear();
|
||||
|
||||
|
||||
for (i=0;i<m_allocatedRigidBodies.size();i++)
|
||||
{
|
||||
if(m_dynamicsWorld)
|
||||
m_dynamicsWorld->removeRigidBody(btRigidBody::upcast(m_allocatedRigidBodies[i]));
|
||||
delete m_allocatedRigidBodies[i];
|
||||
}
|
||||
|
||||
m_allocatedRigidBodies.clear();
|
||||
|
||||
|
||||
for (i=0;i<m_allocatedCollisionShapes.size();i++)
|
||||
{
|
||||
delete m_allocatedCollisionShapes[i];
|
||||
}
|
||||
m_allocatedCollisionShapes.clear();
|
||||
|
||||
for (i=0;i<m_allocatedRigidBodies.size();i++)
|
||||
{
|
||||
delete m_allocatedRigidBodies[i];
|
||||
}
|
||||
m_allocatedRigidBodies.clear();
|
||||
|
||||
for (i=0;i<m_allocatedConstraints.size();i++)
|
||||
{
|
||||
delete m_allocatedConstraints[i];
|
||||
}
|
||||
m_allocatedConstraints.clear();
|
||||
|
||||
|
||||
for (i=0;i<m_allocatedBvhs.size();i++)
|
||||
{
|
||||
delete m_allocatedBvhs[i];
|
||||
|
||||
Reference in New Issue
Block a user