From 8e3bc57bf03457c33088e62c9d30da0565730257 Mon Sep 17 00:00:00 2001 From: Julian T Date: Fri, 6 Aug 2021 12:39:51 +0200 Subject: Add box shape and replicate RTTNW box --- src/world/container/list.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/world/container') 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, + elems: Vec, } impl HittableList { @@ -11,8 +11,8 @@ impl HittableList { Self::default() } - pub fn add(&mut self, h: Object) { - self.elems.push(h); + pub fn add>(&mut self, h: T) { + self.elems.push(h.into()); } } -- cgit v1.2.3