diff options
author | Julian T <julian@jtle.dk> | 2021-01-31 17:21:11 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2021-01-31 17:21:11 +0100 |
commit | c4369f86c920888bfaa00e46d74e3f5a1872a9ab (patch) | |
tree | 0bbfa3fa0d6db98b43b3854034def7f028a7a847 /src/scene/shapes/mod.rs | |
parent | 86303936ab3180828b984ebb256bab8e69dab5cf (diff) |
Add Scene type and Sphere intersect
Diffstat (limited to 'src/scene/shapes/mod.rs')
-rw-r--r-- | src/scene/shapes/mod.rs | 6 |
1 files changed, 2 insertions, 4 deletions
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<Float>; } |