diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2020-12-21 13:51:18 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2020-12-21 13:51:18 +0100 |
| commit | 56bed8e38f5b6d9effd77371ad781ae71601205b (patch) | |
| tree | 1f57155b8f5b15fd2b33ac7e926e3e5d0ce1754c /include/sphere.hpp | |
| parent | 92d66138f53645f3400f633c9821a6fa36f589e0 (diff) | |
Add lambertian and metallic materials
Diffstat (limited to 'include/sphere.hpp')
| -rw-r--r-- | include/sphere.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
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> 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<material> mat_ptr; }; #endif // !__SPHERE_HPP_ |
