diff --git a/include/assimp/matrix4x4.h b/include/assimp/matrix4x4.h index 17b2d3106..9f87efca7 100644 --- a/include/assimp/matrix4x4.h +++ b/include/assimp/matrix4x4.h @@ -112,6 +112,8 @@ public: // matrix multiplication. aiMatrix4x4t& operator *= (const aiMatrix4x4t& m); aiMatrix4x4t operator * (const aiMatrix4x4t& m) const; + aiMatrix4x4t operator * (const TReal& aFloat) const; + aiMatrix4x4t operator + (const aiMatrix4x4t& aMatrix) const; template operator aiMatrix4x4t () const; diff --git a/include/assimp/matrix4x4.inl b/include/assimp/matrix4x4.inl index 32012654c..c36c893ce 100644 --- a/include/assimp/matrix4x4.inl +++ b/include/assimp/matrix4x4.inl @@ -155,6 +155,54 @@ inline aiMatrix4x4t& aiMatrix4x4t::operator *= (const aiMatrix4x4t return *this; } +// ---------------------------------------------------------------------------------------- +template +inline aiMatrix4x4t aiMatrix4x4t::operator* (const TReal& aFloat) const +{ + aiMatrix4x4t temp( + a1 * aFloat, + a2 * aFloat, + a3 * aFloat, + a4 * aFloat, + b1 * aFloat, + b2 * aFloat, + b3 * aFloat, + b4 * aFloat, + c1 * aFloat, + c2 * aFloat, + c3 * aFloat, + c4 * aFloat, + d1 * aFloat, + d2 * aFloat, + d3 * aFloat, + d4 * aFloat); + return temp; +} + +// ---------------------------------------------------------------------------------------- +template +inline aiMatrix4x4t aiMatrix4x4t::operator+ (const aiMatrix4x4t& m) const +{ + aiMatrix4x4t temp( + m.a1 + a1, + m.a2 + a2, + m.a3 + a3, + m.a4 + a4, + m.b1 + b1, + m.b2 + b2, + m.b3 + b3, + m.b4 + b4, + m.c1 + c1, + m.c2 + c2, + m.c3 + c3, + m.c4 + c4, + m.d1 + d1, + m.d2 + d2, + m.d3 + d3, + m.d4 + d4); + return temp; +} + // ---------------------------------------------------------------------------------------- template inline aiMatrix4x4t aiMatrix4x4t::operator* (const aiMatrix4x4t& m) const