Enum bevy_rapier2d::prelude::TypedShape [−][src]
pub enum TypedShape<'a> {
Show 15 variants
Ball(&'a Ball),
Cuboid(&'a Cuboid),
Capsule(&'a Capsule),
Segment(&'a Segment),
Triangle(&'a Triangle),
TriMesh(&'a TriMesh),
Polyline(&'a Polyline),
HalfSpace(&'a HalfSpace),
HeightField(&'a HeightField),
Compound(&'a Compound),
ConvexPolygon(&'a ConvexPolygon),
RoundCuboid(&'a RoundShape<Cuboid>),
RoundTriangle(&'a RoundShape<Triangle>),
RoundConvexPolygon(&'a RoundShape<ConvexPolygon>),
Custom(u32),
}
Expand description
Enum representing the shape with its actual type
Variants
Ball(&'a Ball)
Tuple Fields
0: &'a Ball
A ball shape.
Cuboid(&'a Cuboid)
Tuple Fields
0: &'a Cuboid
A cuboid shape.
Capsule(&'a Capsule)
Tuple Fields
0: &'a Capsule
A capsule shape.
Segment(&'a Segment)
Tuple Fields
0: &'a Segment
A segment shape.
Triangle(&'a Triangle)
Tuple Fields
0: &'a Triangle
A triangle shape.
TriMesh(&'a TriMesh)
Tuple Fields
0: &'a TriMesh
A triangle mesh shape.
Polyline(&'a Polyline)
Tuple Fields
0: &'a Polyline
A set of segments.
HalfSpace(&'a HalfSpace)
Tuple Fields
0: &'a HalfSpace
A shape representing a full half-space.
HeightField(&'a HeightField)
Tuple Fields
0: &'a HeightField
A heightfield shape.
Compound(&'a Compound)
Tuple Fields
0: &'a Compound
A Compound shape.
ConvexPolygon(&'a ConvexPolygon)
Tuple Fields
0: &'a ConvexPolygon
RoundCuboid(&'a RoundShape<Cuboid>)
Tuple Fields
0: &'a RoundShape<Cuboid>
A cuboid with rounded corners.
RoundTriangle(&'a RoundShape<Triangle>)
Tuple Fields
0: &'a RoundShape<Triangle>
A triangle with rounded corners.
RoundConvexPolygon(&'a RoundShape<ConvexPolygon>)
Tuple Fields
0: &'a RoundShape<ConvexPolygon>
A convex polygon with rounded corners.
Custom(u32)
Tuple Fields
0: u32
A custom user-defined shape with a type identified by a number.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for TypedShape<'a>
impl<'a> Send for TypedShape<'a>
impl<'a> Sync for TypedShape<'a>
impl<'a> Unpin for TypedShape<'a>
impl<'a> !UnwindSafe for TypedShape<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: 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
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub 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
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub 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
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more