pub enum BVHImpl<'a, N: 'a + RealField + Copy, T: 'a, BV: 'a> {
BVT(&'a BVT<T, BV>),
DBVT(&'a DBVT<N, T, BV>),
}
Expand description
An enum grouping references to all the BVH implementations on ncollide.
Variants§
BVT(&'a BVT<T, BV>)
A static binary bounding volume tree.
DBVT(&'a DBVT<N, T, BV>)
A dynamic binary bounding volume tree.
Implementations§
Source§impl<'a, N: RealField + Copy, T, BV> BVHImpl<'a, N, T, BV>
impl<'a, N: RealField + Copy, T, BV> BVHImpl<'a, N, T, BV>
Sourcepub fn unwrap_bvt(self) -> &'a BVT<T, BV>
pub fn unwrap_bvt(self) -> &'a BVT<T, BV>
Gets the underlying reference to a BVT, or panics if this is not a BVTImpl::BVT
.
Sourcepub fn unwrap_dbvt(self) -> &'a DBVT<N, T, BV>
pub fn unwrap_dbvt(self) -> &'a DBVT<N, T, BV>
Gets the underlying reference to a DBVT, or panics if this is not a BVTImpl::DBVT
.
Sourcepub fn visit_bvtt(
self,
other: BVHImpl<'_, N, T, BV>,
visitor: &mut impl SimultaneousVisitor<T, BV>,
)
pub fn visit_bvtt( self, other: BVHImpl<'_, N, T, BV>, visitor: &mut impl SimultaneousVisitor<T, BV>, )
Visits the bounding volume traversal tree implicitly formed with other
.
Sourcepub fn best_first_search<BFS>(
self,
visitor: &mut BFS,
) -> Option<(BVHNodeId, BFS::Result)>where
BFS: BestFirstVisitor<N, T, BV>,
pub fn best_first_search<BFS>(
self,
visitor: &mut BFS,
) -> Option<(BVHNodeId, BFS::Result)>where
BFS: BestFirstVisitor<N, T, BV>,
Performs a best-fist-search on the tree.
Returns the content of the leaf with the smallest associated cost, and a result of user-defined type.
Trait Implementations§
Source§impl<'a, N: Clone + 'a + RealField + Copy, T: Clone + 'a, BV: Clone + 'a> Clone for BVHImpl<'a, N, T, BV>
impl<'a, N: Clone + 'a + RealField + Copy, T: Clone + 'a, BV: Clone + 'a> Clone for BVHImpl<'a, N, T, BV>
impl<'a, N: Copy + 'a + RealField + Copy, T: Copy + 'a, BV: Copy + 'a> Copy for BVHImpl<'a, N, T, BV>
Auto Trait Implementations§
impl<'a, N, T, BV> Freeze for BVHImpl<'a, N, T, BV>
impl<'a, N, T, BV> RefUnwindSafe for BVHImpl<'a, N, T, BV>
impl<'a, N, T, BV> Send for BVHImpl<'a, N, T, BV>
impl<'a, N, T, BV> Sync for BVHImpl<'a, N, T, BV>
impl<'a, N, T, BV> Unpin for BVHImpl<'a, N, T, BV>
impl<'a, N, T, BV> UnwindSafe for BVHImpl<'a, N, T, BV>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.