Added more asserts for #1678.

This commit is contained in:
hiker 2014-11-12 13:28:33 +11:00
parent f78c7e0779
commit 157bc445b9

View File

@ -379,6 +379,10 @@ void btSequentialImpulseConstraintSolver::setupFrictionConstraint(btSolverConstr
#endif //COMPUTE_IMPULSE_DENOM
btScalar denom = relaxation/(denom0+denom1);
btAssert(!isnan(denom0));
btAssert(!isnan(denom1));
btAssert(!isnan(relaxation));
btAssert(!isnan(denom));
solverConstraint.m_jacDiagABInv = denom;
#ifdef _USE_JACOBIAN
@ -497,7 +501,11 @@ void btSequentialImpulseConstraintSolver::setupContactConstraint(btSolverConstra
#endif //COMPUTE_IMPULSE_DENOM
btScalar denom = relaxation/(denom0+denom1);
solverConstraint.m_jacDiagABInv = denom;
btAssert(!isnan(denom0));
btAssert(!isnan(denom1));
btAssert(!isnan(relaxation));
btAssert(!isnan(denom));
solverConstraint.m_jacDiagABInv = denom;
}
solverConstraint.m_contactNormal = cp.m_normalWorldOnB;
@ -911,7 +919,8 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCol
sum += iMJaA.dot(solverConstraint.m_relpos1CrossNormal);
sum += iMJlB.dot(solverConstraint.m_contactNormal);
sum += iMJaB.dot(solverConstraint.m_relpos2CrossNormal);
btAssert(sum!=0.0);
btAssert(!isnan(sum));
solverConstraint.m_jacDiagABInv = btScalar(1.)/sum;
}