Generic spatial hash grid in Rust.
Allows to efficiently translate spatial requests into cells with content. The implementation does not care what is stored in the cells, as long as it is Sized.
``` Rust
// create spatial hash grid of size 5x10x20
let mut sh: SpatialHashGrid
// iterate by mutable reference over all filled boxes within a given volume for i in sh.iterfilledboxes_mut(Vector3::new(1, 2, 3), Vector3::new(4, 5, 4)) { i += 1; }
// iterate by reference over all filled boxes within a given volume for i in sh.iterfilledboxes(Vector3::new(1, 2, 3), Vector3::new(4, 5, 4)) { println!("{}", i); }
```
This was optimized for speed and not memory efficiency.
Iterators are provided to access content within a given axis-aligned volume. All iterators have complexity proportional to volume they select from, i.e. the larger the volume the longer the iterator will run.