Options
All
  • Public
  • Public/Protected
  • All
Menu

A revolute joint constrains to bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.

Hierarchy

Index

Constructors

Methods

  • EnableLimit(flag: boolean): void
  • Enable/disable the joint limit.

    Parameters

    • flag: boolean

      True to enable, false to disable.

    Returns void

  • EnableMotor(flag: boolean): void
  • Enable/disable the joint motor.

    Parameters

    • flag: boolean

      True to enable, false to diasable.

    Returns void

  • GetJointAngle(): number
  • GetJointSpeed(): number
  • GetLowerLimit(): number
  • GetMotorSpeed(): number
  • GetMotorTorque(): number
  • GetReactionForce(inv_dt: number): b2Vec2
  • GetReactionTorque(inv_dt: number): number
  • GetType(): number
  • GetUpperLimit(): number
  • GetUserData(): any
  • IsActive(): boolean
  • IsLimitEnabled(): boolean
  • IsMotorEnabled(): boolean
  • SetLimits(lower: number, upper: number): void
  • Set the joint limits in radians.

    Parameters

    • lower: number

      New lower limit.

    • upper: number

      New upper limit.

    Returns void

  • SetMaxMotorTorque(torque: number): void
  • Set the maximum motor torque, usually in N-m.

    Parameters

    • torque: number

      New max torque.

    Returns void

  • SetMotorSpeed(speed: number): void
  • Set the motor speed in radians per second.

    Parameters

    • speed: number

      New motor speed.

    Returns void

  • SetUserData(data: any): void

Generated using TypeDoc