pub struct SweepHit<const D: usize> {
pub fraction: f32,
pub normal: [f32; D],
pub kind: SweepHitKind,
}Expand description
First contact of a ball translated over a finite segment.
Fields§
§fraction: f32Fraction of the supplied displacement in [0, 1], including both ends.
normal: [f32; D]Unit normal pointing out of the stationary target toward the moving ball. Coincident ball centers use the opposite movement direction, or +X for zero movement. Inside boxes use the closest face, with X winning ties.
kind: SweepHitKindTrait Implementations§
impl<const D: usize> Copy for SweepHit<D>
impl<const D: usize> StructuralPartialEq for SweepHit<D>
Auto Trait Implementations§
impl<const D: usize> Freeze for SweepHit<D>
impl<const D: usize> RefUnwindSafe for SweepHit<D>
impl<const D: usize> Send for SweepHit<D>
impl<const D: usize> Sync for SweepHit<D>
impl<const D: usize> Unpin for SweepHit<D>
impl<const D: usize> UnwindSafe for SweepHit<D>
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