Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GearJointDef

[17:7] extends: JointDef

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

  • joint1 / joint2 — existing revolute or prismatic joints, each attaching a dynamic body to a static body.
  • ratio — gear ratio (may be negative).

Methods

  • GearJointDef ()

    Creates a new GearJointDef with defaults.

  • adopt (object Ajo)

    Wraps an existing GearJointDef AussomJavaObject.

  • getJoint1 ()

    Returns the joint1 field as a raw AJO.

  • setJoint1 (object JointObj)

    Sets joint1; expects a Joint wrapper.

  • getJoint2 ()

    Returns the joint2 field as a raw AJO.

  • setJoint2 (object JointObj)

    Sets joint2; expects a Joint wrapper.

  • getRatio ()

  • setRatio (double V)