Class SpatialHash

Spatial partitioning of rectangles

Hierarchy

  • SpatialHash

Constructors

Properties

Methods

Constructors

  • Create a new SpatialHash

    Parameters

    • size: number

    Returns SpatialHash

Properties

buckets: Map<number, IRectangle[]> = ...

Buckets

pairs: SpatialHashPair[] = []

Potentially colliding pairs

size: number

Bucket size, in units

Methods

  • clear(): void
  • Clear this spatial hash of all data

    Returns void

  • Insert a new rectangle into this spatial hash

    Parameters

    Returns void

Generated using TypeDoc