/** Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis. */ public void initialize (Body bodyA, Body bodyB, Vector2 anchor) { this.bodyA = bodyA; this.bodyB = bodyB; localAnchorA.set(bodyA.getLocalPoint(anchor)); localAnchorB.set(bodyB.getLocalPoint(anchor)); }
/** Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis. */ public void initialize (Body bodyA, Body bodyB, Vector2 anchor) { this.bodyA = bodyA; this.bodyB = bodyB; localAnchorA.set(bodyA.getLocalPoint(anchor)); localAnchorB.set(bodyB.getLocalPoint(anchor)); }
/** Initialize the bodies, anchors, and length using the world anchors. */ public void initialize (Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB) { this.bodyA = bodyA; this.bodyB = bodyB; this.localAnchorA.set(bodyA.getLocalPoint(anchorA)); this.localAnchorB.set(bodyB.getLocalPoint(anchorB)); this.length = anchorA.dst(anchorB); }
/** Initialize the bodies, anchors, and length using the world anchors. */ public void initialize (Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB) { this.bodyA = bodyA; this.bodyB = bodyB; this.localAnchorA.set(bodyA.getLocalPoint(anchorA)); this.localAnchorB.set(bodyB.getLocalPoint(anchorB)); this.length = anchorA.dst(anchorB); }
/** Initialize the bodies, anchors, and reference angle using a world anchor point. */ public void initialize (Body bodyA, Body bodyB, Vector2 anchor) { this.bodyA = bodyA; this.bodyB = bodyB; localAnchorA.set(bodyA.getLocalPoint(anchor)); localAnchorB.set(bodyB.getLocalPoint(anchor)); referenceAngle = bodyB.getAngle() - bodyA.getAngle(); }
/** Initialize the bodies, anchors, and reference angle using a world anchor point. */ public void initialize (Body body1, Body body2, Vector2 anchor) { this.bodyA = body1; this.bodyB = body2; this.localAnchorA.set(body1.getLocalPoint(anchor)); this.localAnchorB.set(body2.getLocalPoint(anchor)); referenceAngle = body2.getAngle() - body1.getAngle(); }
public void initialize (Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis) { this.bodyA = bodyA; this.bodyB = bodyB; localAnchorA.set(bodyA.getLocalPoint(anchor)); localAnchorB.set(bodyB.getLocalPoint(anchor)); localAxisA.set(bodyA.getLocalVector(axis)); }
public void initialize (Body body1, Body body2, Vector2 anchor) { this.bodyA = body1; this.bodyB = body2; this.localAnchorA.set(body1.getLocalPoint(anchor)); this.localAnchorB.set(body2.getLocalPoint(anchor)); referenceAngle = body2.getAngle() - body1.getAngle(); }
/** Initialize the bodies, anchors, and reference angle using a world anchor point. */ public void initialize (Body bodyA, Body bodyB, Vector2 anchor) { this.bodyA = bodyA; this.bodyB = bodyB; localAnchorA.set(bodyA.getLocalPoint(anchor)); localAnchorB.set(bodyB.getLocalPoint(anchor)); referenceAngle = bodyB.getAngle() - bodyA.getAngle(); }
public void initialize (Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis) { this.bodyA = bodyA; this.bodyB = bodyB; localAnchorA.set(bodyA.getLocalPoint(anchor)); localAnchorB.set(bodyB.getLocalPoint(anchor)); localAxisA.set(bodyA.getLocalVector(axis)); }
/** Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis. */ public void initialize (Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis) { this.bodyA = bodyA; this.bodyB = bodyB; localAnchorA.set(bodyA.getLocalPoint(anchor)); localAnchorB.set(bodyB.getLocalPoint(anchor)); localAxisA.set(bodyA.getLocalVector(axis)); referenceAngle = bodyB.getAngle() - bodyA.getAngle(); }
/** Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis. */ public void initialize (Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis) { this.bodyA = bodyA; this.bodyB = bodyB; localAnchorA.set(bodyA.getLocalPoint(anchor)); localAnchorB.set(bodyB.getLocalPoint(anchor)); localAxisA.set(bodyA.getLocalVector(axis)); referenceAngle = bodyB.getAngle() - bodyA.getAngle(); }
/** Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors. */ public void initialize (Body bodyA, Body bodyB, Vector2 groundAnchorA, Vector2 groundAnchorB, Vector2 anchorA, Vector2 anchorB, float ratio) { this.bodyA = bodyA; this.bodyB = bodyB; this.groundAnchorA.set(groundAnchorA); this.groundAnchorB.set(groundAnchorB); this.localAnchorA.set(bodyA.getLocalPoint(anchorA)); this.localAnchorB.set(bodyB.getLocalPoint(anchorB)); lengthA = anchorA.dst(groundAnchorA); lengthB = anchorB.dst(groundAnchorB); this.ratio = ratio; float C = lengthA + ratio * lengthB; }
/** Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors. */ public void initialize (Body bodyA, Body bodyB, Vector2 groundAnchorA, Vector2 groundAnchorB, Vector2 anchorA, Vector2 anchorB, float ratio) { this.bodyA = bodyA; this.bodyB = bodyB; this.groundAnchorA.set(groundAnchorA); this.groundAnchorB.set(groundAnchorB); this.localAnchorA.set(bodyA.getLocalPoint(anchorA)); this.localAnchorB.set(bodyB.getLocalPoint(anchorB)); lengthA = anchorA.dst(groundAnchorA); lengthB = anchorB.dst(groundAnchorB); this.ratio = ratio; float C = lengthA + ratio * lengthB; }
/** Initialize the bodies and offsets using the current transforms. */ public void initialize (Body body1, Body body2) { this.bodyA = body1; this.bodyB = body2; this.linearOffset.set(bodyA.getLocalPoint(bodyB.getPosition())); this.angularOffset = bodyB.getAngle() - bodyA.getAngle(); }
/** Initialize the bodies and offsets using the current transforms. */ public void initialize (Body body1, Body body2) { this.bodyA = body1; this.bodyB = body2; this.linearOffset.set(bodyA.getLocalPoint(bodyB.getPosition())); this.angularOffset = bodyB.getAngle() - bodyA.getAngle(); }
/** Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis. */ public void initialize (Body bodyA, Body bodyB, Vector2 anchor) { this.bodyA = bodyA; this.bodyB = bodyB; localAnchorA.set(bodyA.getLocalPoint(anchor)); localAnchorB.set(bodyB.getLocalPoint(anchor)); }
/** Initialize the bodies, anchors, and length using the world anchors. */ public void initialize (Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB) { this.bodyA = bodyA; this.bodyB = bodyB; this.localAnchorA.set(bodyA.getLocalPoint(anchorA)); this.localAnchorB.set(bodyB.getLocalPoint(anchorB)); this.length = anchorA.dst(anchorB); }
/** Initialize the bodies, anchors, and reference angle using a world anchor point. */ public void initialize (Body body1, Body body2, Vector2 anchor) { this.bodyA = body1; this.bodyB = body2; this.localAnchorA.set(body1.getLocalPoint(anchor)); this.localAnchorB.set(body2.getLocalPoint(anchor)); referenceAngle = body2.getAngle() - body1.getAngle(); }
/** Initialize the bodies and offsets using the current transforms. */ public void initialize (Body body1, Body body2) { this.bodyA = body1; this.bodyB = body2; this.linearOffset.set(bodyA.getLocalPoint(bodyB.getPosition())); this.angularOffset = bodyB.getAngle() - bodyA.getAngle(); }