pub struct UniformGrid3 {
pub cell_size: f64,
/* private fields */
}Expand description
Uniform hash-grid indexing points in 3-D by cell coordinate.
Fields§
§cell_size: f64Cell edge length (metres).
Implementations§
Source§impl UniformGrid3
impl UniformGrid3
Sourcepub fn new(cell_size: f64) -> Self
pub fn new(cell_size: f64) -> Self
Construct a grid with the given cell size (metres).
§Panics
Panics if cell_size is not strictly positive.
Sourcepub fn insert_all<I: IntoIterator<Item = (u64, Vec3)>>(&mut self, iter: I)
pub fn insert_all<I: IntoIterator<Item = (u64, Vec3)>>(&mut self, iter: I)
Insert many (key, pos) pairs.
Sourcepub fn query_radius(&self, center: Vec3, radius: f64) -> Vec<u64>
pub fn query_radius(&self, center: Vec3, radius: f64) -> Vec<u64>
Return all keys within Euclidean distance radius of center.
Trait Implementations§
Source§impl Clone for UniformGrid3
impl Clone for UniformGrid3
Source§fn clone(&self) -> UniformGrid3
fn clone(&self) -> UniformGrid3
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UniformGrid3
impl RefUnwindSafe for UniformGrid3
impl Send for UniformGrid3
impl Sync for UniformGrid3
impl Unpin for UniformGrid3
impl UnsafeUnpin for UniformGrid3
impl UnwindSafe for UniformGrid3
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