pub struct ContactManifoldView<'a> {
pub raw: &'a ContactManifold,
/* private fields */
}
Expand description
Read-only access to the properties of a contact manifold.
Fields§
§raw: &'a ContactManifold
The raw contact manifold from Rapier.
Implementations§
Source§impl ContactManifoldView<'_>
impl ContactManifoldView<'_>
Sourcepub fn num_points(&self) -> usize
pub fn num_points(&self) -> usize
The number of points on this contact manifold.
Sourcepub fn point(&self, i: usize) -> Option<ContactView<'_>>
pub fn point(&self, i: usize) -> Option<ContactView<'_>>
Retrieves the i-th point of this contact manifold.
Sourcepub fn points(&self) -> impl ExactSizeIterator<Item = ContactView<'_>>
pub fn points(&self) -> impl ExactSizeIterator<Item = ContactView<'_>>
The contacts points.
Sourcepub fn local_n1(&self) -> Vect
pub fn local_n1(&self) -> Vect
The contact normal of all the contacts of this manifold, expressed in the local space of the first shape.
Sourcepub fn local_n2(&self) -> Vect
pub fn local_n2(&self) -> Vect
The contact normal of all the contacts of this manifold, expressed in the local space of the second shape.
Sourcepub fn subshape1(&self) -> u32
pub fn subshape1(&self) -> u32
The first subshape involved in this contact manifold.
This is zero if the first shape is not a composite shape.
Sourcepub fn subshape2(&self) -> u32
pub fn subshape2(&self) -> u32
The second subshape involved in this contact manifold.
This is zero if the second shape is not a composite shape.
Sourcepub fn rigid_body1(&self) -> Option<Entity>
pub fn rigid_body1(&self) -> Option<Entity>
The first rigid-body involved in this contact manifold.
Sourcepub fn rigid_body2(&self) -> Option<Entity>
pub fn rigid_body2(&self) -> Option<Entity>
The second rigid-body involved in this contact manifold.
Sourcepub fn solver_flags(&self) -> SolverFlags
pub fn solver_flags(&self) -> SolverFlags
Flags used to control some aspects of the constraints solver for this contact manifold.
Sourcepub fn normal(&self) -> Vect
pub fn normal(&self) -> Vect
The world-space contact normal shared by all the contact in this contact manifold.
Sourcepub fn num_solver_contacts(&self) -> usize
pub fn num_solver_contacts(&self) -> usize
The contacts that will be seen by the constraints solver for computing forces.
Sourcepub fn solver_contact(&self, i: usize) -> Option<SolverContactView<'_>>
pub fn solver_contact(&self, i: usize) -> Option<SolverContactView<'_>>
Gets the i-th solver contact.
Sourcepub fn solver_contacts(
&self,
) -> impl ExactSizeIterator<Item = SolverContactView<'_>>
pub fn solver_contacts( &self, ) -> impl ExactSizeIterator<Item = SolverContactView<'_>>
The contacts that will be seen by the constraints solver for computing forces.
Sourcepub fn relative_dominance(&self) -> i16
pub fn relative_dominance(&self) -> i16
The relative dominance of the bodies involved in this contact manifold.
Source§impl ContactManifoldView<'_>
impl ContactManifoldView<'_>
Sourcepub fn find_deepest_contact(&self) -> Option<ContactView<'_>>
pub fn find_deepest_contact(&self) -> Option<ContactView<'_>>
Returns the contact with the smallest distance (i.e. the largest penetration depth).
Auto Trait Implementations§
impl<'a> Freeze for ContactManifoldView<'a>
impl<'a> RefUnwindSafe for ContactManifoldView<'a>
impl<'a> Send for ContactManifoldView<'a>
impl<'a> Sync for ContactManifoldView<'a>
impl<'a> Unpin for ContactManifoldView<'a>
impl<'a> UnwindSafe for ContactManifoldView<'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
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>
. Box<dyn Any>
can
then be further downcast
into Box<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>
. Rc<Any>
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> DowncastSync for T
impl<T> DowncastSync for T
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> Pointable for T
impl<T> Pointable 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.