pub struct Quadtree<T: Clone> { /* private fields */ }Expand description
A quadtree that can store points in 2D space
Implementations§
Source§impl<T: Clone> Quadtree<T>
impl<T: Clone> Quadtree<T>
Sourcepub fn insert(&mut self, point: &Point<T>) -> bool
pub fn insert(&mut self, point: &Point<T>) -> bool
Insert a point into the quadtree at the first possible location (x, y)
Sourcepub fn query_rect(&self, range: &Qrect) -> Vec<Point<T>>
pub fn query_rect(&self, range: &Qrect) -> Vec<Point<T>>
Query the quadtree for points within a rectangle
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Quadtree<T>
impl<T> RefUnwindSafe for Quadtree<T>where
T: RefUnwindSafe,
impl<T> Send for Quadtree<T>where
T: Send,
impl<T> Sync for Quadtree<T>where
T: Sync,
impl<T> Unpin for Quadtree<T>where
T: Unpin,
impl<T> UnwindSafe for Quadtree<T>where
T: UnwindSafe,
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