Skip to main content

Module spatial_hash

Module spatial_hash 

Source
Expand description

Spatial hashing, loose octree, k-nearest neighbours, ray grid traversal, and spatial statistics.

Structs§

GpuSpatialHashLayout
A spatial hash with an interleaved, flat-array layout for GPU upload.
LooseOctree
A loose octree node that stores items at every level.
ParallelSpatialHash
A parallel-build spatial hash.
PersistentSpatialHash
A spatial hash that persists across frames.
RayGridStep
Result of a ray traversal step through the grid.
SpatialHash3D
A uniform-grid spatial hash that maps 3-D positions to arbitrary data.
SpatialHashPos3D
A uniform-grid spatial hash with position storage for exact radius queries.
SpatialHashStats
Statistics about a spatial hash’s distribution.

Functions§

merge_spatial_hashes
Merge two SpatialHashPos3D instances (same cell size) into a new one.
ray_traverse_grid
Traverse a ray through a uniform grid using 3D DDA (Amanatides-Woo).