Package org.jbox2d.dynamics.joints
Class RopeJoint
java.lang.Object
org.jbox2d.dynamics.joints.Joint
org.jbox2d.dynamics.joints.RopeJoint
A rope joint enforces a maximum distance between two points on two bodies. It
has no other effect. 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 DistanceJoint if you want to
dynamically control length.
- Author:
- Daniel Murphy
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAnchorA(Vec2 argOut) Get the anchor point on bodyA in world coordinates.voidgetAnchorB(Vec2 argOut) Get the anchor point on bodyB in world coordinates.floatvoidgetReactionForce(float invDt, Vec2 argOut) Get the reaction force on body2 at the joint anchor in Newtons.floatgetReactionTorque(float invDt) Get the reaction torque on body2 in N*m.voidInternalvoidsetMaxLength(float maxLength) booleanThis returns true if the position errors are within tolerance.voidInternalMethods inherited from class org.jbox2d.dynamics.joints.Joint
create, destroy, destructor, getBodyA, getBodyB, getCollideConnected, getNext, getType, getUserData, isActive, setUserData
-
Constructor Details
-
RopeJoint
-
-
Method Details
-
initVelocityConstraints
Description copied from class:JointInternal- Specified by:
initVelocityConstraintsin classJoint
-
solveVelocityConstraints
Description copied from class:JointInternal- Specified by:
solveVelocityConstraintsin classJoint
-
solvePositionConstraints
Description copied from class:JointThis returns true if the position errors are within tolerance. Internal.- Specified by:
solvePositionConstraintsin classJoint
-
getAnchorA
Description copied from class:JointGet the anchor point on bodyA in world coordinates.- Specified by:
getAnchorAin classJoint
-
getAnchorB
Description copied from class:JointGet the anchor point on bodyB in world coordinates.- Specified by:
getAnchorBin classJoint
-
getReactionForce
Description copied from class:JointGet the reaction force on body2 at the joint anchor in Newtons.- Specified by:
getReactionForcein classJoint
-
getReactionTorque
public float getReactionTorque(float invDt) Description copied from class:JointGet the reaction torque on body2 in N*m.- Specified by:
getReactionTorquein classJoint
-
getLocalAnchorA
-
getLocalAnchorB
-
getMaxLength
public float getMaxLength() -
setMaxLength
public void setMaxLength(float maxLength) -
getLimitState
-