pub struct ContactConstraint {
pub body_a: usize,
pub body_b: usize,
pub contact: Contact,
pub friction: Fix128,
pub restitution: Fix128,
pub cached_lambda: Fix128,
}Expand description
Contact constraint (from collision detection)
Fields§
§body_a: usizeIndex of the first body
body_b: usizeIndex of the second body
contact: ContactContact information from collision detection
friction: Fix128Friction coefficient
restitution: Fix128Restitution (bounciness) coefficient
cached_lambda: Fix128Contact multiplier accumulated over the substep the contact lives in
(contacts are re-detected every substep since 1.2.0): the separation
along contact.normal already applied by earlier solver iterations.
Implementations§
Trait Implementations§
Source§impl Clone for ContactConstraint
impl Clone for ContactConstraint
impl Copy for ContactConstraint
Source§impl Debug for ContactConstraint
impl Debug for ContactConstraint
impl Eq for ContactConstraint
Source§impl PartialEq for ContactConstraint
impl PartialEq for ContactConstraint
impl StructuralPartialEq for ContactConstraint
Auto Trait Implementations§
impl Freeze for ContactConstraint
impl RefUnwindSafe for ContactConstraint
impl Send for ContactConstraint
impl Sync for ContactConstraint
impl Unpin for ContactConstraint
impl UnsafeUnpin for ContactConstraint
impl UnwindSafe for ContactConstraint
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 more