Options
All
  • Public
  • Public/Protected
  • All
Menu

The base joint class. Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors.

Hierarchy

Index

Constructors

constructor

Methods

GetAnchorA

  • Get the anchor point on bodyA in world coordinates.

    Returns b2Vec2

    Anchor A point.

GetAnchorB

  • Get the anchor point on bodyB in world coordinates.

    Returns b2Vec2

    Anchor B point.

GetBodyA

  • Get the first body attached to this joint.

    Returns b2Body

    Body A.

GetBodyB

  • Get the second body attached to this joint.

    Returns b2Body

    Body B.

GetNext

  • Get the next joint the world joint list.

    Returns b2Joint

    Next joint.

GetReactionForce

  • GetReactionForce(inv_dt: number): b2Vec2
  • Get the reaction force on body2 at the joint anchor in Newtons.

    Parameters

    • inv_dt: number

    Returns b2Vec2

    Reaction force (N)

GetReactionTorque

  • GetReactionTorque(inv_dt: number): number
  • Get the reaction torque on body2 in N.

    Parameters

    • inv_dt: number

    Returns number

    Reaction torque (N).

GetType

  • GetType(): number
  • Get the type of the concrete joint.

    Returns number

    Joint type.

GetUserData

  • GetUserData(): any
  • Get the user data pointer.

    Returns any

    User data. Cast to your data type.

IsActive

  • IsActive(): boolean
  • Short-cut function to determine if either body is inactive.

    Returns boolean

    True if active, otherwise false.

SetUserData

  • SetUserData(data: any): void
  • Set the user data pointer.

    Parameters

    • data: any

      Your custom data.

    Returns void

Generated using TypeDoc