aboutsummaryrefslogtreecommitdiff
path: root/src/world/container
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-07-31 18:27:56 +0200
committerJulian T <julian@jtle.dk>2021-07-31 18:27:56 +0200
commitae460c3f34838e3baf0ffafe4ccbcf1fbfe03095 (patch)
treea2ff1092f5deb2d28f5196d69ba511487f0a4953 /src/world/container
parentcee9bcf4a2c8ffbfe6487f7886b2247eaba1c92c (diff)
Remove dynamic boxes from object and list implementation
Diffstat (limited to 'src/world/container')
-rw-r--r--src/world/container/list.rs6
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);
}
}