diff options
Diffstat (limited to 'src/world/shapes')
-rw-r--r-- | src/world/shapes/sphere.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/world/shapes/sphere.rs b/src/world/shapes/sphere.rs index e3348de..9ecedd6 100644 --- a/src/world/shapes/sphere.rs +++ b/src/world/shapes/sphere.rs @@ -42,12 +42,12 @@ impl Hittable for Sphere { return None } let w = ray.at(distance); - Some(Intersection { - n: self.norm_at(&w), - p: w, - t: distance, - m: None, - }) + Some(Intersection::new( + self.norm_at(&w), + w, + ray, + distance, + )) } } |