pub struct SoftVertexCandidate {
pub element: u32,
pub weights: [f32; 3],
pub dir: Vector,
pub dist: f32,
pub outward: Option<Vector>,
pub interior: bool,
pub enabled: bool,
pub rest_gap: bool,
pub impulse: f32,
pub tangent_impulse: Vector,
}Expand description
A surface element within reach of a vertex of the other surface (see SoftVertexPass):
the closest point’s barycentric weights on the element and the separation, skins deducted.
The contact hook may edit dir and dist or disable it; the solver reports its impulse.
Fields§
§element: u32The element of the surface side.
weights: [f32; 3]The closest point’s barycentric weights on the element.
dir: VectorThe force direction on the surface (from the vertex toward its closest point).
dist: f32The separation, skins deducted (negative: penetrating).
outward: Option<Vector>The element’s outward normal (closed surfaces only).
interior: boolThe closest point lies inside the element (not on its boundary).
enabled: boolWhether the solver builds a constraint for it (the hook clears it to drop the contact).
rest_gap: boolThe two surfaces are pieces of one torn body, their separations measured from the
features’ rest gaps (see rest_gap_skins): the constraint holds a crack’s rest geometry,
and the along-normal volume-patch policy leaves it as it is.
impulse: f32The normal impulse the solver applied through it at the last step.
tangent_impulse: VectorThe world-space friction impulse the solver applied through it at the last step.
Trait Implementations§
Source§impl Clone for SoftVertexCandidate
impl Clone for SoftVertexCandidate
Source§fn clone(&self) -> SoftVertexCandidate
fn clone(&self) -> SoftVertexCandidate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SoftVertexCandidate
Auto Trait Implementations§
impl Freeze for SoftVertexCandidate
impl RefUnwindSafe for SoftVertexCandidate
impl Send for SoftVertexCandidate
impl Sync for SoftVertexCandidate
impl Unpin for SoftVertexCandidate
impl UnsafeUnpin for SoftVertexCandidate
impl UnwindSafe for SoftVertexCandidate
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.