solveGroupCacheFriendly func

sandeep_slash
Posts: 48
Joined: Thu Jul 10, 2008 6:36 pm

solveGroupCacheFriendly func

Post by sandeep_slash »

In btSequentialImpulseConstraintSolver::solveGroupCacheFriendly() function...

I see something like this:

Code: Select all

pt->m_appliedImpulse = solveManifold.m_appliedImpulse;
pt->m_appliedImpulseLateral1 = m_tmpSolverFrictionConstraintPool[solveManifold.m_frictionIndex].m_appliedImpulse;
pt->m_appliedImpulseLateral1 = m_tmpSolverFrictionConstraintPool[solveManifold.m_frictionIndex+1].m_appliedImpulse;


m_appliedImpulseLateral1 value is overridden in the 3rd statement? Is this intentional?.... or Should it actualy be m_appliedImpulseLateral2?

Thanks.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: solveGroupCacheFriendly func

Post by Erwin Coumans »

This is an obvious copy/paste bug, now fixed:

http://code.google.com/p/bullet/source/detail?r=1385

The lateral applied impulse is used to warmstart the friction impulse, two directions orthogonal to the normal contact impulse.

Thanks for the report!
Erwin
ramsampath
Posts: 19
Joined: Fri Sep 05, 2008 8:54 pm

Re: solveGroupCacheFriendly func

Post by ramsampath »

In line with this, the solveGroup func doesn't seem to set the m_appliedImpulse for the manifold point. It seems to be set only in solveGroupCacheFriendly, Is that on purpose ?

So, If the contact solver info is not set to cache friendly, then the m_appliedImpulse for the manifold point always seems to be 0.