pub enum AABBTree3D<HB>where
HB: HasBoundingBox3D + Clone,{
Empty,
Leaf(AABBTree3DLeaf<HB>),
Branch(AABBTree3DBranch<HB>),
}
Expand description
AABBTree3D, an axis aligned bounding box tree in 3D for fast collision detection
Variants§
Implementations§
Source§impl<HB> AABBTree3D<HB>where
HB: HasBoundingBox3D + Clone,
impl<HB> AABBTree3D<HB>where
HB: HasBoundingBox3D + 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_intersection_candidate<'a>( &'a self, line: &Line3D, f: &mut dyn FnMut(&HB), )
pub fn for_each_collision_candidate<'a>( &'a self, bb: &BoundingBox3D, f: &mut dyn FnMut(&HB), )
pub fn bb_colliding<'a>(&'a self, bb: &BoundingBox3D, 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>)
pub fn bb_crossing_z_value<'a>(&'a self, z: f64, result: &mut Vec<&'a HB>)
Trait Implementations§
Source§impl<HB> Clone for AABBTree3D<HB>
impl<HB> Clone for AABBTree3D<HB>
Source§fn clone(&self) -> AABBTree3D<HB>
fn clone(&self) -> AABBTree3D<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 moreSource§impl<HB> IsColliderContainer3D for AABBTree3D<HB>
impl<HB> IsColliderContainer3D for AABBTree3D<HB>
fn any_element_collides_with_collider(&self, other: &dyn HasColliders3D) -> bool
fn any_element_collides_with_bounding( &self, other: &dyn HasBoundingBox3D, ) -> bool
Auto Trait Implementations§
impl<HB> Freeze for AABBTree3D<HB>
impl<HB> RefUnwindSafe for AABBTree3D<HB>where
HB: RefUnwindSafe,
impl<HB> Send for AABBTree3D<HB>where
HB: Send,
impl<HB> Sync for AABBTree3D<HB>where
HB: Sync,
impl<HB> Unpin for AABBTree3D<HB>where
HB: Unpin,
impl<HB> UnwindSafe for AABBTree3D<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