initialize method

void initialize(
  1. Body b1,
  2. Body b2,
  3. Vector2 anchor,
  4. Vector2 axis

Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.


void initialize(Body b1, Body b2, Vector2 anchor, Vector2 axis) {
  bodyA = b1;
  bodyB = b2;
  bodyA.getLocalPointToOut(anchor, localAnchorA);
  bodyB.getLocalPointToOut(anchor, localAnchorB);
  bodyA.getLocalVectorToOut(axis, localAxisA);
  referenceAngle = bodyB.getAngle() - bodyA.getAngle();