From c4369f86c920888bfaa00e46d74e3f5a1872a9ab Mon Sep 17 00:00:00 2001 From: Julian T Date: Sun, 31 Jan 2021 17:21:11 +0100 Subject: Add Scene type and Sphere intersect --- src/scene/shapes/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/scene/shapes/mod.rs') diff --git a/src/scene/shapes/mod.rs b/src/scene/shapes/mod.rs index 76fb6f2..7fbb8db 100644 --- a/src/scene/shapes/mod.rs +++ b/src/scene/shapes/mod.rs @@ -5,8 +5,6 @@ pub use sphere::Sphere; use crate::core::Ray; use crate::Float; -trait Shape { - // - fn intersect(ray: Ray) -> Float; - fn intersect_ +pub trait Shape { + fn intersect(&self, ray: &Ray) -> Option; } -- cgit v1.2.3