initialize method

void initialize(
  1. Body bA,
  2. Body bB,
  3. Vector2 anchor
)

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

Implementation

void initialize(Body bA, Body bB, Vector2 anchor) {
  bodyA = bA;
  bodyB = bB;
  bA.getLocalPointToOut(anchor, localAnchorA);
  bB.getLocalPointToOut(anchor, localAnchorB);
}