From 6c8aa229ce458cd3ece7a1b06e8f555c778da5ef Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sun, 6 Mar 2016 19:41:37 -0500 Subject: [PATCH] Template conversions between matrices - e.g. dmat2x2 can now be implicitly converted to a mat4x3 --- glm/detail/type_mat2x2.hpp | 31 +++++++++++++++++++++++-------- glm/detail/type_mat2x2.inl | 24 ++++++++++++++++-------- glm/detail/type_mat2x3.hpp | 31 +++++++++++++++++++++++-------- glm/detail/type_mat2x3.inl | 24 ++++++++++++++++-------- glm/detail/type_mat2x4.hpp | 31 +++++++++++++++++++++++-------- glm/detail/type_mat2x4.inl | 24 ++++++++++++++++-------- glm/detail/type_mat3x2.hpp | 31 +++++++++++++++++++++++-------- glm/detail/type_mat3x2.inl | 24 ++++++++++++++++-------- glm/detail/type_mat3x3.hpp | 31 +++++++++++++++++++++++-------- glm/detail/type_mat3x3.inl | 24 ++++++++++++++++-------- glm/detail/type_mat3x4.hpp | 31 +++++++++++++++++++++++-------- glm/detail/type_mat3x4.inl | 24 ++++++++++++++++-------- glm/detail/type_mat4x2.hpp | 31 +++++++++++++++++++++++-------- glm/detail/type_mat4x2.inl | 24 ++++++++++++++++-------- glm/detail/type_mat4x3.hpp | 31 +++++++++++++++++++++++-------- glm/detail/type_mat4x3.inl | 24 ++++++++++++++++-------- glm/detail/type_mat4x4.hpp | 31 +++++++++++++++++++++++-------- glm/detail/type_mat4x4.inl | 24 ++++++++++++++++-------- 18 files changed, 351 insertions(+), 144 deletions(-) diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index a263d54d..85527270 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -102,14 +102,29 @@ namespace glm template GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x2 const & m); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x3 const & x); + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat3x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat4x3 const & x); // -- Accesses -- diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index 3f215e3f..df050763 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -149,56 +149,64 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat3x3 const & m) + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat4x4 const & m) + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x3 const & m) + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat3x2 const & m) + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat3x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x4 const & m) + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat4x2 const & m) + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat4x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat3x4 const & m) + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat4x3 const & m) + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat4x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index 7fc67faa..e8067b76 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -99,14 +99,29 @@ namespace glm template GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x3 const & m); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat3x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat4x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat3x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat3x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat4x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat4x3 const & x); + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat3x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat4x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat3x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat3x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat4x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat4x3 const & x); // -- Accesses -- diff --git a/glm/detail/type_mat2x3.inl b/glm/detail/type_mat2x3.inl index e7cabb72..5fedc05d 100644 --- a/glm/detail/type_mat2x3.inl +++ b/glm/detail/type_mat2x3.inl @@ -133,56 +133,64 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x2 const & m) + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x2 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat3x3 const & m) + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat4x4 const & m) + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x4 const & m) + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat3x2 const & m) + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat3x2 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat3x4 const & m) + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat4x2 const & m) + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat4x2 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat4x3 const & m) + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat4x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index e03e0948..7297c35c 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -101,14 +101,29 @@ namespace glm template GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x4 const & m); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x3 const & x); + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat3x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat4x3 const & x); // -- Accesses -- diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index f92b4df5..e8ecae3a 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -134,56 +134,64 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x2 const & m) + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x2 const & m) { this->value[0] = col_type(m[0], 0, 0); this->value[1] = col_type(m[1], 0, 0); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat3x3 const & m) + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat3x3 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat4x4 const & m) + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x3 const & m) + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x3 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat3x2 const & m) + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat3x2 const & m) { this->value[0] = col_type(m[0], 0, 0); this->value[1] = col_type(m[1], 0, 0); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat3x4 const & m) + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat3x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat4x2 const & m) + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat4x2 const & m) { this->value[0] = col_type(m[0], 0, 0); this->value[1] = col_type(m[1], 0, 0); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat4x3 const & m) + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat4x3 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index 2f594bb1..fb91ee58 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -106,14 +106,29 @@ namespace glm template GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat3x2 const & m); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat2x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat3x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat4x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat2x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat2x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat3x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat4x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat4x3 const & x); + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat2x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat3x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat4x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat2x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat2x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat3x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat4x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat4x3 const & x); // -- Accesses -- diff --git a/glm/detail/type_mat3x2.inl b/glm/detail/type_mat3x2.inl index 24079cfe..690e54ff 100644 --- a/glm/detail/type_mat3x2.inl +++ b/glm/detail/type_mat3x2.inl @@ -155,7 +155,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat2x2 const & m) + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat2x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -163,7 +164,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x3 const & m) + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -171,7 +173,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat4x4 const & m) + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -179,7 +182,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat2x3 const & m) + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat2x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -187,7 +191,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat2x4 const & m) + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -195,7 +200,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x4 const & m) + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -203,7 +209,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat4x2 const & m) + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat4x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -211,7 +218,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat4x3 const & m) + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat4x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index 2aaae21e..4c6123b4 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -110,14 +110,29 @@ namespace glm template GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat3x3 const & m); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat2x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat4x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat2x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat3x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat2x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat4x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat3x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat4x3 const & x); + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat2x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat4x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat2x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat3x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat2x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat4x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat3x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat4x3 const & x); // -- Accesses -- diff --git a/glm/detail/type_mat3x3.inl b/glm/detail/type_mat3x3.inl index c3b07108..1f2d19a0 100644 --- a/glm/detail/type_mat3x3.inl +++ b/glm/detail/type_mat3x3.inl @@ -180,7 +180,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat2x2 const & m) + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat2x2 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); @@ -188,7 +189,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat4x4 const & m) + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -196,7 +198,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat2x3 const & m) + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat2x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -204,7 +207,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x2 const & m) + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x2 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); @@ -212,7 +216,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat2x4 const & m) + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -220,7 +225,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat4x2 const & m) + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat4x2 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); @@ -228,7 +234,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x4 const & m) + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -236,7 +243,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat4x3 const & m) + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat4x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index 6b5c1dbe..2ceda6f1 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -106,14 +106,29 @@ namespace glm template GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat3x4 const & m); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat2x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat3x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat4x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat2x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat3x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat2x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat4x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat4x3 const & x); + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat2x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat3x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat4x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat2x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat3x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat2x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat4x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat4x3 const & x); // -- Accesses -- diff --git a/glm/detail/type_mat3x4.inl b/glm/detail/type_mat3x4.inl index dd1f0563..390a290c 100644 --- a/glm/detail/type_mat3x4.inl +++ b/glm/detail/type_mat3x4.inl @@ -155,7 +155,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat2x2 const & m) + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat2x2 const & m) { this->value[0] = col_type(m[0], 0, 0); this->value[1] = col_type(m[1], 0, 0); @@ -163,7 +164,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x3 const & m) + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x3 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); @@ -171,7 +173,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat4x4 const & m) + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -179,7 +182,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat2x3 const & m) + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat2x3 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); @@ -187,7 +191,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x2 const & m) + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x2 const & m) { this->value[0] = col_type(m[0], 0, 0); this->value[1] = col_type(m[1], 0, 0); @@ -195,7 +200,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat2x4 const & m) + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -203,7 +209,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat4x2 const & m) + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat4x2 const & m) { this->value[0] = col_type(m[0], 0, 0); this->value[1] = col_type(m[1], 0, 0); @@ -211,7 +218,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat4x3 const & m) + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat4x3 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index a52675b8..8b61956b 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -111,14 +111,29 @@ namespace glm template GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat4x2 const & m); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat2x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat3x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat4x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat2x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat3x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat2x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat4x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat3x4 const & x); + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat2x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat3x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat4x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat2x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat3x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat2x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat4x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat3x4 const & x); // -- Accesses -- diff --git a/glm/detail/type_mat4x2.inl b/glm/detail/type_mat4x2.inl index 2040d4a6..56882248 100644 --- a/glm/detail/type_mat4x2.inl +++ b/glm/detail/type_mat4x2.inl @@ -169,7 +169,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat2x2 const & m) + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat2x2 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -178,7 +179,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat3x3 const & m) + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -187,7 +189,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x4 const & m) + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -196,7 +199,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat2x3 const & m) + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat2x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -205,7 +209,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat3x2 const & m) + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat3x2 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -214,7 +219,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat2x4 const & m) + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -223,7 +229,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x3 const & m) + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -232,7 +239,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat3x4 const & m) + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index 9ee26169..fffacb6a 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -111,14 +111,29 @@ namespace glm template GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x3 const & m); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x4 const & x); + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat2x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat3x4 const & x); // -- Accesses -- diff --git a/glm/detail/type_mat4x3.inl b/glm/detail/type_mat4x3.inl index 58eeb6f9..7c478fe6 100644 --- a/glm/detail/type_mat4x3.inl +++ b/glm/detail/type_mat4x3.inl @@ -169,7 +169,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat2x2 const & m) + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat2x2 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); @@ -178,7 +179,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat3x3 const & m) + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -187,7 +189,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x4 const & m) + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -196,7 +199,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat2x3 const & m) + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat2x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -205,7 +209,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat3x2 const & m) + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat3x2 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); @@ -214,7 +219,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat2x4 const & m) + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -223,7 +229,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x2 const & m) + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x2 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); @@ -232,7 +239,8 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat3x4 const & m) + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index bb5fba0b..d7b808d4 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -115,14 +115,29 @@ namespace glm template GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat4x4 const & m); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat2x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat3x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat2x3 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat3x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat2x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat4x2 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat3x4 const & x); - GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat4x3 const & x); + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat2x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat3x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat2x3 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat3x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat2x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat4x2 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat3x4 const & x); + + template + GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat4x3 const & x); // -- Accesses -- diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index acfa318c..b7f096c4 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -257,7 +257,8 @@ namespace detail // -- Matrix conversions -- template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat2x2 const & m) + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat2x2 const & m) { this->value[0] = col_type(m[0], 0, 0); this->value[1] = col_type(m[1], 0, 0); @@ -266,7 +267,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat3x3 const & m) + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat3x3 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); @@ -275,7 +277,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat2x3 const & m) + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat2x3 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0); @@ -284,7 +287,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat3x2 const & m) + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat3x2 const & m) { this->value[0] = col_type(m[0], 0, 0); this->value[1] = col_type(m[1], 0, 0); @@ -293,7 +297,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat2x4 const & m) + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat2x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -302,7 +307,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat4x2 const & m) + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat4x2 const & m) { this->value[0] = col_type(m[0], 0, 0); this->value[1] = col_type(m[1], 0, 0); @@ -311,7 +317,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat3x4 const & m) + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat3x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -320,7 +327,8 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat4x3 const & m) + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat4x3 const & m) { this->value[0] = col_type(m[0], 0); this->value[1] = col_type(m[1], 0);