pub struct SpatialHash {
pub cell_size: f64,
pub buckets: HashMap<(i64, i64), Vec<usize>>,
pub points: Vec<Point2D>,
}Expand description
A simple 2D spatial hash grid. Stores point indices in a flat hash table keyed by (cell_x, cell_y).
Fields§
§cell_size: f64§buckets: HashMap<(i64, i64), Vec<usize>>§points: Vec<Point2D>Implementations§
Auto Trait Implementations§
impl Freeze for SpatialHash
impl RefUnwindSafe for SpatialHash
impl Send for SpatialHash
impl Sync for SpatialHash
impl Unpin for SpatialHash
impl UnsafeUnpin for SpatialHash
impl UnwindSafe for SpatialHash
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more