blob: 91afa7c745d44dc7bab6455932bd14873bb19933 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//
// 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) {}
explicit material_reflective(vec3d &&color) : albedo(color) {}
explicit material_reflective(double color) : albedo{color, color, color} {}
bool scatter(ray3d &r, const object &hit_obj, double hit_t, random_uv_gen_3d &ruvg) const override;
};
#endif //RT_MATERIAL_REFLECTIVE_H
|