diff --git a/kiwano/2d/Node.cpp b/kiwano/2d/Node.cpp index cf77abc7..52d18492 100644 --- a/kiwano/2d/Node.cpp +++ b/kiwano/2d/Node.cpp @@ -220,7 +220,7 @@ namespace kiwano if (parent_) { - transform_matrix_ = transform_matrix_ * parent_->transform_matrix_; + transform_matrix_ *= parent_->transform_matrix_; } // update children's transform diff --git a/kiwano/math/Matrix.hpp b/kiwano/math/Matrix.hpp index dd251212..5c3f7194 100644 --- a/kiwano/math/Matrix.hpp +++ b/kiwano/math/Matrix.hpp @@ -78,8 +78,8 @@ namespace kiwano { } - template - MatrixT(T const& other) + template + MatrixT(_MTy const& other) { for (int i = 0; i < 6; i++) m[i] = other[i]; @@ -95,12 +95,24 @@ namespace kiwano return m[index]; } - template - inline MatrixT& operator= (MatrixMultiply const& other) + inline MatrixT& operator= (MatrixT const& other) { for (int i = 0; i < 6; i++) m[i] = other[i]; - return *this; + return (*this); + } + + template + inline MatrixT& operator= (MatrixMultiply const& other) + { + MatrixT result(other); + (*this) = result; + return (*this); + } + + inline MatrixT& operator*= (MatrixT const& other) + { + return operator=((*this) * other); } inline void Identity()