Options
All
  • Public
  • Public/Protected
  • All
Menu

The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio length2 <= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top.

Hierarchy

Index

Constructors

constructor

Methods

GetAnchorA

  • Get the anchor point on bodyA in world coordinates.

    Returns b2Vec2

    Body A anchor.

GetAnchorB

  • Get the anchor point on bodyB in world coordinates.

    Returns b2Vec2

    Body B anchor.

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.

GetGroundAnchorA

  • Get the first ground anchor.

    Returns b2Vec2

GetGroundAnchorB

  • Get the second ground anchor.

    Returns b2Vec2

GetLength1

  • GetLength1(): number
  • Get the current length of the segment attached to body1.

    Returns number

GetLength2

  • GetLength2(): number
  • Get the current length of the segment attached to body2.

    Returns number

GetNext

  • Get the next joint the world joint list.

    Returns b2Joint

    Next joint.

GetRatio

  • GetRatio(): number
  • Get the pulley ratio.

    Returns number

GetReactionForce

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

    Parameters

    • inv_dt: number

    Returns b2Vec2

    Reaction force in N.

GetReactionTorque

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

    Parameters

    • inv_dt: number

    Returns number

    Reaction torque in 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