From 61d58b0296b5ebcb459f312d0af586e330d020d7 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 19 Mar 2016 12:28:18 +0100 Subject: [PATCH 01/12] Fixed missing GLM_PLATFORM_CYGWIN declaration #495 --- glm/detail/setup.hpp | 1 + readme.md | 1 + 2 files changed, 2 insertions(+) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index f8378ee0..d14d0e25 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -62,6 +62,7 @@ #define GLM_PLATFORM_UNIX 0x00400000 #define GLM_PLATFORM_QNXNTO 0x00800000 #define GLM_PLATFORM_WINCE 0x01000000 +#define GLM_PLATFORM_CYGWIN 0x02000000 #ifdef GLM_FORCE_PLATFORM_UNKNOWN # define GLM_PLATFORM GLM_PLATFORM_UNKNOWN diff --git a/readme.md b/readme.md index e637bc4b..af96182c 100644 --- a/readme.md +++ b/readme.md @@ -58,6 +58,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Fixed outerProduct defintions and operator signatures for mat2x4 and vec4 #475 - Fixed eulerAngles precision error, returns NaN #451 - Fixed undefined reference errors #489 +- Fixed missing GLM_PLATFORM_CYGWIN declaration #495 #### [GLM 0.9.7.3](https://github.com/g-truc/glm/releases/tag/0.9.7.3) - 2016-02-21 ##### Improvements: From 6c61c332f40f6bc191e62867b10b489fe666d9c6 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 19 Mar 2016 12:31:19 +0100 Subject: [PATCH 02/12] Fixed missing GLM_PLATFORM_CYGWIN declaration #495 --- glm/detail/setup.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index d14d0e25..60cda8b3 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -42,11 +42,11 @@ #define GLM_VERSION_MAJOR 0 #define GLM_VERSION_MINOR 9 #define GLM_VERSION_PATCH 7 -#define GLM_VERSION_REVISION 3 +#define GLM_VERSION_REVISION 4 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_VERSION_DISPLAYED)) # define GLM_MESSAGE_VERSION_DISPLAYED -# pragma message ("GLM: version 0.9.7.3") +# pragma message ("GLM: version 0.9.7.4") #endif//GLM_MESSAGE /////////////////////////////////////////////////////////////////////////////////// From 785c8892d98ab1a5cb69c0e71e289012dd090d7e Mon Sep 17 00:00:00 2001 From: Sami Kankaristo Date: Sun, 13 Mar 2016 21:32:06 +0200 Subject: [PATCH 03/12] Add missing const to declaration --- glm/detail/type_mat4x4.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index 1690bf1d..a88e8152 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -225,7 +225,7 @@ namespace glm GLM_FUNC_DECL typename tmat4x4::col_type operator/(tmat4x4 const & m, typename tmat4x4::row_type const & v); template - GLM_FUNC_DECL typename tmat4x4::row_type operator/(typename tmat4x4::col_type & v, tmat4x4 const & m); + GLM_FUNC_DECL typename tmat4x4::row_type operator/(typename tmat4x4::col_type const & v, tmat4x4 const & m); template GLM_FUNC_DECL tmat4x4 operator/(tmat4x4 const & m1, tmat4x4 const & m2); From d3036fd010f431ea340a9647a88aabeeb4795aef Mon Sep 17 00:00:00 2001 From: Sami Kankaristo Date: Sun, 13 Mar 2016 21:32:33 +0200 Subject: [PATCH 04/12] Add missing operator function definitions --- glm/detail/type_vec4.inl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 514161ea..916d7222 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -823,6 +823,16 @@ namespace glm v.w / scalar); } + template + GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v, tvec1 const & scalar) + { + return tvec4( + v1.x / v2.x, + v1.y / v2.x, + v1.z / v2.x, + v1.w / v2.x); + } + template GLM_FUNC_QUALIFIER tvec4 operator/(T scalar, tvec4 const & v) { @@ -833,6 +843,16 @@ namespace glm scalar / v.w); } + template + GLM_FUNC_DECL tvec4 operator/(tvec1 const & scalar, tvec4 const & v) + { + return tvec4( + v1.x / v2.x, + v1.x / v2.y, + v1.x / v2.z, + v1.x / v2.w); + } + template GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v1, tvec4 const & v2) { From b7fef63ef867d09d921a184eb68412b799a455e4 Mon Sep 17 00:00:00 2001 From: Sami Kankaristo Date: Tue, 15 Mar 2016 02:20:15 +0200 Subject: [PATCH 05/12] Remove const & from POD to match other functions in class --- glm/detail/type_vec4.hpp | 8 ++++---- glm/detail/type_vec4.inl | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 37ae9a7c..84011ddf 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -360,7 +360,7 @@ namespace detail // -- Binary operators -- template - GLM_FUNC_DECL tvec4 operator+(tvec4 const & v, const T& scalar); + GLM_FUNC_DECL tvec4 operator+(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator+(tvec4 const & v1, tvec1 const & v2); @@ -375,7 +375,7 @@ namespace detail GLM_FUNC_DECL tvec4 operator+(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator-(tvec4 const & v, const T& scalar); + GLM_FUNC_DECL tvec4 operator-(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator-(tvec4 const & v1, tvec1 const & v2); @@ -390,7 +390,7 @@ namespace detail GLM_FUNC_DECL tvec4 operator-(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, const T& scalar); + GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator*(tvec4 const & v1, tvec1 const & v2); @@ -405,7 +405,7 @@ namespace detail GLM_FUNC_DECL tvec4 operator*(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator/(tvec4 const & v, const T& scalar); + GLM_FUNC_DECL tvec4 operator/(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator/(tvec4 const & v, tvec1 const & scalar); diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 916d7222..0d7ed59a 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -664,7 +664,7 @@ namespace glm // -- Binary arithmetic operators -- template - GLM_FUNC_QUALIFIER tvec4 operator+(tvec4 const & v, const T& scalar) + GLM_FUNC_QUALIFIER tvec4 operator+(tvec4 const & v, T scalar) { return tvec4( v.x + scalar, @@ -714,7 +714,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator-(tvec4 const & v, const T& scalar) + GLM_FUNC_QUALIFIER tvec4 operator-(tvec4 const & v, T scalar) { return tvec4( v.x - scalar, @@ -764,7 +764,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v, const T& scalar) + GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v, T scalar) { return tvec4( v.x * scalar, @@ -814,7 +814,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v, const T& scalar) + GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v, T scalar) { return tvec4( v.x / scalar, From 8662a567b22053178cda9510a55b37c4752c11d9 Mon Sep 17 00:00:00 2001 From: Sami Kankaristo Date: Tue, 15 Mar 2016 02:21:42 +0200 Subject: [PATCH 06/12] Add const & to POD to match other functions in the class --- glm/detail/type_mat2x4.hpp | 4 ++-- glm/detail/type_mat2x4.inl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index b06ae7c6..592ed65e 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -192,10 +192,10 @@ namespace glm GLM_FUNC_DECL tmat3x4 operator*(tmat2x4 const & m1, tmat3x2 const & m2); template - GLM_FUNC_DECL tmat2x4 operator/(tmat2x4 const & m, const T& s); + GLM_FUNC_DECL tmat2x4 operator/(tmat2x4 const & m, T const & s); template - GLM_FUNC_DECL tmat2x4 operator/(T s, tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4 operator/(T const & s, tmat2x4 const & m); // -- Boolean operators -- diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index cac649f6..8d6f824e 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -493,7 +493,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator/(tmat2x4 const & m, const T& s) + GLM_FUNC_QUALIFIER tmat2x4 operator/(tmat2x4 const & m, T const & s) { return tmat2x4( m[0] / s, @@ -501,7 +501,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator/(T s, tmat2x4 const & m) + GLM_FUNC_QUALIFIER tmat2x4 operator/(T const & s, tmat2x4 const & m) { return tmat2x4( s / m[0], From ece2b8b5a2837ae87e7e5079346f429a930bf8a8 Mon Sep 17 00:00:00 2001 From: Sami Kankaristo Date: Tue, 15 Mar 2016 02:22:48 +0200 Subject: [PATCH 07/12] Add missing boolean operator declarations --- glm/gtc/quaternion.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 6fae5cc6..5e9c8cd5 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -184,6 +184,14 @@ namespace glm template GLM_FUNC_DECL tquat operator/(tquat const & q, T const & s); + // -- Boolean operators -- + + template + GLM_FUNC_DECL bool operator==(tquat const & q1, tquat const & q2); + + template + GLM_FUNC_DECL bool operator!=(tquat const & q1, tquat const & q2); + /// Returns the length of the quaternion. /// /// @see gtc_quaternion From 42b818d4bbf9e30fc29025095d1e55cf79310194 Mon Sep 17 00:00:00 2001 From: Sami Kankaristo Date: Tue, 15 Mar 2016 02:36:33 +0200 Subject: [PATCH 08/12] Fix declarations (use tdualquat instead of tquat) --- glm/gtx/dual_quaternion.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index 0b083295..195cd269 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -144,16 +144,16 @@ namespace glm GLM_FUNC_DECL tdualquat operator*(tdualquat const & q, tdualquat const & p); template - GLM_FUNC_DECL tvec3 operator*(tquat const & q, tvec3 const & v); + GLM_FUNC_DECL tvec3 operator*(tdualquat const & q, tvec3 const & v); template - GLM_FUNC_DECL tvec3 operator*(tvec3 const & v, tquat const & q); + GLM_FUNC_DECL tvec3 operator*(tvec3 const & v, tdualquat const & q); template - GLM_FUNC_DECL tvec4 operator*(tquat const & q, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator*(tdualquat const & q, tvec4 const & v); template - GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, tquat const & q); + GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, tdualquat const & q); template GLM_FUNC_DECL tdualquat operator*(tdualquat const & q, T const & s); From c7700573a44d919a388a60dfe59c7308b9473260 Mon Sep 17 00:00:00 2001 From: Sami Kankaristo Date: Tue, 15 Mar 2016 02:37:38 +0200 Subject: [PATCH 09/12] Add missing boolean operator declarations --- glm/gtx/dual_quaternion.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index 195cd269..4670dccf 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -164,6 +164,14 @@ namespace glm template GLM_FUNC_DECL tdualquat operator/(tdualquat const & q, T const & s); + // -- Boolean operators -- + + template + GLM_FUNC_DECL bool operator==(tdualquat const & q1, tdualquat const & q2); + + template + GLM_FUNC_DECL bool operator!=(tdualquat const & q1, tdualquat const & q2); + /// Returns the normalized quaternion. /// /// @see gtx_dual_quaternion From ad9bfffe65adef915de45455d97aa38339a9944f Mon Sep 17 00:00:00 2001 From: Sami Kankaristo Date: Tue, 15 Mar 2016 02:38:16 +0200 Subject: [PATCH 10/12] Fix operator-(), add operator+() --- glm/gtx/dual_quaternion.inl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/glm/gtx/dual_quaternion.inl b/glm/gtx/dual_quaternion.inl index 961dd1ca..fd41dcdc 100644 --- a/glm/gtx/dual_quaternion.inl +++ b/glm/gtx/dual_quaternion.inl @@ -194,11 +194,17 @@ namespace glm // -- Unary bit operators -- template - GLM_FUNC_QUALIFIER tdualquat operator-(tdualquat const & q) + GLM_FUNC_QUALIFIER tdualquat operator+(tdualquat const & q) { return q; } + template + GLM_FUNC_QUALIFIER tdualquat operator-(tdualquat const & q) + { + return tdualquat(-q.real, -q.dual); + } + // -- Binary operators -- template From 578c4f4f9f592034be30ae554360bf5fae72afb7 Mon Sep 17 00:00:00 2001 From: Sami Kankaristo Date: Tue, 15 Mar 2016 03:24:53 +0200 Subject: [PATCH 11/12] Rename tvec1 parameters from scalar to v1/v2 --- glm/detail/type_vec4.hpp | 4 ++-- glm/detail/type_vec4.inl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 84011ddf..1cbcefdd 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -408,13 +408,13 @@ namespace detail GLM_FUNC_DECL tvec4 operator/(tvec4 const & v, T scalar); template - GLM_FUNC_DECL tvec4 operator/(tvec4 const & v, tvec1 const & scalar); + GLM_FUNC_DECL tvec4 operator/(tvec4 const & v1, tvec1 const & v2); template GLM_FUNC_DECL tvec4 operator/(T scalar, tvec4 const & v); template - GLM_FUNC_DECL tvec4 operator/(tvec1 const & scalar, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator/(tvec1 const & v1, tvec4 const & v2); template GLM_FUNC_DECL tvec4 operator/(tvec4 const & v1, tvec4 const & v2); diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 0d7ed59a..9b35d0b1 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -824,7 +824,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v, tvec1 const & scalar) + GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v1, tvec1 const & v2) { return tvec4( v1.x / v2.x, @@ -844,7 +844,7 @@ namespace glm } template - GLM_FUNC_DECL tvec4 operator/(tvec1 const & scalar, tvec4 const & v) + GLM_FUNC_DECL tvec4 operator/(tvec1 const & v1, tvec4 const & v2) { return tvec4( v1.x / v2.x, From 407d671954030b5875f3ad0328f2810ab7839f37 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 19 Mar 2016 12:37:39 +0100 Subject: [PATCH 12/12] Updated readme --- readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index af96182c..716328a3 100644 --- a/readme.md +++ b/readme.md @@ -51,7 +51,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) ## Release notes -#### [GLM 0.9.7.4](https://github.com/g-truc/glm/tree/0.9.7) - 2016-XX-XX +#### [GLM 0.9.7.4](https://github.com/g-truc/glm/releases/tag/0.9.7.4) - 2016-03-19 ##### Fixes: - Fixed asinh and atanh warning with C++98 STL #484 - Fixed polar coordinates function latitude #485 @@ -59,6 +59,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Fixed eulerAngles precision error, returns NaN #451 - Fixed undefined reference errors #489 - Fixed missing GLM_PLATFORM_CYGWIN declaration #495 +- Fixed various undefined reference errors #490 #### [GLM 0.9.7.3](https://github.com/g-truc/glm/releases/tag/0.9.7.3) - 2016-02-21 ##### Improvements: