[−][src]Struct quadtree_f32::QuadTree
A QuadTree that can store rectangles and points
Methods
impl QuadTree
[src]
pub fn new<I: Iterator<Item = (ItemId, Item)>>(items: I) -> Self
[src]
Constructs a new QuadTree with at most 10 items per box
pub fn new_with_max_items_per_quad<I: Iterator<Item = (ItemId, Item)>>(
items: I,
max_items: usize
) -> Self
[src]
items: I,
max_items: usize
) -> Self
For performance, how many items should be in each quad before it gets subdivided?
pub fn bbox(&self) -> Rect
[src]
Returns the extent of all items
pub fn get_ids_that_overlap(&self, rect: &Rect) -> Vec<ItemId>
[src]
Query the IDs of all items that overlap the rect
pub fn get_ids_contained_by(&self, rect: &Rect) -> Vec<ItemId>
[src]
Query the IDs of all items completely contained by the rect
pub fn get_points_contained_by(&self, rect: &Rect) -> Vec<Point>
[src]
Returns all points in the QuadTree that are within the bounds of rect
pub fn get_rects_that_overlap(&self, rect: &Rect) -> Vec<Rect>
[src]
Returns all rectangles in the QuadTree that overlap rect
pub fn get_rects_contained_by(&self, rect: &Rect) -> Vec<Rect>
[src]
Returns all rectangles in the QuadTree that are completely contained by rect
pub fn get_all_ids(&self) -> Vec<ItemId>
[src]
pub fn get_all_items(&self) -> Vec<Item>
[src]
pub fn get_item(&self, id: &ItemId) -> Option<&Item>
[src]
Trait Implementations
impl Clone for QuadTree
[src]
impl Debug for QuadTree
[src]
impl PartialEq<QuadTree> for QuadTree
[src]
impl PartialOrd<QuadTree> for QuadTree
[src]
fn partial_cmp(&self, other: &QuadTree) -> Option<Ordering>
[src]
fn lt(&self, other: &QuadTree) -> bool
[src]
fn le(&self, other: &QuadTree) -> bool
[src]
fn gt(&self, other: &QuadTree) -> bool
[src]
fn ge(&self, other: &QuadTree) -> bool
[src]
impl StructuralPartialEq for QuadTree
[src]
Auto Trait Implementations
impl RefUnwindSafe for QuadTree
impl Send for QuadTree
impl Sync for QuadTree
impl Unpin for QuadTree
impl UnwindSafe for QuadTree
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,