diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2021-01-09 20:42:24 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2021-01-09 20:43:09 +0100 |
| commit | 2db0d27e7f1744443958717c19b732eed57455f2 (patch) | |
| tree | 839b8ea513c8c239f015071ab083bd50f03854a5 /include/hittable.hpp | |
| parent | 4379b46b46563c5a709df8d567ef75affc3fd31c (diff) | |
Replace old classes with compute shader structs
Diffstat (limited to 'include/hittable.hpp')
| -rw-r--r-- | include/hittable.hpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/include/hittable.hpp b/include/hittable.hpp deleted file mode 100644 index 074de55..0000000 --- a/include/hittable.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __HITTABLE_HPP_ -#define __HITTABLE_HPP_ - -#include <memory> - -#include "ray.hpp" - -class material; - -struct hit_info { - double t; - point3 point; - vec3 normal; - bool front_face; - std::shared_ptr<material> mat_ptr; - - inline void set_face_normal(const ray& r, const vec3& outward_normal) { - front_face = r.direction.dot(outward_normal) < 0.0; - normal = front_face ? outward_normal : (-outward_normal); - } -}; - -class hittable { - public: - virtual bool hit(const ray& r, double t_min, double t_max, struct hit_info& info) const = 0; -}; - -#endif // !__HITTABLE_HPP_ |
