libgdx API

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

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

public class DistanceJoint
extends Joint

A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.


Field Summary
 
Fields inherited from class com.badlogic.gdx.physics.box2d.Joint
addr, jointEdgeA, jointEdgeB
 
Constructor Summary
DistanceJoint(World world, long addr)
           
 
Method Summary
 float getDampingRatio()
          Set/get damping ratio.
 float getFrequency()
          Set/get frequency in Hz.
 float getLength()
          Set/get the natural length.
 void setDampingRatio(float ratio)
          Set/get damping ratio.
 void setFrequency(float hz)
          Set/get frequency in Hz.
 void setLength(float length)
          Set/get the natural length.
 
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

DistanceJoint

public DistanceJoint(World world,
                     long addr)
Method Detail

setLength

public void setLength(float length)
Set/get the natural length. Manipulating the length can lead to non-physical behavior when the frequency is zero.


getLength

public float getLength()
Set/get the natural length. Manipulating the length can lead to non-physical behavior when the frequency is zero.


setFrequency

public void setFrequency(float hz)
Set/get frequency in Hz.


getFrequency

public float getFrequency()
Set/get frequency in Hz.


setDampingRatio

public void setDampingRatio(float ratio)
Set/get damping ratio.


getDampingRatio

public float getDampingRatio()
Set/get damping ratio.


libgdx API

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