29 m_contactManifold(*contactManifold)
85 const btVector3& normal = contactNormalOnB;
94 rel_vel = normal.
dot(vel);
97 btScalar restitution = combinedRestitution* -rel_vel;
100 btScalar velocityError = -(1.0f + restitution) * rel_vel;
104 btScalar jacDiagABInv = relaxation/(denom0+denom1);
106 btScalar penetrationImpulse = positionalError * jacDiagABInv;
107 btScalar velocityImpulse = velocityError * jacDiagABInv;
109 btScalar normalImpulse = penetrationImpulse+velocityImpulse;
110 normalImpulse = 0.f > normalImpulse ? 0.f: normalImpulse;
116 return normalImpulse;
153 btScalar rel_vel = jac.getRelativeVelocity(
162 rel_vel = normal.dot(vel);
167 #ifdef ONLY_USE_LINEAR_MASS
169 impulse = - contactDamping * rel_vel * massTerm;
171 btScalar velocityImpulse = -contactDamping * rel_vel * jacDiagABInv;
172 impulse = velocityImpulse;