diff options
author | Julian T <julian@jtle.dk> | 2021-07-31 18:27:56 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2021-07-31 18:27:56 +0200 |
commit | ae460c3f34838e3baf0ffafe4ccbcf1fbfe03095 (patch) | |
tree | a2ff1092f5deb2d28f5196d69ba511487f0a4953 /src/world/container | |
parent | cee9bcf4a2c8ffbfe6487f7886b2247eaba1c92c (diff) |
Remove dynamic boxes from object and list implementation
Diffstat (limited to 'src/world/container')
-rw-r--r-- | src/world/container/list.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/world/container/list.rs b/src/world/container/list.rs index c8e3fdd..22b6d88 100644 --- a/src/world/container/list.rs +++ b/src/world/container/list.rs @@ -1,9 +1,9 @@ -use crate::world::{Hittable, Intersection}; +use crate::world::{Object, Hittable, Intersection}; use crate::core::{Bound3f, Ray}; pub struct HittableList { - elems: Vec<Box<dyn Hittable>>, + elems: Vec<Object>, } impl HittableList { @@ -11,7 +11,7 @@ impl HittableList { Self::default() } - pub fn add(&mut self, h: Box<dyn Hittable>) { + pub fn add(&mut self, h: Object) { self.elems.push(h); } } |