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/lambertian.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 include/lambertian.hpp (limited to 'include/lambertian.hpp') diff --git a/include/lambertian.hpp b/include/lambertian.hpp new file mode 100644 index 0000000..b9b7509 --- /dev/null +++ b/include/lambertian.hpp @@ -0,0 +1,15 @@ +#ifndef __LAMBERTIAN_HPP_ +#define __LAMBERTIAN_HPP_ + +#include "material.hpp" + +class lambertian : public material { + public: + lambertian(const color& albedo); + + virtual bool scatter(const ray& r, const struct hit_info& info, color& attenuation, ray& scattered) const; + + color albedo; +}; + +#endif // !__LAMBERTIAN_HPP_ -- cgit v1.3