raygeo.geo.algo.spatial_grid2d
Grid-based spatial index for fast overlap queries.
Divides the 2D plane into fixed-size cells and associates each inserted item with the cells its bounding box touches.
SpatialGrid
A grid-based spatial index for fast overlap queries.
Divides the 2D plane into fixed-size cells and indexes items by their bounding box for efficient overlap lookups.
clear()
clear() -> None
Remove all items from the grid.
| Parameter | Type | Description |
|---|---|---|
| Returns | None | |
| Complexity | O(n) where n = number of items |