initialize method

void initialize(
  1. A bodyA,
  2. B bodyB,
  3. Vector2 anchor
)

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

Implementation

void initialize(A bodyA, B bodyB, Vector2 anchor) {
  this.bodyA = bodyA;
  this.bodyB = bodyB;
  localAnchorA.setFrom(bodyA.localPoint(anchor));
  localAnchorB.setFrom(bodyB.localPoint(anchor));
}