Enum ncollide2d::partitioning::BVHImpl
source · [−]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
sourceimpl<'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
sourceimpl<'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> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, 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
. Read more
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn 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. Read more
sourcefn 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. Read more
sourceimpl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
sourceimpl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
sourcefn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
sourceimpl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
sourcefn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
OverflowingCasts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
sourcefn 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
sourcefn 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).
sourcefn 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.
sourcefn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
UnwrappedCasts the value.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
WrappingCasts the value.