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