|
@@ -389,10 +389,62 @@ struct Material
|
|
|
|
|
|
|
|
|
Material(const Material &other) = default;
|
|
|
- Material(Material &&other) = default;
|
|
|
-
|
|
|
Material &operator=(const Material &other) = default;
|
|
|
- Material &operator=(Material &&other) = default;
|
|
|
+
|
|
|
+
|
|
|
+ //! Move constructor. This is explicitly written because MSVC doesn't support defaulting it
|
|
|
+ Material(Material &&other)
|
|
|
+ : mName(std::move(other.mName))
|
|
|
+ , mDiffuse(std::move(other.mDiffuse))
|
|
|
+ , mSpecularExponent(std::move(other.mSpecularExponent))
|
|
|
+ , mShininessStrength(std::move(other.mShininessStrength))
|
|
|
+ , mSpecular(std::move(other.mSpecular))
|
|
|
+ , mAmbient(std::move(other.mAmbient))
|
|
|
+ , mShading(std::move(other.mShading))
|
|
|
+ , mTransparency(std::move(other.mTransparency))
|
|
|
+ , sTexDiffuse(std::move(other.sTexDiffuse))
|
|
|
+ , sTexOpacity(std::move(other.sTexOpacity))
|
|
|
+ , sTexSpecular(std::move(other.sTexSpecular))
|
|
|
+ , sTexReflective(std::move(other.sTexReflective))
|
|
|
+ , sTexBump(std::move(other.sTexBump))
|
|
|
+ , sTexEmissive(std::move(other.sTexEmissive))
|
|
|
+ , sTexShininess(std::move(other.sTexShininess))
|
|
|
+ , mBumpHeight(std::move(other.mBumpHeight))
|
|
|
+ , mEmissive(std::move(other.mEmissive))
|
|
|
+ , sTexAmbient(std::move(other.sTexAmbient))
|
|
|
+ , mTwoSided(std::move(other.mTwoSided))
|
|
|
+ {
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ Material &operator=(Material &&other) {
|
|
|
+ if (this == &other) {
|
|
|
+ return *this;
|
|
|
+ }
|
|
|
+
|
|
|
+ mName = std::move(other.mName);
|
|
|
+ mDiffuse = std::move(other.mDiffuse);
|
|
|
+ mSpecularExponent = std::move(other.mSpecularExponent);
|
|
|
+ mShininessStrength = std::move(other.mShininessStrength),
|
|
|
+ mSpecular = std::move(other.mSpecular);
|
|
|
+ mAmbient = std::move(other.mAmbient);
|
|
|
+ mShading = std::move(other.mShading);
|
|
|
+ mTransparency = std::move(other.mTransparency);
|
|
|
+ sTexDiffuse = std::move(other.sTexDiffuse);
|
|
|
+ sTexOpacity = std::move(other.sTexOpacity);
|
|
|
+ sTexSpecular = std::move(other.sTexSpecular);
|
|
|
+ sTexReflective = std::move(other.sTexReflective);
|
|
|
+ sTexBump = std::move(other.sTexBump);
|
|
|
+ sTexEmissive = std::move(other.sTexEmissive);
|
|
|
+ sTexShininess = std::move(other.sTexShininess);
|
|
|
+ mBumpHeight = std::move(other.mBumpHeight);
|
|
|
+ mEmissive = std::move(other.mEmissive);
|
|
|
+ sTexAmbient = std::move(other.sTexAmbient);
|
|
|
+ mTwoSided = std::move(other.mTwoSided);
|
|
|
+
|
|
|
+ return *this;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
~Material() {}
|
|
|
|