Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NarrowPhase

The narrow-phase used for precise collision-detection. The narrow-phase used for precise collision-detection.

To avoid leaking WASM resources, this MUST be freed manually with narrowPhase.free() once you are done using it.

To avoid leaking WASM resources, this MUST be freed manually with narrowPhase.free() once you are done using it.

Hierarchy

  • NarrowPhase

Index

Constructors

constructor

  • Parameters

    • Optional raw: RawNarrowPhase

    Returns NarrowPhase

  • Parameters

    • Optional raw: RawNarrowPhase

    Returns NarrowPhase

Properties

raw

raw: RawNarrowPhase

tempManifold

tempManifold: TempContactManifold

Methods

contactPair

  • Iterates through all the contact manifolds between the given pair of colliders.

    Parameters

    • collider1: ColliderHandle

      The first collider involved in the contact.

    • collider2: ColliderHandle

      The second collider involved in the contact.

    • f: (manifold: TempContactManifold, flipped: boolean) => void

      Closure that will be called on each contact manifold between the two colliders. If the second argument passed to this closure is true, then the contact manifold data is flipped, i.e., methods like localNormal1 actually apply to the collider2 and fields like localNormal2 apply to the collider1.

    Returns void

  • Iterates through all the contact manifolds between the given pair of colliders.

    Parameters

    • collider1: ColliderHandle

      The first collider involved in the contact.

    • collider2: ColliderHandle

      The second collider involved in the contact.

    • f: (manifold: TempContactManifold, flipped: boolean) => void

      Closure that will be called on each contact manifold between the two colliders. If the second argument passed to this closure is true, then the contact manifold data is flipped, i.e., methods like localNormal1 actually apply to the collider2 and fields like localNormal2 apply to the collider1.

    Returns void

contactsWith

  • Enumerates all the colliders potentially in contact with the given collider.

    Parameters

    Returns void

  • Enumerates all the colliders potentially in contact with the given collider.

    Parameters

    Returns void

free

  • free(): void
  • free(): void
  • Release the WASM memory occupied by this narrow-phase.

    Returns void

  • Release the WASM memory occupied by this narrow-phase.

    Returns void

intersectionPair

  • Returns true if collider1 and collider2 intersect and at least one of them is a sensor.

    Parameters

    • collider1: ColliderHandle

      − The first collider involved in the intersection.

    • collider2: ColliderHandle

      − The second collider involved in the intersection.

    Returns boolean

  • Returns true if collider1 and collider2 intersect and at least one of them is a sensor.

    Parameters

    • collider1: ColliderHandle

      − The first collider involved in the intersection.

    • collider2: ColliderHandle

      − The second collider involved in the intersection.

    Returns boolean

intersectionsWith

  • Enumerates all the colliders intersecting the given colliders, assuming one of them is a sensor.

    Parameters

    Returns void

  • Enumerates all the colliders intersecting the given colliders, assuming one of them is a sensor.

    Parameters

    Returns void

Generated using TypeDoc