/** * Gets a local vector given a world vector. * * @param a vector in world coordinates. * @return the corresponding local vector. */ public final Vec2 getLocalVector(Vec2 worldVector) { Vec2 out = new Vec2(); getLocalVectorToOut(worldVector, out); return out; }
public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis) { bodyA = b1; bodyB = b2; b1.getLocalPointToOut(anchor, localAnchorA); b2.getLocalPointToOut(anchor, localAnchorB); bodyA.getLocalVectorToOut(axis, localAxisA); } }
/** * Initialize the bodies, anchors, axis, and reference angle using the world anchor and world * axis. */ public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis) { bodyA = b1; bodyB = b2; bodyA.getLocalPointToOut(anchor, localAnchorA); bodyB.getLocalPointToOut(anchor, localAnchorB); bodyA.getLocalVectorToOut(axis, localAxisA); referenceAngle = bodyB.getAngle() - bodyA.getAngle(); } }
/** * Gets a local vector given a world vector. * * @param a vector in world coordinates. * @return the corresponding local vector. */ public final Vec2 getLocalVector(Vec2 worldVector) { Vec2 out = new Vec2(); getLocalVectorToOut(worldVector, out); return out; }
public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis) { bodyA = b1; bodyB = b2; b1.getLocalPointToOut(anchor, localAnchorA); b2.getLocalPointToOut(anchor, localAnchorB); bodyA.getLocalVectorToOut(axis, localAxisA); } }
/** * Initialize the bodies, anchors, axis, and reference angle using the world anchor and world * axis. */ public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis) { bodyA = b1; bodyB = b2; bodyA.getLocalPointToOut(anchor, localAnchorA); bodyB.getLocalPointToOut(anchor, localAnchorB); bodyA.getLocalVectorToOut(axis, localAxisA); referenceAngle = bodyB.getAngle() - bodyA.getAngle(); } }
/** * Gets a local vector given a world vector. * * @param worldVector vector in world coordinates. * @return the corresponding local vector. */ public final Vec2 getLocalVector(Vec2 worldVector) { Vec2 out = new Vec2(); getLocalVectorToOut(worldVector, out); return out; }
/** * Gets a local vector given a world vector. * * @param a vector in world coordinates. * @return the corresponding local vector. */ public final Vec2 getLocalVector(Vec2 worldVector) { Vec2 out = new Vec2(); getLocalVectorToOut(worldVector, out); return out; }
/** * Gets a local vector given a world vector. * * @param a vector in world coordinates. * @return the corresponding local vector. */ public final Vec2 getLocalVector(Vec2 worldVector) { Vec2 out = new Vec2(); getLocalVectorToOut(worldVector, out); return out; }
public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis) { bodyA = b1; bodyB = b2; b1.getLocalPointToOut(anchor, localAnchorA); b2.getLocalPointToOut(anchor, localAnchorB); bodyA.getLocalVectorToOut(axis, localAxisA); } }
public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis) { bodyA = b1; bodyB = b2; b1.getLocalPointToOut(anchor, localAnchorA); b2.getLocalPointToOut(anchor, localAnchorB); bodyA.getLocalVectorToOut(axis, localAxisA); } }
public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis) { bodyA = b1; bodyB = b2; b1.getLocalPointToOut(anchor, localAnchorA); b2.getLocalPointToOut(anchor, localAnchorB); bodyA.getLocalVectorToOut(axis, localAxisA); } }
/** * Initialize the bodies, anchors, axis, and reference angle using the world anchor and world * axis. */ public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis) { bodyA = b1; bodyB = b2; bodyA.getLocalPointToOut(anchor, localAnchorA); bodyB.getLocalPointToOut(anchor, localAnchorB); bodyA.getLocalVectorToOut(axis, localAxisA); referenceAngle = bodyB.getAngle() - bodyA.getAngle(); } }
/** * Initialize the bodies, anchors, axis, and reference angle using the world anchor and world * axis. */ public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis) { bodyA = b1; bodyB = b2; bodyA.getLocalPointToOut(anchor, localAnchorA); bodyB.getLocalPointToOut(anchor, localAnchorB); bodyA.getLocalVectorToOut(axis, localAxisA); referenceAngle = bodyB.getAngle() - bodyA.getAngle(); } }
/** * Initialize the bodies, anchors, axis, and reference angle using the world * anchor and world axis. */ public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis){ bodyA = b1; bodyB = b2; bodyA.getLocalPointToOut(anchor, localAnchorA); bodyB.getLocalPointToOut(anchor, localAnchorB); bodyA.getLocalVectorToOut(axis, localAxisA); referenceAngle = bodyB.getAngle() - bodyA.getAngle(); } }