aboutsummaryrefslogtreecommitdiff
path: root/src/world/mod.rs
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-03-06 16:15:26 +0100
committerJulian T <julian@jtle.dk>2021-03-06 16:15:26 +0100
commit3f78cacdd93036dbd51bae77d5d8e5430a0bc75f (patch)
tree13d5e08607f44f30664ee9ced3fb139faeb5a67d /src/world/mod.rs
parentda1c3949a449f3fafe579c62ff6b14ffd993a197 (diff)
Several changes to bounding boxes
For instance removed support for shapes without a bounding box, such as planes
Diffstat (limited to 'src/world/mod.rs')
-rw-r--r--src/world/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/world/mod.rs b/src/world/mod.rs
index 43f7530..53d8ad3 100644
--- a/src/world/mod.rs
+++ b/src/world/mod.rs
@@ -2,11 +2,10 @@
pub mod shapes;
mod scene;
-mod container;
+pub mod container;
mod hittable;
pub use scene::*;
pub use hittable::{Intersection, Hittable};
-pub use container::HittableList;
use std::sync::Arc;
use crate::material::Material;
@@ -31,7 +30,7 @@ impl Hittable for Object {
self.shape.intersect(ray).map(|mut i| {i.m = Some(self.mat.as_ref()); i})
}
- fn bounding_box(&self) -> Option<Bound3f> {
+ fn bounding_box(&self) -> Bound3f {
self.shape.bounding_box()
}
}