Class ImpulseJointSet

A set of joints.

To avoid leaking WASM resources, this MUST be freed manually with jointSet.free() once you are done using it (and all the joints it created).

Hierarchy

  • ImpulseJointSet

Constructors

  • Parameters

    • Optional raw: RawImpulseJointSet

    Returns ImpulseJointSet

Properties

map: any
raw: RawImpulseJointSet

Methods

  • Does this set contain a joint with the given handle?

    Parameters

    • handle: number

      The joint handle to check.

    Returns boolean

  • Creates a new joint and return its integer handle.

    Parameters

    • bodies: RigidBodySet

      The set of rigid-bodies containing the bodies the joint is attached to.

    • desc: JointData

      The joint's parameters.

    • parent1: number

      The handle of the first rigid-body this joint is attached to.

    • parent2: number

      The handle of the second rigid-body this joint is attached to.

    • wakeUp: boolean

      Should the attached rigid-bodies be awakened?

    Returns ImpulseJoint

  • Internal

    Parameters

    Returns void

  • Applies the given closure to each joint contained by this set.

    Parameters

    Returns void

  • Calls the given closure with the integer handle of each impulse joint attached to this rigid-body.

    Parameters

    • handle: number
    • f: ((handle: number) => void)

      The closure called with the integer handle of each impulse joint attached to the rigid-body.

        • (handle: number): void
        • Parameters

          • handle: number

          Returns void

    Returns void

  • Release the WASM memory occupied by this joint set.

    Returns void

  • Gets the joint with the given handle.

    Returns null if no joint with the specified handle exists.

    Parameters

    • handle: number

      The integer handle of the joint to retrieve.

    Returns ImpulseJoint

  • Gets all joints in the list.

    Returns

    joint list.

    Returns ImpulseJoint[]

  • The number of joints on this set.

    Returns number

  • Remove a joint from this set.

    Parameters

    • handle: number

      The integer handle of the joint.

    • wakeUp: boolean

      If true, the rigid-bodies attached by the removed joint will be woken-up automatically.

    Returns void

  • Internal function, do not call directly.

    Parameters

    • handle: number

    Returns void

Generated using TypeDoc