From 3f78cacdd93036dbd51bae77d5d8e5430a0bc75f Mon Sep 17 00:00:00 2001 From: Julian T Date: Sat, 6 Mar 2021 16:15:26 +0100 Subject: Several changes to bounding boxes For instance removed support for shapes without a bounding box, such as planes --- src/world/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/world/mod.rs') 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 { + fn bounding_box(&self) -> Bound3f { self.shape.bounding_box() } } -- cgit v1.2.3