From 1ed823c4fc7ad137b88019a2fa9f17ae3d10215d Mon Sep 17 00:00:00 2001 From: Keuin Date: Fri, 15 Apr 2022 14:34:46 +0800 Subject: Move diffusive into material_diffusive. Add material_reflective.h. --- material_reflective.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 material_reflective.h (limited to 'material_reflective.h') diff --git a/material_reflective.h b/material_reflective.h new file mode 100644 index 0000000..d2e4010 --- /dev/null +++ b/material_reflective.h @@ -0,0 +1,20 @@ +// +// Created by Keuin on 2022/4/15. +// + +#ifndef RT_MATERIAL_REFLECTIVE_H +#define RT_MATERIAL_REFLECTIVE_H + +#include "vec.h" +#include "material.h" + +// metal +class material_reflective : public material { + vec3d albedo; +public: + explicit material_reflective(vec3d &color) : albedo(color) {} + + bool scatter(ray3d &r, const object &hit_obj, double hit_t, random_uv_gen_3d &ruvg) const override; +}; + +#endif //RT_MATERIAL_REFLECTIVE_H -- cgit v1.2.3