pub struct B2Sweep {
pub local_center: B2vec2,
pub c0: B2vec2,
pub c: B2vec2,
pub a0: f32,
pub a: f32,
pub alpha0: f32,
}Expand description
This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin, which may no coincide with the center of mass. However, to support dynamics we must interpolate the center of mass position.
Fields§
§local_center: B2vec2§c0: B2vec2§c: B2vec2§a0: f32§a: f32§alpha0: f32Implementations§
Source§impl B2Sweep
impl B2Sweep
Sourcepub fn get_transform(self, transform: &mut B2Transform, beta: f32)
pub fn get_transform(self, transform: &mut B2Transform, beta: f32)
Get the interpolated transform at a specific time.
transform- the output transformbeta- is a factor in [0,1], where 0 indicates alpha0.
Trait Implementations§
impl Copy for B2Sweep
Auto Trait Implementations§
impl Freeze for B2Sweep
impl RefUnwindSafe for B2Sweep
impl Send for B2Sweep
impl Sync for B2Sweep
impl Unpin for B2Sweep
impl UnsafeUnpin for B2Sweep
impl UnwindSafe for B2Sweep
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