pub enum AABBTree2D<HB>where
HB: HasBoundingBox2D + Clone,{
Empty,
Leaf(AABBTree2DLeaf<HB>),
Branch(AABBTree2DBranch<HB>),
}
Expand description
AABBTree2D, an axis aligned bounding box tree in 2D for fast collision detection
Variants§
Implementations§
Source§impl<HB> AABBTree2D<HB>where
HB: HasBoundingBox2D + Clone,
impl<HB> AABBTree2D<HB>where
HB: HasBoundingBox2D + Clone,
pub fn new(data: Vec<HB>, maxdepth: usize, allowed_bucket_size: usize) -> Self
pub fn any<'a>(&'a self, f: &dyn Fn(&HB) -> bool) -> bool
pub fn for_each_collision_candidate<'a>( &'a self, bb: &BoundingBox2D, f: &mut dyn FnMut(&HB), )
pub fn bb_colliding<'a>(&'a self, bb: &BoundingBox2D, result: &mut Vec<&'a HB>)
pub fn bb_crossing_x_value<'a>(&'a self, x: f64, result: &mut Vec<&'a HB>)
pub fn bb_crossing_y_value<'a>(&'a self, y: f64, result: &mut Vec<&'a HB>)
Trait Implementations§
Source§impl<HB> Clone for AABBTree2D<HB>
impl<HB> Clone for AABBTree2D<HB>
Source§fn clone(&self) -> AABBTree2D<HB>
fn clone(&self) -> AABBTree2D<HB>
Returns a copy 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<HB> Freeze for AABBTree2D<HB>
impl<HB> RefUnwindSafe for AABBTree2D<HB>where
HB: RefUnwindSafe,
impl<HB> Send for AABBTree2D<HB>where
HB: Send,
impl<HB> Sync for AABBTree2D<HB>where
HB: Sync,
impl<HB> Unpin for AABBTree2D<HB>where
HB: Unpin,
impl<HB> UnwindSafe for AABBTree2D<HB>where
HB: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more