aboutsummaryrefslogtreecommitdiff
path: root/src/world/shapes/sphere.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/world/shapes/sphere.rs')
-rw-r--r--src/world/shapes/sphere.rs12
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,
+ ))
}
}