aboutsummaryrefslogtreecommitdiffstats
path: root/include/sphere.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/sphere.hpp')
-rw-r--r--include/sphere.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/sphere.hpp b/include/sphere.hpp
index a338f2e..28bb0bc 100644
--- a/include/sphere.hpp
+++ b/include/sphere.hpp
@@ -1,16 +1,22 @@
#ifndef __SPHERE_HPP_
#define __SPHERE_HPP_
+#include "aabb.hpp"
#include "material.hpp"
-struct sphere{
+struct sphere {
sphere() = default;
- sphere(point3 center, material material, float radius);
+ sphere(point3 center, material material, float radius)
+ : center(center), radius(radius), mat(material),
+ bounding_box(center, radius)
+ {}
point3 center;
material mat;
+ aabb bounding_box;
+
float radius;
float padding[3];
};