pub enum BVHImpl<'a, N, T, BV>where
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, T, BV> BVHImpl<'a, N, T, BV>where
N: RealField + Copy,
impl<'a, N, T, BV> BVHImpl<'a, N, T, BV>where N: RealField + Copy,
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 as BestFirstVisitor<N, T, BV>>::Result)>where
BFS: BestFirstVisitor<N, T, BV>,
pub fn best_first_search<BFS>( self, visitor: &mut BFS ) -> Option<(BVHNodeId, <BFS as BestFirstVisitor<N, T, BV>>::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, T, BV> Clone for BVHImpl<'a, N, T, BV>where
N: Clone + 'a + RealField + Copy,
T: Clone + 'a,
BV: Clone + 'a,
impl<'a, N, T, BV> Clone for BVHImpl<'a, N, T, BV>where N: Clone + 'a + RealField + Copy, T: Clone + 'a, BV: Clone + 'a,
impl<'a, N, T, BV> Copy for BVHImpl<'a, N, T, BV>where N: Copy + 'a + RealField, T: Copy + 'a, BV: Copy + 'a,
Auto Trait Implementations§
impl<'a, N, T, BV> RefUnwindSafe for BVHImpl<'a, N, T, BV>where BV: RefUnwindSafe, N: RefUnwindSafe, T: RefUnwindSafe,
impl<'a, N, T, BV> Send for BVHImpl<'a, N, T, BV>where BV: Sync, T: Sync,
impl<'a, N, T, BV> Sync for BVHImpl<'a, N, T, BV>where BV: Sync, T: Sync,
impl<'a, N, T, BV> Unpin for BVHImpl<'a, N, T, BV>
impl<'a, N, T, BV> UnwindSafe for BVHImpl<'a, N, T, BV>where BV: RefUnwindSafe, N: RefUnwindSafe, T: RefUnwindSafe,
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
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
.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§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.§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.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.