#[repr(C, align(16))]pub struct Ray {
pub origin: [f32; 3],
pub padding_0: u32,
pub dir: [f32; 3],
pub padding_1: u32,
pub r_d: [f32; 3],
pub padding_2: u32,
pub hit: Intersection,
}Expand description
Ray data.
Origin, distance, and Intersection.
§Notes
Padding is unused and required for optimal alignment and performance.
Fields§
§origin: [f32; 3]Ray origin
padding_0: u32§dir: [f32; 3]Ray direction
padding_1: u32§r_d: [f32; 3]Ray inverse direction.
Automatically computed when using Ray::new.
padding_2: u32§hit: IntersectionRay intersection data.
Implementations§
Trait Implementations§
Source§impl ExternType for Ray
impl ExternType for Ray
impl Copy for Ray
impl Pod 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 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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.