com.badlogic.gdx.physics.box2d.joints
Class PulleyJoint

java.lang.Object
  extended by com.badlogic.gdx.physics.box2d.Joint
      extended by com.badlogic.gdx.physics.box2d.joints.PulleyJoint

public class PulleyJoint
extends Joint

The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio * length2 <= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top.


Constructor Summary
PulleyJoint(World world, long addr)
           
 
Method Summary
 Vector2 getGroundAnchorA()
           
 Vector2 getGroundAnchorB()
           
 float getLength1()
          Get the current length of the segment attached to body1.
 float getLength2()
          Get the current length of the segment attached to body2.
 float getRatio()
          Get the pulley ratio.
 
Methods inherited from class com.badlogic.gdx.physics.box2d.Joint
getAnchorA, getAnchorB, getBodyA, getBodyB, getReactionForce, getReactionTorque, getType, getUserData, isActive, setUserData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PulleyJoint

public PulleyJoint(World world,
                   long addr)
Method Detail

getGroundAnchorA

public Vector2 getGroundAnchorA()

getGroundAnchorB

public Vector2 getGroundAnchorB()

getLength1

public float getLength1()
Get the current length of the segment attached to body1.


getLength2

public float getLength2()
Get the current length of the segment attached to body2.


getRatio

public float getRatio()
Get the pulley ratio.



Copyright © 2013. All Rights Reserved.