From d49996d8a672efe60ef6279782f74b521bcc8037 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Tue, 23 Jan 2018 19:38:38 +0200 Subject: [PATCH] 3DS: Add Material constructor which takes material name --- code/3DSHelper.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/code/3DSHelper.h b/code/3DSHelper.h index f0ab18e51..d70a6baf7 100644 --- a/code/3DSHelper.h +++ b/code/3DSHelper.h @@ -388,6 +388,20 @@ struct Material } + //! Constructor with explicit name + explicit Material(const std::string &name) + : mDiffuse ( ai_real( 0.6 ), ai_real( 0.6 ), ai_real( 0.6 ) ) // FIX ... we won't want object to be black + , mSpecularExponent ( ai_real( 0.0 ) ) + , mShininessStrength ( ai_real( 1.0 ) ) + , mShading(Discreet3DS::Gouraud) + , mTransparency ( ai_real( 1.0 ) ) + , mBumpHeight ( ai_real( 1.0 ) ) + , mTwoSided (false) + { + mName = name; + } + + Material(const Material &other) = default; Material(Material &&other) = default;