pub struct SpatialIndex { /* private fields */ }Expand description
Spatial indexing for efficient culling
Implementations§
Source§impl SpatialIndex
impl SpatialIndex
pub fn new(cell_size: f64) -> Self
pub fn add_node(&mut self, position: Position, size: (f64, f64)) -> usize
pub fn update_node( &mut self, index: usize, position: Position, size: (f64, f64), )
pub fn remove_node(&mut self, index: usize)
pub fn query_rect(&self, rect: Rect) -> Vec<usize>
pub fn clear(&mut self)
Auto Trait Implementations§
impl Freeze for SpatialIndex
impl RefUnwindSafe for SpatialIndex
impl Send for SpatialIndex
impl Sync for SpatialIndex
impl Unpin for SpatialIndex
impl UnwindSafe for SpatialIndex
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