mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 13:50:04 +00:00
only add compound child shapes to 'allocated' list once
This commit is contained in:
parent
e2bdd7dbb1
commit
589fa376b3
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user