summaryrefslogtreecommitdiff
path: root/material_reflective.h
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-04-15 14:52:36 +0800
committerKeuin <[email protected]>2022-04-15 14:52:48 +0800
commitc063f5b568acdece80238270f9632fe58b21aa87 (patch)
treee31e7d89747d7164d57754b020acb7918e2d5779 /material_reflective.h
parent36689dfeb8e2e9dcd29c7820dabd5ccaa971a337 (diff)
Add move constructor for material_reflective, move convenient.
Diffstat (limited to 'material_reflective.h')
-rw-r--r--material_reflective.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/material_reflective.h b/material_reflective.h
index d2e4010..91afa7c 100644
--- a/material_reflective.h
+++ b/material_reflective.h
@@ -13,6 +13,8 @@ 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;
};