Package org.jbox2d.dynamics.joints
Class ConstantVolumeJoint
- java.lang.Object
-
- org.jbox2d.dynamics.joints.Joint
-
- org.jbox2d.dynamics.joints.ConstantVolumeJoint
-
public class ConstantVolumeJoint extends Joint
-
-
Field Summary
Fields Modifier and Type Field Description private Body[]bodiesprivate DistanceJoint[]distanceJointsprivate floatm_impulseprivate Vec2[]normalsprivate float[]targetLengthsprivate floattargetVolumeprivate Worldworld-
Fields inherited from class org.jbox2d.dynamics.joints.Joint
m_bodyA, m_bodyB, m_edgeA, m_edgeB, m_islandFlag, m_next, m_prev, m_userData, pool
-
-
Constructor Summary
Constructors Constructor Description ConstantVolumeJoint(World argWorld, ConstantVolumeJointDef def)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanconstrainEdges(Position[] positions)voiddestructor()Override to handle destruction of jointvoidgetAnchorA(Vec2 argOut)No-opvoidgetAnchorB(Vec2 argOut)No-opBody[]getBodies()private floatgetBodyArea()DistanceJoint[]getJoints()voidgetReactionForce(float inv_dt, Vec2 argOut)No-opfloatgetReactionTorque(float inv_dt)No-opprivate floatgetSolverArea(Position[] positions)voidinflate(float factor)voidinitVelocityConstraints(SolverData step)booleansolvePositionConstraints(SolverData step)This returns true if the position errors are within tolerance.voidsolveVelocityConstraints(SolverData step)-
Methods inherited from class org.jbox2d.dynamics.joints.Joint
create, destroy, getBodyA, getBodyB, getCollideConnected, getNext, getType, getUserData, isActive, setUserData
-
-
-
-
Field Detail
-
bodies
private final Body[] bodies
-
targetLengths
private float[] targetLengths
-
targetVolume
private float targetVolume
-
normals
private Vec2[] normals
-
m_impulse
private float m_impulse
-
world
private World world
-
distanceJoints
private DistanceJoint[] distanceJoints
-
-
Constructor Detail
-
ConstantVolumeJoint
public ConstantVolumeJoint(World argWorld, ConstantVolumeJointDef def)
-
-
Method Detail
-
getBodies
public Body[] getBodies()
-
getJoints
public DistanceJoint[] getJoints()
-
inflate
public void inflate(float factor)
-
destructor
public void destructor()
Description copied from class:JointOverride to handle destruction of joint- Overrides:
destructorin classJoint
-
getBodyArea
private float getBodyArea()
-
getSolverArea
private float getSolverArea(Position[] positions)
-
constrainEdges
private boolean constrainEdges(Position[] positions)
-
initVelocityConstraints
public void initVelocityConstraints(SolverData step)
- Specified by:
initVelocityConstraintsin classJoint
-
solvePositionConstraints
public boolean solvePositionConstraints(SolverData step)
Description copied from class:JointThis returns true if the position errors are within tolerance.- Specified by:
solvePositionConstraintsin classJoint- Returns:
-
solveVelocityConstraints
public void solveVelocityConstraints(SolverData step)
- Specified by:
solveVelocityConstraintsin classJoint
-
getAnchorA
public void getAnchorA(Vec2 argOut)
No-op- Specified by:
getAnchorAin classJoint
-
getAnchorB
public void getAnchorB(Vec2 argOut)
No-op- Specified by:
getAnchorBin classJoint
-
getReactionForce
public void getReactionForce(float inv_dt, Vec2 argOut)No-op- Specified by:
getReactionForcein classJoint
-
getReactionTorque
public float getReactionTorque(float inv_dt)
No-op- Specified by:
getReactionTorquein classJoint- Returns:
-
-