aboutsummaryrefslogtreecommitdiff
path: root/src/world/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/world/mod.rs')
-rw-r--r--src/world/mod.rs7
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) {