intersections: derive Debug for PrecomputedData.

This commit is contained in:
Bill Thiede 2021-07-18 16:29:21 -07:00
parent 7e450d664e
commit 19b2ef6ded

View File

@ -135,6 +135,7 @@ impl<'i> Index<usize> for Intersections<'i> {
}
}
#[derive(Debug)]
pub struct PrecomputedData<'i> {
pub t: f32,
pub object: &'i Sphere,
@ -205,6 +206,7 @@ pub fn prepare_computations<'i>(i: &'i Intersection, r: &Ray) -> PrecomputedData
} else {
(false, normalv)
};
let over_point = point + normalv * EPSILON;
PrecomputedData {
t: i.t,