pub struct ContactCacheEntry {
pub key: (u32, u32),
pub accumulated_normal: f32,
pub accumulated_tangent_1: f32,
pub accumulated_tangent_2: f32,
pub contact_point: [f32; 3],
pub age_frames: u32,
}Expand description
A single entry in the contact cache for warmstarting.
Fields§
§key: (u32, u32)Body pair key (a, b) with a < b.
accumulated_normal: f32Accumulated normal impulse from the previous frame.
accumulated_tangent_1: f32Accumulated tangent impulse (direction 1) from the previous frame.
accumulated_tangent_2: f32Accumulated tangent impulse (direction 2) from the previous frame.
contact_point: [f32; 3]Contact point used for positional warmstart.
age_frames: u32Age in frames since this entry was last refreshed.
Implementations§
Source§impl ContactCacheEntry
impl ContactCacheEntry
Sourcepub fn new(pair: &CollisionPair, contact: &ContactResult) -> Self
pub fn new(pair: &CollisionPair, contact: &ContactResult) -> Self
Create a new cache entry for the given pair and contact.
Sourcepub fn apply_warm_start(&self, pt: &mut ManifoldPoint)
pub fn apply_warm_start(&self, pt: &mut ManifoldPoint)
Apply warmstart data to a manifold point.
Trait Implementations§
Source§impl Clone for ContactCacheEntry
impl Clone for ContactCacheEntry
Source§fn clone(&self) -> ContactCacheEntry
fn clone(&self) -> ContactCacheEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContactCacheEntry
impl RefUnwindSafe for ContactCacheEntry
impl Send for ContactCacheEntry
impl Sync for ContactCacheEntry
impl Unpin for ContactCacheEntry
impl UnsafeUnpin for ContactCacheEntry
impl UnwindSafe for ContactCacheEntry
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