bugfix for compound versus concave: compute the DeltaC2 after computing the (child) transforms for proper center

This commit is contained in:
erwin coumans
2013-04-12 13:02:35 -07:00
parent ec0d2ed523
commit 07b89beb39
9 changed files with 75 additions and 56 deletions

View File

@@ -357,12 +357,18 @@ void btConvexUtility::initialize()
edge.normalize();
bool found = false;
btVector3 diff,diff2;
for (int p=0;p<m_uniqueEdges.size();p++)
{
if (IsAlmostZero(m_uniqueEdges[p]-edge) ||
IsAlmostZero(m_uniqueEdges[p]+edge))
diff = m_uniqueEdges[p]-edge;
diff2 = m_uniqueEdges[p]+edge;
// if ((diff.length2()==0.f) ||
// (diff2.length2()==0.f))
if (IsAlmostZero(diff) ||
IsAlmostZero(diff2))
{
found = true;
break;
@@ -376,8 +382,9 @@ void btConvexUtility::initialize()
if (edptr)
{
btAssert(edptr->m_face0>=0);
btAssert(edptr->m_face1<0);
//TBD: figure out why I added this assert
// btAssert(edptr->m_face0>=0);
// btAssert(edptr->m_face1<0);
edptr->m_face1 = i;
} else
{