Warning
if you attempt to change the maximum length during the simulation you will get some non-physical behavior. A model that would allow you to dynamically modify the length would have some sponginess, so I chose not to implement it that way. See b2DistanceJoint if you want to dynamically control length.
| Modifier and Type | Field and Description |
|---|---|
| private final Vector2 | |
| private final Vector2 | |
| private final float[] |
| Modifier and Type | Method and Description |
|---|---|
| public Vector2 | |
| public Vector2 | |
| public float | |
| private native void | |
| private native void | |
| private native float | |
| private native void | |
| public void |
| localAnchorA | back to summary |
|---|---|
| private final Vector2 localAnchorA | |
| localAnchorB | back to summary |
|---|---|
| private final Vector2 localAnchorB | |
| tmp | back to summary |
|---|---|
| private final float[] tmp | |
| RopeJoint | back to summary |
|---|---|
| public RopeJoint(World world, long addr) | |
| getLocalAnchorA | back to summary |
|---|---|
| public Vector2 getLocalAnchorA() | |
| getLocalAnchorB | back to summary |
|---|---|
| public Vector2 getLocalAnchorB() | |
| getMaxLength | back to summary |
|---|---|
| public float getMaxLength() Get the maximum length of the rope. | |
| jniGetLocalAnchorA | back to summary |
|---|---|
| private native void jniGetLocalAnchorA(long addr, float[] anchor) | |
| jniGetLocalAnchorB | back to summary |
|---|---|
| private native void jniGetLocalAnchorB(long addr, float[] anchor) | |
| jniGetMaxLength | back to summary |
|---|---|
| private native float jniGetMaxLength(long addr) | |
| jniSetMaxLength | back to summary |
|---|---|
| private native void jniSetMaxLength(long addr, float length) | |
| setMaxLength | back to summary |
|---|---|
| public void setMaxLength(float length) Set the maximum length of the rope. | |