Struct bevy_rapier3d::physics::wrapper::ColliderShapeComponent
source · [−]pub struct ColliderShapeComponent(pub ColliderShape);
Tuple Fields
0: ColliderShape
Methods from Deref<Target = ColliderShape>
Methods from Deref<Target = dyn Shape + 'static>
sourcepub fn as_shape<T>(&self) -> Option<&T> where
T: Shape,
pub fn as_shape<T>(&self) -> Option<&T> where
T: Shape,
Converts this abstract shape to the given shape, if it is one.
sourcepub fn as_cuboid(&self) -> Option<&Cuboid>
pub fn as_cuboid(&self) -> Option<&Cuboid>
Converts this abstract shape to a cuboid, if it is one.
sourcepub fn as_halfspace(&self) -> Option<&HalfSpace>
pub fn as_halfspace(&self) -> Option<&HalfSpace>
Converts this abstract shape to a halfspace, if it is one.
sourcepub fn as_segment(&self) -> Option<&Segment>
pub fn as_segment(&self) -> Option<&Segment>
Converts this abstract shape to a segment, if it is one.
sourcepub fn as_capsule(&self) -> Option<&Capsule>
pub fn as_capsule(&self) -> Option<&Capsule>
Converts this abstract shape to a capsule, if it is one.
sourcepub fn as_triangle(&self) -> Option<&Triangle>
pub fn as_triangle(&self) -> Option<&Triangle>
Converts this abstract shape to a triangle, if it is one.
sourcepub fn as_compound(&self) -> Option<&Compound>
pub fn as_compound(&self) -> Option<&Compound>
Converts this abstract shape to a compound shape, if it is one.
sourcepub fn as_trimesh(&self) -> Option<&TriMesh>
pub fn as_trimesh(&self) -> Option<&TriMesh>
Converts this abstract shape to a triangle mesh, if it is one.
sourcepub fn as_polyline(&self) -> Option<&Polyline>
pub fn as_polyline(&self) -> Option<&Polyline>
Converts this abstract shape to a polyline, if it is one.
sourcepub fn as_heightfield(&self) -> Option<&HeightField>
pub fn as_heightfield(&self) -> Option<&HeightField>
Converts this abstract shape to a heightfield, if it is one.
sourcepub fn as_round_cuboid(&self) -> Option<&RoundShape<Cuboid>>
pub fn as_round_cuboid(&self) -> Option<&RoundShape<Cuboid>>
Converts this abstract shape to a round cuboid, if it is one.
sourcepub fn as_round_triangle(&self) -> Option<&RoundShape<Triangle>>
pub fn as_round_triangle(&self) -> Option<&RoundShape<Triangle>>
Converts this abstract shape to a round triangle, if it is one.
pub fn as_convex_polyhedron(&self) -> Option<&ConvexPolyhedron>
sourcepub fn as_cylinder(&self) -> Option<&Cylinder>
pub fn as_cylinder(&self) -> Option<&Cylinder>
Converts this abstract shape to a cylinder, if it is one.
sourcepub fn as_round_cylinder(&self) -> Option<&RoundShape<Cylinder>>
pub fn as_round_cylinder(&self) -> Option<&RoundShape<Cylinder>>
Converts this abstract shape to a round cylinder, if it is one.
sourcepub fn as_round_cone(&self) -> Option<&RoundShape<Cone>>
pub fn as_round_cone(&self) -> Option<&RoundShape<Cone>>
Converts this abstract shape to a round cone, if it is one.
sourcepub fn as_round_convex_polyhedron(
&self
) -> Option<&RoundShape<ConvexPolyhedron>>
pub fn as_round_convex_polyhedron(
&self
) -> Option<&RoundShape<ConvexPolyhedron>>
Converts this abstract shape to a round convex polyhedron, if it is one.
sourcepub fn is<__T>(&self) -> bool where
__T: Shape,
pub fn is<__T>(&self) -> bool where
__T: Shape,
Returns true if the trait object wraps an object of type __T
.
sourcepub fn downcast_rc<__T>(
self: Rc<dyn Shape + 'static>
) -> Result<Rc<__T>, Rc<dyn Shape + 'static>> where
__T: Shape,
pub fn downcast_rc<__T>(
self: Rc<dyn Shape + 'static>
) -> Result<Rc<__T>, Rc<dyn Shape + 'static>> where
__T: Shape,
Returns an Rc
-ed object from an Rc
-ed trait object if the underlying object is of
type __T
. Returns the original Rc
-ed trait if it isn’t.
sourcepub fn downcast_ref<__T>(&self) -> Option<&__T> where
__T: Shape,
pub fn downcast_ref<__T>(&self) -> Option<&__T> where
__T: Shape,
Returns a reference to the object within the trait object if it is of type __T
, or
None
if it isn’t.
Trait Implementations
sourceimpl Component for ColliderShapeComponent where
Self: Send + Sync + 'static,
impl Component for ColliderShapeComponent where
Self: Send + Sync + 'static,
type Storage = TableStorage
sourceimpl Deref for ColliderShapeComponent
impl Deref for ColliderShapeComponent
type Target = ColliderShape
type Target = ColliderShape
The resulting type after dereferencing.
sourceimpl DerefMut for ColliderShapeComponent
impl DerefMut for ColliderShapeComponent
sourceimpl<T> From<T> for ColliderShapeComponent where
ColliderShape: From<T>,
impl<T> From<T> for ColliderShapeComponent where
ColliderShape: From<T>,
Auto Trait Implementations
impl !RefUnwindSafe for ColliderShapeComponent
impl Send for ColliderShapeComponent
impl Sync for ColliderShapeComponent
impl Unpin for ColliderShapeComponent
impl !UnwindSafe for ColliderShapeComponent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub 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
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
pub fn as_any(&self) -> &(dyn Any + 'static)
pub 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
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn to_subset(&self) -> Option<SS>
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.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more