org.jbox2d.dynamics.joints
Class PulleyJointDef

java.lang.Object
  extended by org.jbox2d.dynamics.joints.JointDef
      extended by org.jbox2d.dynamics.joints.PulleyJointDef

public class PulleyJointDef
extends JointDef

Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, and a pulley ratio.

Author:
Daniel Murphy

Field Summary
 Vec2 groundAnchorA
          The first ground anchor in world coordinates.
 Vec2 groundAnchorB
          The second ground anchor in world coordinates.
 float lengthA
          The a reference length for the segment attached to bodyA.
 float lengthB
          The a reference length for the segment attached to bodyB.
 Vec2 localAnchorA
          The local anchor point relative to bodyA's origin.
 Vec2 localAnchorB
          The local anchor point relative to bodyB's origin.
 float ratio
          The pulley ratio, used to simulate a block-and-tackle.
 
Fields inherited from class org.jbox2d.dynamics.joints.JointDef
bodyA, bodyB, collideConnected, type, userData
 
Constructor Summary
PulleyJointDef()
           
 
Method Summary
 void initialize(Body b1, Body b2, Vec2 ga1, Vec2 ga2, Vec2 anchor1, Vec2 anchor2, float r)
          Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groundAnchorA

public Vec2 groundAnchorA
The first ground anchor in world coordinates. This point never moves.


groundAnchorB

public Vec2 groundAnchorB
The second ground anchor in world coordinates. This point never moves.


localAnchorA

public Vec2 localAnchorA
The local anchor point relative to bodyA's origin.


localAnchorB

public Vec2 localAnchorB
The local anchor point relative to bodyB's origin.


lengthA

public float lengthA
The a reference length for the segment attached to bodyA.


lengthB

public float lengthB
The a reference length for the segment attached to bodyB.


ratio

public float ratio
The pulley ratio, used to simulate a block-and-tackle.

Constructor Detail

PulleyJointDef

public PulleyJointDef()
Method Detail

initialize

public void initialize(Body b1,
                       Body b2,
                       Vec2 ga1,
                       Vec2 ga2,
                       Vec2 anchor1,
                       Vec2 anchor2,
                       float r)
Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.



Copyright © 2013. All Rights Reserved.