Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NaiveCollisionBroadphase

Hierarchy

  • NaiveCollisionBroadphase

Implements

Index

Methods

broadphase

  • broadphase(targets: Actor[], delta: number): Pair[]
  • Detects potential collision pairs in a broadphase approach with the dynamic aabb tree strategy

    Parameters

    • targets: Actor[]
    • delta: number

    Returns Pair[]

debugDraw

  • debugDraw(ctx: CanvasRenderingContext2D, delta: number): void
  • Parameters

    • ctx: CanvasRenderingContext2D
    • delta: number

    Returns void

narrowphase

  • narrowphase(pairs: Pair[]): void
  • Identify actual collisions from those pairs, and calculate collision impulse

    Parameters

    Returns void

resolve

track

  • track(target: Body): void

untrack

  • untrack(tartet: Body): void

update

  • update(targets: Actor[]): number
  • Parameters

    Returns number