Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ConstantVolumeJoint

[16:7] extends: Joint

Wraps jbox2d's ConstantVolumeJoint (com.almasb.fxgl.physics.box2d.dynamics.joints.ConstantVolumeJoint). Connects a group of three or more bodies into a closed polygon and constrains them to maintain a constant enclosed volume, driving each pair with an internal DistanceJoint.

Methods

  • ConstantVolumeJoint ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing ConstantVolumeJoint AussomJavaObject.

  • getBodies ()

    Returns the connected bodies as a raw AJO array (Body[]). Caller may adopt individual elements into Body wrappers.

  • getJoints ()

    Returns the internal DistanceJoint array as a raw AJO array. Caller may adopt individual elements into DistanceJoint wrappers.

  • inflate (double Factor)

    Scales the target enclosed volume by the given factor.