aboutsummaryrefslogtreecommitdiff
path: root/src/world/shapes/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/world/shapes/mod.rs')
-rw-r--r--src/world/shapes/mod.rs30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/world/shapes/mod.rs b/src/world/shapes/mod.rs
deleted file mode 100644
index a11df5d..0000000
--- a/src/world/shapes/mod.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-mod sphere;
-
-pub use sphere::Sphere;
-
-use crate::world::{Hittable, Intersection};
-use crate::core::{Bound3f, Ray};
-
-pub enum Shape {
- Sphere(Sphere),
-}
-
-impl Hittable for Shape {
- fn intersect(&self, ray: &Ray) -> Option<Intersection> {
- match self {
- Self::Sphere(sph) => sph.intersect(ray)
- }
- }
-
- fn bounding_box(&self) -> Bound3f {
- match self {
- Self::Sphere(sph) => sph.bounding_box()
- }
- }
-}
-
-impl From<Sphere> for Shape {
- fn from(s: Sphere) -> Self {
- Self::Sphere(s)
- }
-}