Struct bevy_rapier3d::geometry::shape_views::SegmentViewMut
source · pub struct SegmentViewMut<'a> {
pub raw: &'a mut Segment,
}
Expand description
Read-write access to the properties of a segment.
Fields§
§raw: &'a mut Segment
The raw shape from Rapier.
Implementations§
source§impl<'a> SegmentViewMut<'a>
impl<'a> SegmentViewMut<'a>
sourcepub fn scaled_direction(&self) -> Vect
pub fn scaled_direction(&self) -> Vect
The direction of this segment scaled by its length.
Points from self.a
toward self.b
.
sourcepub fn direction(&self) -> Option<Vect>
pub fn direction(&self) -> Option<Vect>
The unit direction of this segment.
Points from self.a()
toward self.b()
.
Returns None
is both points are equal.
sourcepub fn scaled_planar_normal(&self, plane_axis: u8) -> Vect
pub fn scaled_planar_normal(&self, plane_axis: u8) -> Vect
The not-normalized counterclockwise normal of this segment, assuming it lies on the plane with the normal collinear to the given axis (0 = X, 1 = Y, 2 = Z).
sourcepub fn normal(&self) -> Option<Vect>
pub fn normal(&self) -> Option<Vect>
Returns None
. Exists only for API similarity with the 2D parry.
sourcepub fn planar_normal(&self, plane_axis: u8) -> Option<Vect>
pub fn planar_normal(&self, plane_axis: u8) -> Option<Vect>
The normalized counterclockwise normal of this segment, assuming it lies on the plane with the normal collinear to the given axis (0 = X, 1 = Y, 2 = Z).
Auto Trait Implementations§
impl<'a> RefUnwindSafe for SegmentViewMut<'a>
impl<'a> Send for SegmentViewMut<'a>
impl<'a> Sync for SegmentViewMut<'a>
impl<'a> Unpin for SegmentViewMut<'a>
impl<'a> !UnwindSafe for SegmentViewMut<'a>
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere U: ShaderType, &'a T: for<'a> Into<U>,
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn 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
.§fn 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
.§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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn 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 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.