+ provide access to 'root' collision shape, in case the original collision shape is temporarily replaced by a child collision shape.

+ added MultiMaterialDemo showing how to use the new btTriangleIndexVertexMaterialArray.
Thanks to Alex Silverman for this contribution!
This commit is contained in:
erwin.coumans
2008-07-10 22:19:30 +00:00
parent b66e5350d0
commit 1c0fa00bc7
16 changed files with 900 additions and 22 deletions

View File

@@ -34,10 +34,9 @@ m_isSwapped(isSwapped)
for (i=0;i<numChildren;i++)
{
btCollisionShape* childShape = compoundShape->getChildShape(i);
btCollisionShape* orgShape = colObj->getCollisionShape();
colObj->setCollisionShape( childShape );
colObj->internalSetTemporaryCollisionShape( childShape );
m_childCollisionAlgorithms[i] = ci.m_dispatcher1->findAlgorithm(colObj,otherObj);
colObj->setCollisionShape( orgShape );
colObj->setCollisionShape( colObj->getRootCollisionShape());
}
}