Struct ncollide2d::shape::ShapeHandle
source · pub struct ShapeHandle<N: Real> { /* private fields */ }
Expand description
A shared immutable handle to an abstract shape.
Implementations§
source§impl<N: Real> ShapeHandle<N>
impl<N: Real> ShapeHandle<N>
sourcepub fn new<S: Shape<N>>(shape: S) -> ShapeHandle<N>
pub fn new<S: Shape<N>>(shape: S) -> ShapeHandle<N>
Creates a sharable shape handle from a shape.
Methods from Deref<Target = dyn Shape<N>>§
Trait Implementations§
Auto Trait Implementations§
impl<N> !RefUnwindSafe for ShapeHandle<N>
impl<N> Send for ShapeHandle<N>
impl<N> Sync for ShapeHandle<N>
impl<N> Unpin for ShapeHandle<N>
impl<N> !UnwindSafe for ShapeHandle<N>
Blanket Implementations§
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§unsafe fn to_subset_unchecked(&self) -> SS
unsafe 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.