예제 #1
0
 /// Initialize the bodies, anchors, axis, and reference angle using the world
 /// anchor and world axis.
 public void Initialize(Body bodyA, Body bodyB, Vec2 anchor, Vec2 axis)
 {
     BodyA = bodyA;
     BodyB = bodyB;
     _localAnchorA = bodyA.GetLocalPoint(anchor);
     _localAnchorB = bodyB.GetLocalPoint(anchor);
     _localAxisA = bodyA.GetLocalVector(axis);
 }
예제 #2
0
 public void Initialize(Body bodyA, Body bodyB, Vec2 anchor, Vec2 axis)
 {
     BodyA = bodyA;
     BodyB = bodyB;
     _localAnchorA = bodyA.GetLocalPoint(anchor);
     _localAnchorB = bodyB.GetLocalPoint(anchor);
     _localAxis1 = bodyA.GetLocalVector(axis);
     _referenceAngle = bodyB.Angle - bodyA.Angle;
 }