Home | History | Annotate | Download | only in joints
      1 package org.jbox2d.dynamics.joints;
      2 
      3 import org.jbox2d.common.Vec2;
      4 
      5 /**
      6  * Rope joint definition. This requires two body anchor points and a maximum lengths. Note: by
      7  * default the connected objects will not collide. see collideConnected in b2JointDef.
      8  *
      9  * @author Daniel Murphy
     10  */
     11 public class RopeJointDef extends JointDef {
     12 
     13   /**
     14    * The local anchor point relative to bodyA's origin.
     15    */
     16   public final Vec2 localAnchorA = new Vec2();
     17 
     18   /**
     19    * The local anchor point relative to bodyB's origin.
     20    */
     21   public final Vec2 localAnchorB = new Vec2();
     22 
     23   /**
     24    * The maximum length of the rope. Warning: this must be larger than b2_linearSlop or the joint
     25    * will have no effect.
     26    */
     27   public float maxLength;
     28 
     29   public RopeJointDef() {
     30     super(JointType.ROPE);
     31     localAnchorA.set(-1.0f, 0.0f);
     32     localAnchorB.set(1.0f, 0.0f);
     33   }
     34 }
     35