libgdx API

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.


Field Summary
 
Fields inherited from class com.badlogic.gdx.physics.box2d.Joint
addr, jointEdgeA, jointEdgeB
 
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, isActive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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.


libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)