initialize method
Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
Implementation
void initialize(A b1, B b2, Vector2 anchor, Vector2 axis) {
bodyA = b1;
bodyB = b2;
localAnchorA.setFrom(bodyA.localPoint(anchor));
localAnchorB.setFrom(bodyB.localPoint(anchor));
localAxisA.setFrom(bodyA.localVector(axis));
referenceAngle = bodyB.angle - bodyA.angle;
}