diff options
Diffstat (limited to 'include/sphere.hpp')
| -rw-r--r-- | include/sphere.hpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sphere.hpp b/include/sphere.hpp new file mode 100644 index 0000000..5bf0ab9 --- /dev/null +++ b/include/sphere.hpp @@ -0,0 +1,16 @@ +#ifndef __SPHERE_HPP_ +#define __SPHERE_HPP_ + +#include "hittable.hpp" + +class sphere : public hittable { + public: + sphere(point3 center, double radius = 1.0); + + virtual bool hit(const ray& r, double t_min, double t_max, struct hit_info& info) const; + + point3 center; + double radius; +}; + +#endif // !__SPHERE_HPP_ |
