From 56bed8e38f5b6d9effd77371ad781ae71601205b Mon Sep 17 00:00:00 2001 From: ladevieq Date: Mon, 21 Dec 2020 13:51:18 +0100 Subject: Add lambertian and metallic materials --- include/sphere.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/sphere.hpp') diff --git a/include/sphere.hpp b/include/sphere.hpp index 5bf0ab9..c33a796 100644 --- a/include/sphere.hpp +++ b/include/sphere.hpp @@ -2,15 +2,18 @@ #define __SPHERE_HPP_ #include "hittable.hpp" +#include "material.hpp" class sphere : public hittable { public: - sphere(point3 center, double radius = 1.0); + sphere(point3 center, double radius, std::shared_ptr material); virtual bool hit(const ray& r, double t_min, double t_max, struct hit_info& info) const; point3 center; double radius; + + std::shared_ptr mat_ptr; }; #endif // !__SPHERE_HPP_ -- cgit v1.3