SpatialGrid<T> class

A grid index mapping 2D points to payloads of type T.

Constructors

SpatialGrid(double cellSize)
Creates a grid whose square cells are cellSize units on a side. Requires cellSize > 0. Audited: 2026-06-12 11:26 EDT

Properties

hashCode int
The hash code for this object.
no setterinherited
length int
Total number of points stored. Audited: 2026-06-12 11:26 EDT
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

insert(T item, double x, double y) → void
Inserts item at position (x, y). The same item may be inserted at multiple positions; each insertion is independent.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryRadius(double x, double y, double radius) List<T>
Items whose stored position lies within Euclidean distance radius of (x, y). Requires radius >= 0. Order is unspecified. Audited: 2026-06-12 11:26 EDT
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited