diff options
Diffstat (limited to 'src/world/container')
-rw-r--r-- | src/world/container/list.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/world/container/list.rs b/src/world/container/list.rs index 22b6d88..f1a658d 100644 --- a/src/world/container/list.rs +++ b/src/world/container/list.rs @@ -1,9 +1,9 @@ -use crate::world::{Object, Hittable, Intersection}; +use crate::world::{Object, Hittable, DynHittable, Intersection}; use crate::core::{Bound3f, Ray}; pub struct HittableList { - elems: Vec<Object>, + elems: Vec<DynHittable>, } impl HittableList { @@ -11,8 +11,8 @@ impl HittableList { Self::default() } - pub fn add(&mut self, h: Object) { - self.elems.push(h); + pub fn add<T: Into<DynHittable>>(&mut self, h: T) { + self.elems.push(h.into()); } } |