diff options
author | Keuin <[email protected]> | 2022-04-15 14:52:36 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-04-15 14:52:48 +0800 |
commit | c063f5b568acdece80238270f9632fe58b21aa87 (patch) | |
tree | e31e7d89747d7164d57754b020acb7918e2d5779 | |
parent | 36689dfeb8e2e9dcd29c7820dabd5ccaa971a337 (diff) |
Add move constructor for material_reflective, move convenient.
-rw-r--r-- | material_reflective.h | 2 |
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; }; |