aboutsummaryrefslogtreecommitdiff
path: root/src/world/scene.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/world/scene.rs')
-rw-r--r--src/world/scene.rs43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/world/scene.rs b/src/world/scene.rs
deleted file mode 100644
index 87bec1f..0000000
--- a/src/world/scene.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-use crate::core::{Bound3f, Ray};
-
-use super::{Object, container, Hittable, Intersection};
-
-type Container = container::HittableList;
-
-pub struct Scene {
- content: Container,
-}
-
-impl Scene {
- pub fn new() -> Self {
- Self::default()
- }
-
- pub fn add_object(&mut self, obj: Object) {
- self.content.add(obj);
- }
-
- pub fn add_objects(&mut self, objs: Vec<Object>) {
- for obj in objs {
- self.add_object(obj);
- }
- }
-}
-
-impl Hittable for Scene {
- fn intersect(&self, ray: &Ray) -> Option<Intersection> {
- self.content.intersect(ray)
- }
-
- fn bounding_box(&self) -> Bound3f {
- self.content.bounding_box()
- }
-}
-
-impl Default for Scene {
- fn default() -> Self {
- Self {
- content: Container::new(),
- }
- }
-}