From c063f5b568acdece80238270f9632fe58b21aa87 Mon Sep 17 00:00:00 2001 From: Keuin Date: Fri, 15 Apr 2022 14:52:36 +0800 Subject: Add move constructor for material_reflective, move convenient. --- material_reflective.h | 2 ++ 1 file changed, 2 insertions(+) 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; }; -- cgit v1.2.3