appliedImpulse = 0f;
Vector3f normal = Stack.alloc(Vector3f.class);
normal.set(0f, 0f, 0f);
Matrix3f tmpMat1 = Stack.alloc(Matrix3f.class);
Matrix3f tmpMat2 = Stack.alloc(Matrix3f.class);
Vector3f tmp1 = Stack.alloc(Vector3f.class);
Vector3f tmp2 = Stack.alloc(Vector3f.class);
Vector3f tmpVec = Stack.alloc(Vector3f.class);
Transform centerOfMassA = rbA.getCenterOfMassTransform(Stack.alloc(Transform.class));
Transform centerOfMassB = rbB.getCenterOfMassTransform(Stack.alloc(Transform.class));
for (int i = 0; i < 3; i++) {
VectorUtil.setCoord(normal, i, 1f);
tmpMat1.transpose(centerOfMassA.basis);
tmpMat2.transpose(centerOfMassB.basis);
tmp1.set(pivotInA);
centerOfMassA.transform(tmp1);
tmp1.sub(rbA.getCenterOfMassPosition(tmpVec));