raygeo.nest.spatial_grid
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
clear()
clear() -> None
| Parameter | Type | Description |
|---|---|---|
| Returns | None |
insert()
insert(index: int, bbox: Sequence[float]) -> None
| Parameter | Type | Description |
|---|---|---|
index | int | |
bbox | Sequence[float] | |
| Returns | None |
query()
query(bbox: Sequence[float]) -> list[int]
| Parameter | Type | Description |
|---|---|---|
bbox | Sequence[float] | |
| Returns | list[int] |