pub struct Ray {
    pub origin: Point,
    pub dir: Vector,
    pub tmin: f32,
    pub tmax: f32,
    pub depth: u32,
}Expand description
Light Ray struct.
Fields§
§origin: PointOrigin Point of the light ray.
dir: VectorVector propagation direction.
tmin: f32Minimum time of propagation.
tmax: f32Maximum time of propagation.
depth: u32Counts the number of reflection occurred.
If a ray is produced by a reflection,
its depth is increased by 1 with respect to the original ray.
Implementations§
Trait Implementations§
source§impl Default for Ray
 
impl Default for Ray
source§fn default() -> Self
 
fn default() -> Self
Return as default ray a Ray with:
- the origin of axis as 
origin - an x-axis oriented unit vector as 
dir tmin = 1e-5tmax =f32::INFINITYdepth = 0
source§impl Mul<Ray> for Transformation
 
impl Mul<Ray> for Transformation
impl Copy for Ray
Auto Trait Implementations§
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