only add compound child shapes to 'allocated' list once

This commit is contained in:
Erwin Coumans 2016-07-16 17:58:06 -07:00
parent e2bdd7dbb1
commit 589fa376b3
2 changed files with 1 additions and 19 deletions

View File

@ -701,15 +701,6 @@ bool PhysicsServerCommandProcessor::loadSdf(const char* fileName, char* bufferSe
{
btCollisionShape* shape =u2b.getAllocatedCollisionShape(i);
m_data->m_collisionShapes.push_back(shape);
if (shape->isCompound())
{
btCompoundShape* compound = (btCompoundShape*) shape;
for (int childIndex=0;childIndex<compound->getNumChildShapes();childIndex++)
{
m_data->m_collisionShapes.push_back(compound->getChildShape(childIndex));
}
}
}
btTransform rootTrans;
@ -851,15 +842,6 @@ bool PhysicsServerCommandProcessor::loadUrdf(const char* fileName, const btVecto
{
btCollisionShape* shape =u2b.getAllocatedCollisionShape(i);
m_data->m_collisionShapes.push_back(shape);
if (shape->isCompound())
{
btCompoundShape* compound = (btCompoundShape*) shape;
for (int childIndex=0;childIndex<compound->getNumChildShapes();childIndex++)
{
m_data->m_collisionShapes.push_back(compound->getChildShape(childIndex));
}
}
}
btMultiBody* mb = creation.getBulletMultiBody();