initialize method
Initialize the bodies, anchors, and length using the world anchors.
Implementation
void initialize(A body1, B body2, Vector2 anchor1, Vector2 anchor2) {
bodyA = body1;
bodyB = body2;
localAnchorA.setFrom(bodyA.localPoint(anchor1));
localAnchorB.setFrom(bodyB.localPoint(anchor2));
final d = anchor2 - anchor1;
length = d.length;
}