Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PrismaticJointDef

[23:7] extends: JointDef

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

  • localAnchorA / localAnchorB — anchor points in body-local coords.
  • localAxisA — translation axis in bodyA local coords.
  • referenceAngle — body2_angle - body1_angle (radians).
  • enableLimit — enable joint translation limits.
  • lowerTranslation / upperTranslation — limits in meters.
  • enableMotor — enable the joint motor.
  • maxMotorForce — motor force cap, usually in N.
  • motorSpeed — desired motor speed.

Methods

  • PrismaticJointDef ()

    Creates a new PrismaticJointDef with defaults.

  • adopt (object Ajo)

    Wraps an existing PrismaticJointDef AussomJavaObject.

  • getLocalAnchorA ()

    Returns the localAnchorA field as a Vec2 wrapper.

  • getLocalAnchorB ()

    Returns the localAnchorB field as a Vec2 wrapper.

  • getLocalAxisA ()

    Returns the localAxisA field as a Vec2 wrapper.

  • getReferenceAngle ()

  • setReferenceAngle (double V)

  • getEnableLimit ()

  • setEnableLimit (bool V)

  • getLowerTranslation ()

  • setLowerTranslation (double V)

  • getUpperTranslation ()

  • setUpperTranslation (double V)

  • getEnableMotor ()

  • setEnableMotor (bool V)

  • getMaxMotorForce ()

  • setMaxMotorForce (double V)

  • getMotorSpeed ()

  • setMotorSpeed (double V)

  • initialize (object BodyA, object BodyB, object Anchor, object Axis)

    Initialises this def from a world anchor and a world axis.

    • @p BodyA, BodyB are Body wrappers.
    • @p Anchor is a Vec2 wrapper in world coords.
    • @p Axis is a Vec2 wrapper in world coords.