btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations(...)
{
float totalEnergy = 0;
for ( iteration = 0;iteration<infoGlobal.m_numIterations;iteration++)
{
....
///solve all joint constraints, using SIMD, if available
for (j=0;j<m_tmpSolverNonContactConstraintPool.size();j++)
{
btSolverConstraint& constraint = m_tmpSolverNonContactConstraintPool[j];
resolveSingleConstraintRowGenericSIMD(m_tmpSolverBodyPool[constraint.m_solverBodyIdA],m_tmpSolverBodyPool[constraint.m_solverBodyIdB],constraint);
}
...
}
// at the end :
// sum (squared) the appliedimpulse field of the 6th "row" (btSolverConstraint struct for limit and motor calculation) of each hinge joint
for (j=0;j<m_tmpSolverNonContactConstraintPool.size();j++)
{
if (j is the 6th row of a hingeJoint)
{
float imp = m_tmpSolverNonContactConstraintPool[i].m_appliedImpulse;
totalEnergyOfTheStep += imp*imp;
}
}
}
but I don't know how to code that : if (j is the 6th row of a hingeJoint)