Fix shapekey swapping issue with triangle meshes, see http://code.google.com/p/bullet/issues/detail?id=316

Revert btHashKeyPtr and introduce btHashPtr (to avoid breaking API/COLLADA Converter), see http://code.google.com/p/bullet/issues/detail?id=318
Disable separating distance util (it just costs CPU cycles and is disabled by default in the API anyway)
This commit is contained in:
erwin.coumans
2009-12-13 15:40:21 +00:00
parent 91f1e8117b
commit 8444d0e5c4
4 changed files with 90 additions and 63 deletions

View File

@@ -121,12 +121,16 @@ void btConvexTriangleCallback::processTriangle(btVector3* triangle,int partId, i
ob->internalSetTemporaryCollisionShape( &tm );
btCollisionAlgorithm* colAlgo = ci.m_dispatcher1->findAlgorithm(m_convexBody,m_triBody,m_manifoldPtr);
///this should use the btDispatcher, so the actual registered algorithm is used
// btConvexConvexAlgorithm cvxcvxalgo(m_manifoldPtr,ci,m_convexBody,m_triBody);
m_resultOut->setShapeIdentifiersB(partId,triangleIndex);
if (m_resultOut->getBody0Internal() == m_triBody)
{
m_resultOut->setShapeIdentifiersA(partId,triangleIndex);
}
else
{
m_resultOut->setShapeIdentifiersB(partId,triangleIndex);
}
// cvxcvxalgo.processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut);
colAlgo->processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut);
colAlgo->~btCollisionAlgorithm();
ci.m_dispatcher1->freeCollisionAlgorithm(colAlgo);