pub struct SolverContactView<'a> {
pub manifold_data: &'a ContactManifoldData,
pub raw: &'a SolverContact,
/* private fields */
}Expand description
Read-only access to the properties of a single solver contact.
Fields§
§manifold_data: &'a ContactManifoldDataThe data of the contact manifold this solver contact is part of.
raw: &'a SolverContactThe raw solver contact from Rapier.
Implementations§
Source§impl SolverContactView<'_>
impl SolverContactView<'_>
Sourcepub fn dist(&self) -> Real
pub fn dist(&self) -> Real
The distance between the two original contacts points along the contact normal. If negative, this is measures the penetration depth.
Sourcepub fn restitution(&self) -> Real
pub fn restitution(&self) -> Real
The effective restitution coefficient at this contact point.
Sourcepub fn tangent_velocity(&self) -> Vect
pub fn tangent_velocity(&self) -> Vect
The desired tangent relative velocity at the contact point.
This is set to zero by default. Set to a non-zero value to simulate, e.g., conveyor belts.
Sourcepub fn contact_id(&self) -> u32
pub fn contact_id(&self) -> u32
The index, in its manifold’s contact points, of the contact this solver contact was generated from.
This index is only valid for the timestep that produced this solver contact.
Sourcepub fn anchor1(&self) -> Vect
pub fn anchor1(&self) -> Vect
The raw contact point on the first body’s surface, as stored for the solver.
This is expressed in the center-of-mass-centered local frame of the first rigid-body, or in
world-space if that side is attached to the world (no rigid-body, or a fixed one). Use
Self::world_point1 for a world-space point.
Sourcepub fn anchor2(&self) -> Vect
pub fn anchor2(&self) -> Vect
The raw contact point on the second body’s surface, as stored for the solver.
See Self::anchor1 for the frame it is expressed in.
Sourcepub fn world_point1(&self) -> Vect
pub fn world_point1(&self) -> Vect
The world-space contact point on the first body’s surface.
Sourcepub fn world_point2(&self) -> Vect
pub fn world_point2(&self) -> Vect
The world-space contact point on the second body’s surface.
Auto Trait Implementations§
impl<'a> Freeze for SolverContactView<'a>
impl<'a> RefUnwindSafe for SolverContactView<'a>
impl<'a> Send for SolverContactView<'a>
impl<'a> Sync for SolverContactView<'a>
impl<'a> Unpin for SolverContactView<'a>
impl<'a> UnsafeUnpin for SolverContactView<'a>
impl<'a> UnwindSafe for SolverContactView<'a>
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
impl<T> MaybeSync for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Settings for T
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.