SpatialIndex<T extends SpatialIndexable> constructor

SpatialIndex<T extends SpatialIndexable>({
  1. double gridSize = 500.0,
  2. bool enableCaching = true,
})

Implementation

SpatialIndex({this.gridSize = 500.0, this.enableCaching = true})
  : _spatialGrid = <String, Set<String>>{},
    _spatialRects = <String, Rect>{},
    _objects = <String, T>{},
    _cachedVisibleObjects = <T>[],
    _lastQueryBounds = Rect.zero;