Skip to main content

euv_engine/spatial/
type.rs

1use crate::*;
2
3/// A grid cell key for 2D spatial partitioning, combining x and y indices.
4pub type CellKey2D = (i32, i32);
5
6/// A grid cell key for 3D spatial partitioning, combining x, y, and z indices.
7pub type CellKey3D = (i32, i32, i32);
8
9/// A list of body indices stored within a single grid cell.
10pub type CellEntries = Vec<usize>;
11
12/// A hash map from 2D cell keys to lists of body indices.
13pub type SpatialCellMap2D = HashMap<CellKey2D, CellEntries>;
14
15/// A hash map from 3D cell keys to lists of body indices.
16pub type SpatialCellMap3D = HashMap<CellKey3D, CellEntries>;