# Class ConstantVolumeJointDef

java.lang.Object
com.codename1.gaming.physics.box2d.dynamics.joints.JointDef
com.codename1.gaming.physics.box2d.dynamics.joints.ConstantVolumeJointDef

public class ConstantVolumeJointDef extends JointDef
Definition for a `ConstantVolumeJoint`, which connects a group a bodies together so they maintain a constant volume within them.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `float`
  `dampingRatio`
  `float`
  `frequencyHz`

  ### Fields inherited from class JointDef

  `bodyA, bodyB, collideConnected, type, userData`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ConstantVolumeJointDef()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addBody(Body argBody)`
  Adds a body to the group
  `void`
  `addBodyAndJoint(Body argBody, DistanceJoint argJoint)`
  Adds a body and the pre-made distance joint.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### frequencyHz

    public float frequencyHz

  - ### dampingRatio

    public float dampingRatio

- ## Constructor Details

  - ### ConstantVolumeJointDef

    public ConstantVolumeJointDef()

- ## Method Details

  - ### addBody

    public void addBody(Body argBody)
    Adds a body to the group
    Parameters:
      `argBody` -

  - ### addBodyAndJoint

    public void addBodyAndJoint(Body argBody, DistanceJoint argJoint)
    Adds a body and the pre-made distance joint. Should only be used for deserialization.