pub struct Ray {
pub origin: [f32; 3],
pub dir: [f32; 3],
}Expand description
A ray origin + t * dir, in mesh-local coordinates.
Fields§
§origin: [f32; 3]Where the ray starts.
dir: [f32; 3]The direction. It need not be normalized: t is measured in units of
dir, so it is a distance only when dir has unit length.
Subnormal components are valid input. When the largest-magnitude
component is subnormal, its reciprocal overflows and no computed t
is finite, so the ray never hits anything (the queries return no hit,
not an error); a subnormal component beside a normal larger one
behaves like zero.
Trait Implementations§
impl Copy for Ray
impl StructuralPartialEq for Ray
Auto Trait Implementations§
impl Freeze for Ray
impl RefUnwindSafe for Ray
impl Send for Ray
impl Sync for Ray
impl Unpin for Ray
impl UnsafeUnpin for Ray
impl UnwindSafe for Ray
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