From e7dc01fc063f2d6e59d467803b30cec00e51cf3b Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 26 Mar 2013 00:28:29 +0100 Subject: [PATCH 1/4] Fixed slerp, linear interpolation when cosTheta is close to 1, #65 --- glm/gtc/quaternion.inl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 0b9d2051..8b83865a 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -512,10 +512,10 @@ namespace detail { // Linear interpolation return detail::tquat( - mix(x.w, y.w, a), - mix(x.x, y.x, a), - mix(x.y, y.y, a), - mix(x.z, y.z, a)); + mix(x.w, z.w, a), + mix(x.x, z.x, a), + mix(x.y, z.y, a), + mix(x.z, z.z, a)); } else { From 78d3e5ca66c031d49fda47823d42759b1c5d8a34 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 27 Mar 2013 02:33:59 +0100 Subject: [PATCH 2/4] Updated readme --- glm/gtx/ocl_type.hpp | 8 ++++---- readme.txt | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/glm/gtx/ocl_type.hpp b/glm/gtx/ocl_type.hpp index 50dc5af1..7e8af095 100644 --- a/glm/gtx/ocl_type.hpp +++ b/glm/gtx/ocl_type.hpp @@ -79,7 +79,7 @@ namespace gtx typedef detail::uint32 cl_uint1; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) typedef detail::uint64 cl_ulong1; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - //typedef detail::float16 cl_half1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + //typedef detail::float16 cl_half1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) typedef detail::float32 cl_float1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) @@ -93,7 +93,7 @@ namespace gtx typedef detail::tvec2 cl_uint2; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) typedef detail::tvec2 cl_ulong2; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - //typedef detail::tvec2 cl_half2; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + //typedef detail::tvec2 cl_half2; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) typedef detail::tvec2 cl_float2; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) @@ -107,7 +107,7 @@ namespace gtx typedef detail::tvec3 cl_uint3; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) typedef detail::tvec3 cl_ulong3; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - //typedef detail::tvec3 cl_half3; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + //typedef detail::tvec3 cl_half3; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) typedef detail::tvec3 cl_float3; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) @@ -120,7 +120,7 @@ namespace gtx typedef detail::tvec4 cl_uint4; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) typedef detail::tvec4 cl_ulong4; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - //typedef detail::tvec4 cl_half4; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + //typedef detail::tvec4 cl_half4; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) typedef detail::tvec4 cl_float4; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) /// @} diff --git a/readme.txt b/readme.txt index f573e31b..b8bc7116 100644 --- a/readme.txt +++ b/readme.txt @@ -36,6 +36,12 @@ GLM is a header only library, there is nothing to build, just include it. More informations in GLM manual: http://glm.g-truc.net/glm.pdf +================================================================================ +GLM 0.9.4.4: 2013-0X-XX +-------------------------------------------------------------------------------- +- Fixed slerp when costheta is close to 1 +- + ================================================================================ GLM 0.9.4.3: 2013-03-20 -------------------------------------------------------------------------------- From 867db84ca5e029a93fd539a039622e92396bce80 Mon Sep 17 00:00:00 2001 From: Kristian Lein-Mathisen Date: Sun, 14 Apr 2013 23:30:30 +0200 Subject: [PATCH 3/4] Fixed mat2x4 value-type constructor #include #include using namespace std; int main() { // creating two should-be identical matrices glm::mat2x4 A((int)1); glm::mat2x4 B((float)1); float* Aptr = (float*)&A; float* Bptr = (float*)&B; for(int i = 0 ; i < 8 ; i++) cout << Aptr[i] << " "; cout << endl; for(int i = 0 ; i < 8 ; i++) cout << Bptr[i] << " "; } output before patch: 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 output after patch: 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 --- glm/core/type_mat2x4.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/core/type_mat2x4.inl b/glm/core/type_mat2x4.inl index a78d5d0a..d324b580 100644 --- a/glm/core/type_mat2x4.inl +++ b/glm/core/type_mat2x4.inl @@ -109,7 +109,7 @@ namespace detail { value_type const Zero(0); this->value[0] = col_type(s, Zero, Zero, Zero); - this->value[1] = col_type(Zero, Zero, Zero, Zero); + this->value[1] = col_type(Zero, s, Zero, Zero); } template From 073675d97011d926fbf1e1d41ac226e89910f654 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Fri, 19 Apr 2013 21:36:10 +0200 Subject: [PATCH 4/4] Updated readme for issue #70 --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index b8bc7116..8034815d 100644 --- a/readme.txt +++ b/readme.txt @@ -40,7 +40,7 @@ http://glm.g-truc.net/glm.pdf GLM 0.9.4.4: 2013-0X-XX -------------------------------------------------------------------------------- - Fixed slerp when costheta is close to 1 -- +- Fixed mat4x2 value_type constructor ================================================================================ GLM 0.9.4.3: 2013-03-20