intersections: derive Debug for PrecomputedData.
This commit is contained in:
parent
7e450d664e
commit
19b2ef6ded
@ -135,6 +135,7 @@ impl<'i> Index<usize> for Intersections<'i> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct PrecomputedData<'i> {
|
pub struct PrecomputedData<'i> {
|
||||||
pub t: f32,
|
pub t: f32,
|
||||||
pub object: &'i Sphere,
|
pub object: &'i Sphere,
|
||||||
@ -205,6 +206,7 @@ pub fn prepare_computations<'i>(i: &'i Intersection, r: &Ray) -> PrecomputedData
|
|||||||
} else {
|
} else {
|
||||||
(false, normalv)
|
(false, normalv)
|
||||||
};
|
};
|
||||||
|
|
||||||
let over_point = point + normalv * EPSILON;
|
let over_point = point + normalv * EPSILON;
|
||||||
PrecomputedData {
|
PrecomputedData {
|
||||||
t: i.t,
|
t: i.t,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user