From 49c6adb0db70ffc30eaac33b66eacf7574b34e26 Mon Sep 17 00:00:00 2001 From: Julian T Date: Wed, 10 Feb 2021 23:06:48 +0100 Subject: Fixed most clippy warnings --- src/world/mod.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/world/mod.rs (limited to 'src/world/mod.rs') diff --git a/src/world/mod.rs b/src/world/mod.rs new file mode 100644 index 0000000..ef239db --- /dev/null +++ b/src/world/mod.rs @@ -0,0 +1,23 @@ +//! Manages world objects, and implements intersection +pub mod shapes; + +mod scene; +pub use scene::*; + +use std::rc::Rc; +use crate::core::Hittable; +use crate::material::Material; + +pub struct Object { + pub shape: Box, + pub mat: Rc, +} + +impl Object { + pub fn new(mat: Rc, shape: Box) -> Self { + Object { + mat, + shape, + } + } +} -- cgit v1.2.3