Skip to main content

Ray4

Type Alias Ray4 

Source
pub type Ray4 = RTCRay4;
Expand description

A ray packet of size 4.

Aliased Type§

#[repr(C, align(16))]
pub struct Ray4 { pub org_x: [f32; 4], pub org_y: [f32; 4], pub org_z: [f32; 4], pub tnear: [f32; 4], pub dir_x: [f32; 4], pub dir_y: [f32; 4], pub dir_z: [f32; 4], pub time: [f32; 4], pub tfar: [f32; 4], pub mask: [u32; 4], pub id: [u32; 4], pub flags: [u32; 4], }

Fields§

§org_x: [f32; 4]§org_y: [f32; 4]§org_z: [f32; 4]§tnear: [f32; 4]§dir_x: [f32; 4]§dir_y: [f32; 4]§dir_z: [f32; 4]§time: [f32; 4]§tfar: [f32; 4]§mask: [u32; 4]§id: [u32; 4]§flags: [u32; 4]

Implementations§

Source§

impl Ray4

Source

pub const fn new(origin: [[f32; 3]; 4], dir: [[f32; 3]; 4]) -> Ray4

Source

pub const fn segment( origin: [[f32; 3]; 4], dir: [[f32; 3]; 4], tnear: [f32; 4], tfar: [f32; 4], ) -> Ray4

Source

pub const fn empty() -> Ray4

Source

pub fn iter(&self) -> SoARayIter<'_, Ray4>

Source

pub fn iter_mut(&mut self) -> SoARayIterMut<'_, Ray4>

Trait Implementations§

Source§

impl Default for Ray4

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl RayPacket for Ray4

Source§

const LEN: usize = 4

Source§

impl SoARay for Ray4

Source§

fn org(&self, i: usize) -> [f32; 3]

Source§

fn set_org(&mut self, i: usize, o: [f32; 3])

Source§

fn tnear(&self, i: usize) -> f32

Source§

fn set_tnear(&mut self, i: usize, t: f32)

Source§

fn dir(&self, i: usize) -> [f32; 3]

Source§

fn set_dir(&mut self, i: usize, d: [f32; 3])

Source§

fn time(&self, i: usize) -> f32

Source§

fn set_time(&mut self, i: usize, t: f32)

Source§

fn tfar(&self, i: usize) -> f32

Source§

fn set_tfar(&mut self, i: usize, t: f32)

Source§

fn mask(&self, i: usize) -> u32

Source§

fn set_mask(&mut self, i: usize, m: u32)

Source§

fn id(&self, i: usize) -> u32

Source§

fn set_id(&mut self, i: usize, id: u32)

Source§

fn flags(&self, i: usize) -> u32

Source§

fn set_flags(&mut self, i: usize, f: u32)

Source§

fn unit_dir(&self, i: usize) -> [f32; 3]