diff options
author | Julian T <julian@jtle.dk> | 2021-08-06 12:39:51 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2021-08-06 12:39:51 +0200 |
commit | 8e3bc57bf03457c33088e62c9d30da0565730257 (patch) | |
tree | 6aba7020638f6060ff0bd033ef72ea557b6a2203 /src/world/mod.rs | |
parent | 978580ff9464f7470c46f3084ee26021b71933c8 (diff) |
Diffstat (limited to 'src/world/mod.rs')
-rw-r--r-- | src/world/mod.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/world/mod.rs b/src/world/mod.rs index dd96b91..0394ffe 100644 --- a/src/world/mod.rs +++ b/src/world/mod.rs @@ -8,7 +8,6 @@ mod instancing; pub use scene::*; pub use hittable::{Intersection, Hittable, DynHittable}; -pub use shapes::Shape; pub use instancing::{Instance, Instancable}; use std::sync::Arc; @@ -29,6 +28,12 @@ impl Object { } } +impl Into<DynHittable> for Object { + fn into(self) -> DynHittable { + DynHittable::new(Box::new(self)) + } +} + impl Hittable for Object { fn intersect(&self, ray: &Ray) -> Option<Intersection> { if let Some(mut inter) = self.inner.intersect(ray) { |