only add compound child shapes to 'allocated' list once
This commit is contained in:
@@ -1065,7 +1065,7 @@ btCollisionShape* BulletURDFImporter::getAllocatedCollisionShape(int index)
|
|||||||
btTransform childTrans = col.m_linkLocalFrame;
|
btTransform childTrans = col.m_linkLocalFrame;
|
||||||
|
|
||||||
compoundShape->addChildShape(localInertiaFrame.inverse()*childTrans,childShape);
|
compoundShape->addChildShape(localInertiaFrame.inverse()*childTrans,childShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -701,15 +701,6 @@ bool PhysicsServerCommandProcessor::loadSdf(const char* fileName, char* bufferSe
|
|||||||
{
|
{
|
||||||
btCollisionShape* shape =u2b.getAllocatedCollisionShape(i);
|
btCollisionShape* shape =u2b.getAllocatedCollisionShape(i);
|
||||||
m_data->m_collisionShapes.push_back(shape);
|
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;
|
btTransform rootTrans;
|
||||||
@@ -851,15 +842,6 @@ bool PhysicsServerCommandProcessor::loadUrdf(const char* fileName, const btVecto
|
|||||||
{
|
{
|
||||||
btCollisionShape* shape =u2b.getAllocatedCollisionShape(i);
|
btCollisionShape* shape =u2b.getAllocatedCollisionShape(i);
|
||||||
m_data->m_collisionShapes.push_back(shape);
|
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();
|
btMultiBody* mb = creation.getBulletMultiBody();
|
||||||
|
|||||||
Reference in New Issue
Block a user