|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.physics.box2d.JointDef com.badlogic.gdx.physics.box2d.joints.DistanceJointDef
public class DistanceJointDef
Distance joint definition. This requires defining an anchor point on both bodies and the non-zero length of the distance joint. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.badlogic.gdx.physics.box2d.JointDef |
---|
JointDef.JointType |
Field Summary | |
---|---|
float |
dampingRatio
The damping ratio. |
float |
frequencyHz
The mass-spring-damper frequency in Hertz. |
float |
length
The natural length between the anchor points. |
Vector2 |
localAnchorA
The local anchor point relative to body1's origin. |
Vector2 |
localAnchorB
The local anchor point relative to body2's origin. |
Fields inherited from class com.badlogic.gdx.physics.box2d.JointDef |
---|
bodyA, bodyB, collideConnected, type |
Constructor Summary | |
---|---|
DistanceJointDef()
|
Method Summary | |
---|---|
void |
initialize(Body bodyA,
Body bodyB,
Vector2 anchorA,
Vector2 anchorB)
Initialize the bodies, anchors, and length using the world anchors. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Vector2 localAnchorA
public final Vector2 localAnchorB
public float length
public float frequencyHz
public float dampingRatio
Constructor Detail |
---|
public DistanceJointDef()
Method Detail |
---|
public void initialize(Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |