Class ConstantVolumeJoint


  • public class ConstantVolumeJoint
    extends Joint
    • 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
    • Method Detail

      • getBodies

        public Body[] getBodies()
      • inflate

        public void inflate​(float factor)
      • destructor

        public void destructor()
        Description copied from class: Joint
        Override to handle destruction of joint
        Overrides:
        destructor in class Joint
      • getBodyArea

        private float getBodyArea()
      • getSolverArea

        private float getSolverArea​(Position[] positions)
      • constrainEdges

        private boolean constrainEdges​(Position[] positions)
      • solvePositionConstraints

        public boolean solvePositionConstraints​(SolverData step)
        Description copied from class: Joint
        This returns true if the position errors are within tolerance.
        Specified by:
        solvePositionConstraints in class Joint
        Returns:
      • getAnchorA

        public void getAnchorA​(Vec2 argOut)
        No-op
        Specified by:
        getAnchorA in class Joint
      • getAnchorB

        public void getAnchorB​(Vec2 argOut)
        No-op
        Specified by:
        getAnchorB in class Joint
      • getReactionForce

        public void getReactionForce​(float inv_dt,
                                     Vec2 argOut)
        No-op
        Specified by:
        getReactionForce in class Joint
      • getReactionTorque

        public float getReactionTorque​(float inv_dt)
        No-op
        Specified by:
        getReactionTorque in class Joint
        Returns: