From c13515fb22fd7f9f42553b629ba479d711074094 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 19 Oct 2010 12:33:10 +0100 Subject: [PATCH] Fixed declaration / definision mismatch --- glm/core/type_mat2x2.inl | 16 ++++++++-------- glm/core/type_mat3x3.inl | 20 ++++++++++---------- glm/core/type_mat4x4.inl | 29 +++++++++++++++-------------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/glm/core/type_mat2x2.inl b/glm/core/type_mat2x2.inl index 1228478f..0dbefc1e 100644 --- a/glm/core/type_mat2x2.inl +++ b/glm/core/type_mat2x2.inl @@ -449,10 +449,10 @@ namespace detail } template - inline typename tmat2x2::row_type operator* + inline typename tmat2x2::col_type operator* ( tmat2x2 const & m, - typename tmat2x2::col_type const & v + typename tmat2x2::row_type const & v ) { return detail::tvec2( @@ -461,9 +461,9 @@ namespace detail } template - inline typename tmat2x2::col_type operator* + inline typename tmat2x2::row_type operator* ( - typename tmat2x2::row_type const & v, + typename tmat2x2::col_type const & v, tmat2x2 const & m ) { @@ -511,19 +511,19 @@ namespace detail } template - inline typename tmat2x2::row_type operator/ + inline typename tmat2x2::col_type operator/ ( tmat2x2 const & m, - typename tmat2x2::col_type & v + typename tmat2x2::row_type & v ) { return m._inverse() * v; } template - inline typename tmat2x2::col_type operator/ + inline typename tmat2x2::row_type operator/ ( - typename tmat2x2::row_type const & v, + typename tmat2x2::col_type const & v, tmat2x2 const & m ) { diff --git a/glm/core/type_mat3x3.inl b/glm/core/type_mat3x3.inl index 58737054..6eddeac2 100644 --- a/glm/core/type_mat3x3.inl +++ b/glm/core/type_mat3x3.inl @@ -505,26 +505,26 @@ namespace detail } template - inline typename tmat3x3::row_type operator* + inline typename tmat3x3::col_type operator* ( tmat3x3 const & m, - typename tmat3x3::col_type const & v + typename tmat3x3::row_type const & v ) { - return typename tmat3x3::row_type( + return typename tmat3x3::col_type( m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z, m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z); } template - inline typename tmat3x3::col_type operator* + inline typename tmat3x3::row_type operator* ( - typename tmat3x3::row_type const & v, + typename tmat3x3::col_type const & v, tmat3x3 const & m ) { - return typename tmat3x3::col_type( + return typename tmat3x3::row_type( m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z, m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z, m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z); @@ -598,19 +598,19 @@ namespace detail } template - inline typename tmat3x3::row_type operator/ + inline typename tmat3x3::col_type operator/ ( tmat3x3 const & m, - typename tmat3x3::col_type const & v + typename tmat3x3::row_type const & v ) { return m._inverse() * v; } template - inline typename tmat3x3::col_type operator/ + inline typename tmat3x3::row_type operator/ ( - typename tmat3x3::row_type const & v, + typename tmat3x3::col_type const & v, tmat3x3 const & m ) { diff --git a/glm/core/type_mat4x4.inl b/glm/core/type_mat4x4.inl index 0152e4b4..d42e8219 100644 --- a/glm/core/type_mat4x4.inl +++ b/glm/core/type_mat4x4.inl @@ -435,10 +435,11 @@ namespace detail - (this->value[0][0] * SubFactor14 - this->value[0][1] * SubFactor16 + this->value[0][3] * SubFactor18), + (this->value[0][0] * SubFactor15 - this->value[0][1] * SubFactor17 + this->value[0][2] * SubFactor18)); - value_type Determinant = this->value[0][0] * Inverse[0][0] - + this->value[0][1] * Inverse[1][0] - + this->value[0][2] * Inverse[2][0] - + this->value[0][3] * Inverse[3][0]; + value_type Determinant = + + this->value[0][0] * Inverse[0][0] + + this->value[0][1] * Inverse[1][0] + + this->value[0][2] * Inverse[2][0] + + this->value[0][3] * Inverse[3][0]; Inverse /= Determinant; return Inverse; @@ -558,13 +559,13 @@ namespace detail } template - inline typename tmat4x4::row_type operator* + inline typename tmat4x4::col_type operator* ( tmat4x4 const & m, - typename tmat4x4::col_type const & v + typename tmat4x4::row_type const & v ) { - return typename tmat4x4::row_type( + return typename tmat4x4::col_type( m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w, m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w, @@ -572,13 +573,13 @@ namespace detail } template - inline typename tmat4x4::col_type operator* + inline typename tmat4x4::row_type operator* ( - typename tmat4x4::row_type const & v, + typename tmat4x4::col_type const & v, tmat4x4 const & m ) { - return typename tmat4x4::col_type( + return typename tmat4x4::row_type( m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z + m[0][3] * v.w, m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z + m[1][3] * v.w, m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z + m[2][3] * v.w, @@ -639,19 +640,19 @@ namespace detail } template - inline typename tmat4x4::row_type operator/ + inline typename tmat4x4::col_type operator/ ( tmat4x4 const & m, - typename tmat4x4::col_type const & v + typename tmat4x4::row_type const & v ) { return m._inverse() * v; } template - inline typename tmat4x4::col_type operator/ + inline typename tmat4x4::row_type operator/ ( - typename tmat4x4::row_type const & v, + typename tmat4x4::col_type const & v, tmat4x4 const & m ) {