From 2db0d27e7f1744443958717c19b732eed57455f2 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Sat, 9 Jan 2021 20:42:24 +0100 Subject: Replace old classes with compute shader structs --- include/sphere.hpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'include/sphere.hpp') 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); +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 mat_ptr; + float radius; + float padding[3]; }; #endif // !__SPHERE_HPP_ -- cgit v1.3