computeImpulseDenominator method

double computeImpulseDenominator(
  1. Body body,
  2. Vec3 pos,
  3. Vec3 normal
)

Implementation

double computeImpulseDenominator(Body body,Vec3 pos,Vec3 normal){
  final r0 = _computeImpulseDenominatorR0;
  final c0 = _computeImpulseDenominatorC0;
  final vec = _computeImpulseDenominatorVec;
  final m = _computeImpulseDenominatorM;

  pos.vsub(body.position, r0);
  r0.cross(normal, c0);
  body.invInertiaWorld.vmult(c0, m);
  m.cross(r0, vec);

  return body.invMass + normal.dot(vec);
}