| Modifier and Type | Field and Description |
|---|---|
| public float | dampingRatio
The damping ratio. |
| public float | frequencyHz
The mass-spring-damper frequency in Hertz. |
| public float | length
The natural length between the anchor points. |
| public final Vector2 | localAnchorA
The local anchor point relative to body1's origin. |
| public final Vector2 | localAnchorB
The local anchor point relative to body2's origin. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | initialize(Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB)
Initialize the bodies, anchors, and length using the world anchors. |
| dampingRatio | back to summary |
|---|---|
| public float dampingRatio The damping ratio. 0 = no damping, 1 = critical damping. | |
| frequencyHz | back to summary |
|---|---|
| public float frequencyHz The mass-spring-damper frequency in Hertz. | |
| length | back to summary |
|---|---|
| public float length The natural length between the anchor points. | |
| localAnchorA | back to summary |
|---|---|
| public final Vector2 localAnchorA The local anchor point relative to body1's origin. | |
| localAnchorB | back to summary |
|---|---|
| public final Vector2 localAnchorB The local anchor point relative to body2's origin. | |
| DistanceJointDef | back to summary |
|---|---|
| public DistanceJointDef() | |
| initialize | back to summary |
|---|---|
| public void initialize(Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB) Initialize the bodies, anchors, and length using the world anchors. | |