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/sphere.hpp | |
| parent | 4379b46b46563c5a709df8d567ef75affc3fd31c (diff) | |
Replace old classes with compute shader structs
Diffstat (limited to 'include/sphere.hpp')
| -rw-r--r-- | include/sphere.hpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/sphere.hpp b/include/sphere.hpp index c33a796..a338f2e 100644 --- a/include/sphere.hpp +++ b/include/sphere.hpp @@ -1,19 +1,18 @@ #ifndef __SPHERE_HPP_ #define __SPHERE_HPP_ -#include "hittable.hpp" #include "material.hpp" -class sphere : public hittable { - public: - sphere(point3 center, double radius, std::shared_ptr<material> material); +struct sphere{ + sphere() = default; + sphere(point3 center, material material, float radius); - virtual bool hit(const ray& r, double t_min, double t_max, struct hit_info& info) const; + point3 center; - point3 center; - double radius; + material mat; - std::shared_ptr<material> mat_ptr; + float radius; + float padding[3]; }; #endif // !__SPHERE_HPP_ |
