pub struct SoftEdgeCandidate {
pub edge: u32,
pub other_edge: u32,
pub bcoords: [f32; 2],
pub other_bcoords: [f32; 2],
pub point: Vector,
pub other_point: Vector,
pub dir: Vector,
pub dist: f32,
pub enabled: bool,
pub impulse: f32,
pub tangent_impulse: Vector,
}Expand description
An edge-vs-edge contact candidate (see SoftEdgePass): the closest points of two
edges, interior to both. The contact-modification hook may edit dir and dist, or
disable the candidate; the soft-body solver reports the impulse it applied.
Fields§
§edge: u32The edge of the owner mesh.
other_edge: u32The edge of the other mesh.
bcoords: [f32; 2]The closest point’s barycentric weights on the owner’s edge.
other_bcoords: [f32; 2]The closest point’s barycentric weights on the other edge.
point: VectorThe closest point on the owner’s edge (world space).
other_point: VectorThe closest point on the other edge (world space).
dir: VectorThe force direction on the owner’s edge (away from the other edge).
dist: f32The separation, skins deducted (negative: penetrating).
enabled: boolWhether the solver builds a constraint for it (the hook clears it to drop the contact).
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 SoftEdgeCandidate
impl Clone for SoftEdgeCandidate
Source§fn clone(&self) -> SoftEdgeCandidate
fn clone(&self) -> SoftEdgeCandidate
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 SoftEdgeCandidate
Auto Trait Implementations§
impl Freeze for SoftEdgeCandidate
impl RefUnwindSafe for SoftEdgeCandidate
impl Send for SoftEdgeCandidate
impl Sync for SoftEdgeCandidate
impl Unpin for SoftEdgeCandidate
impl UnsafeUnpin for SoftEdgeCandidate
impl UnwindSafe for SoftEdgeCandidate
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.