btMultiBodyConstraintSolver writes back the applied impulse for contact points

(added some debugging output for this in the demos, commented-out by default)
This commit is contained in:
erwin coumans
2014-02-24 16:55:54 -08:00
parent dfa738c13a
commit d485f2b272
6 changed files with 122 additions and 13 deletions

View File

@@ -46,6 +46,25 @@ void MultiDofDemo::stepSimulation(float deltaTime)
float internalTimeStep = 1./240.f;
m_dynamicsWorld->stepSimulation(deltaTime,10,internalTimeStep);
// CProfileManager::dumpAll();
/*
for (int i=0;i<m_dynamicsWorld->getDispatcher()->getNumManifolds();i++)
{
btPersistentManifold* contact = m_dynamicsWorld->getDispatcher()->getManifoldByIndexInternal(i);
for (int c=0;c<contact->getNumContacts();c++)
{
btManifoldPoint& pt = contact->getContactPoint(c);
btScalar dist = pt.getDistance();
if (dist< contact->getContactProcessingThreshold())
{
printf("normalImpulse[%d.%d] = %f\n",i,c,pt.m_appliedImpulse);
} else
{
printf("?\n");
}
}
}
*/
}