pub struct SoftPairContacts {
pub vertex_passes: Vec<SoftVertexPass>,
pub edges: Option<SoftEdgePass>,
pub volume: Option<SoftVolumePatch>,
}Expand description
The contacts of a pair of two soft surfaces: the candidates the narrow phase detected between them, which the soft-body solver turns into constraints, rebuilt by every update of the pair. Each slot (vertex-pass, edge, then volume-bin candidates) reports the solver’s impulse.
Fields§
§vertex_passes: Vec<SoftVertexPass>Both vertex passes: the vertices of the pair’s second collider against the first’s surface, then the reverse.
edges: Option<SoftEdgePass>The edge-vs-edge pass (None: no edge contacts for this pair).
volume: Option<SoftVolumePatch>The volume patches of a crossed pair of closed surfaces.
Implementations§
Source§impl SoftPairContacts
impl SoftPairContacts
Sourcepub fn vertex_pass_on(&self, surface: ColliderHandle) -> Option<&SoftVertexPass>
pub fn vertex_pass_on(&self, surface: ColliderHandle) -> Option<&SoftVertexPass>
The vertex pass whose surface side is surface.
Sourcepub fn disable_all(&mut self)
pub fn disable_all(&mut self)
Disables every candidate (the contact-modification hook’s way of dropping the pair’s contacts: the pair still reports as touching).
Sourcepub fn is_touching(&self) -> bool
pub fn is_touching(&self) -> bool
Whether some candidate exists: a feature of one surface within contact reach of the other, or a volume patch of the crossed pair.
Sourcepub fn impulses(
&self,
collider1: ColliderHandle,
) -> impl Iterator<Item = SoftContactImpulse> + '_
pub fn impulses( &self, collider1: ColliderHandle, ) -> impl Iterator<Item = SoftContactImpulse> + '_
The impulses the solver applied through the contacts at the last step, with their
normals oriented from the pair’s first collider (collider1) to the second.
Trait Implementations§
Source§impl Clone for SoftPairContacts
impl Clone for SoftPairContacts
Source§fn clone(&self) -> SoftPairContacts
fn clone(&self) -> SoftPairContacts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SoftPairContacts
impl Debug for SoftPairContacts
Source§impl Default for SoftPairContacts
impl Default for SoftPairContacts
Source§fn default() -> SoftPairContacts
fn default() -> SoftPairContacts
Auto Trait Implementations§
impl Freeze for SoftPairContacts
impl RefUnwindSafe for SoftPairContacts
impl Send for SoftPairContacts
impl Sync for SoftPairContacts
impl Unpin for SoftPairContacts
impl UnsafeUnpin for SoftPairContacts
impl UnwindSafe for SoftPairContacts
Blanket Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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 moreimpl<T> MaybeSync 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.