Type Alias Ray

Source
pub type Ray = RTCRay;

Aliased Type§

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

Fields§

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

Implementations§

Source§

impl Ray

Source

pub fn new(origin: Vector3<f32>, dir: Vector3<f32>) -> Ray

Create a new ray starting at origin and heading in direction dir

Source

pub fn segment( origin: Vector3<f32>, dir: Vector3<f32>, tnear: f32, tfar: f32, ) -> Ray