Skip to main content

SparseHashGrid <TObject, TProxy>

Index

Constructors

constructor

  • new SparseHashGrid<TObject, TProxy>(options: { proxyFactory?: (object: TObject, gridSize: number) => TProxy; size: number }): SparseHashGrid<TObject, TProxy>
  • Type parameters

    Parameters

    • options: { proxyFactory?: (object: TObject, gridSize: number) => TProxy; size: number }
      • optionalproxyFactory: (object: TObject, gridSize: number) => TProxy
      • size: number

    Returns SparseHashGrid<TObject, TProxy>

Properties

publicbounds

bounds: BoundingBox = ...

readonlygridSize

gridSize: number

readonlyobjectToProxy

objectToProxy: Map<TObject, TProxy>

readonlysparseHashGrid

sparseHashGrid: Map<string, HashGridCell<TObject, TProxy>>

Methods

debug

get

query

  • Parameters

    Returns TObject[]

track

  • track(target: TObject): void
  • Parameters

    • target: TObject

    Returns void

untrack

  • untrack(target: TObject): void
  • Parameters

    • target: TObject

    Returns void

update

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

    • targets: TObject[]

    Returns number