Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: JointDef

[20:7] extends: FxObj

Wraps jbox2d's JointDef abstract base (com.almasb.fxgl.physics.box2d.dynamics.joints.JointDef). The base carries the two connected bodies, the collide-connected flag, and the optional user data; the concrete subclasses (DistanceJointDef, RevoluteJointDef, ...) add the per-joint geometry / limits / motor parameters. Cannot be instantiated directly — use one of the concrete *JointDef wrappers or adopt an existing AJO.

Methods

  • JointDef ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing JointDef AussomJavaObject.

  • getBodyA ()

    Returns the first connected Body wrapper (or null).

  • setBodyA (object BodyObj)

  • getBodyB ()

    Returns the second connected Body wrapper (or null).

  • setBodyB (object BodyObj)

  • isBodyCollisionAllowed ()

  • setBodyCollisionAllowed (bool V)

  • getUserData ()

  • setUserData (Data)