Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PulleyJointDef

[20:7] extends: JointDef

Wraps jbox2d's PulleyJointDef (com.almasb.fxgl.physics.box2d.dynamics.joints.PulleyJointDef). Fields:

  • groundAnchorA / groundAnchorB — fixed world-space anchors.
  • localAnchorA / localAnchorB — anchors in body-local coords.
  • lengthA / lengthB — reference segment lengths.
  • ratio — pulley ratio (must exceed JBoxSettings.EPSILON).

Methods

  • PulleyJointDef ()

    Creates a new PulleyJointDef with defaults.

  • adopt (object Ajo)

    Wraps an existing PulleyJointDef AussomJavaObject.

  • getGroundAnchorA ()

    Returns the groundAnchorA field as a Vec2 wrapper.

  • getGroundAnchorB ()

    Returns the groundAnchorB field as a Vec2 wrapper.

  • getLocalAnchorA ()

    Returns the localAnchorA field as a Vec2 wrapper.

  • getLocalAnchorB ()

    Returns the localAnchorB field as a Vec2 wrapper.

  • getLengthA ()

  • setLengthA (double V)

  • getLengthB ()

  • setLengthB (double V)

  • getRatio ()

  • setRatio (double V)

  • initialize (object BodyA, object BodyB, object GroundA, object GroundB, object AnchorA, object AnchorB, double Ratio)

    Initialises this def from world anchors and a ratio.

    • @p BodyA, BodyB are Body wrappers.
    • @p GroundA, GroundB are Vec2 wrappers with the fixed world anchors.
    • @p AnchorA, AnchorB are Vec2 wrappers with the body anchors in world coords.
    • @p Ratio is the pulley ratio.