SpatialIndex<T extends SpatialIndexable> class
Ultra-fast spatial indexing system using grid-based hashing Optimized for large numbers of 2D objects with frequent position updates
Constructors
- SpatialIndex({double gridSize = 500.0, bool enableCaching = true})
Properties
- enableCaching → bool
-
final
- gridSize → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isUsingSpatialGrid → bool
-
Check if spatial grid is being used
no setter
- objectCount → int
-
Get total number of objects in the index
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stats → SpatialIndexStats
-
Get performance statistics
no setter
Methods
-
addOrUpdate(
T object) → void - Add or update an object in the spatial index
-
clear(
) → void - Clear all objects from the spatial index
-
endDragging(
) → void - End drag optimization mode and rebuild spatial index for dragged objects
-
flushPendingUpdates(
) → void - Force process any pending updates immediately
-
getObject(
String objectId) → T? - Get object by ID
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
Rect bounds) → List< T> - Ultra-fast query with surgical caching
-
remove(
String objectId) → void - Remove an object from the spatial index
-
startDragging(
List< String> objectIds) → void - Start drag optimization mode for specified objects
-
toString(
) → String -
A string representation of this object.
inherited
-
updateDraggingObjects(
List< T> objects) → void - Ultra-fast surgical update only for dragging objects
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited