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/container | |
parent | 978580ff9464f7470c46f3084ee26021b71933c8 (diff) |
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()); } } |