pub fn draw_ray(ray: &Ray<f64>, object: &Polyhedron) -> Option<(f64, image::Rgb<u8>)> {
        match object.shape.toi_with_ray(&object.position, &ray, false) {
            Some(distance) => Some((distance, object.color)),
            None => None,
        }
    }
/// Draws a ray at a certain angle and returns the color and distance to whatever it hits.
/// Note that the length of the ray does not matter (in examples all fields are usually 1.0).
/// # Arguments:
/// * `ray` -  The ray that will get drawn through the object. Note that the size of the ray is of
/// no consequence. Most examples here use 1.0 for all fields.
/// * `object` - The object that the ray will be drawn through.
Draws a ray at a certain angle and returns the color and distance to whatever it hits.
Note that the length of the ray does not matter (in examples all fields are usually 1.0).
Draws a ray at a certain angle and returns the color and distance to whatever it hits . Note that the length of the ray does not matter ( in examples all fields are usually 1 . 0 ) .
pub fn draw_ray(ray: &Ray<f64>, object: &Polyhedron) -> Option<(f64, image::Rgb<u8>)> {
        match object.shape.toi_with_ray(&object.position, &ray, false) {
            Some(distance) => Some((distance, object.color)),
            None => None,
        }
    }
pub fn draw_ray ( ray : & Ray < f64 > , object : & Polyhedron ) -> Option < ( f64 , image :: Rgb < u8 > ) > { match object . shape . toi_with_ray ( & object . position , & ray , false ) { Some ( distance ) => Some ( ( distance , object . color ) ) , None => None , } }
Draws a ray at a certain angle and returns the color and distance to whatever it hits.
Draws a ray at a certain angle and returns the color and distance to whatever it hits .
ray
&Ray<f64>
object
&Polyhedron
arguments:
`ray` -  The ray that will get drawn through the object. Note that the size of the ray is of
no consequence. Most examples here use 1.0 for all fields.
`object` - The object that the ray will be drawn through.
` ray ` - The ray that will get drawn through the object . Note that the size of the ray is of no consequence . Most examples here use 1 . 0 for all fields . ` object ` - The object that the ray will be drawn through .