From 161c6c474bfa3bea47f6a85ed75de59828f4703c Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 22 Apr 2013 22:28:00 +0200 Subject: [PATCH 1/3] Added library builds --- glm/CMakeLists.txt | 11 +- glm/core/type_mat4x4.inl | 4 +- glm/glm.cpp | 519 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 528 insertions(+), 6 deletions(-) create mode 100644 glm/glm.cpp diff --git a/glm/CMakeLists.txt b/glm/CMakeLists.txt index a52d336a..1b9ac8e1 100644 --- a/glm/CMakeLists.txt +++ b/glm/CMakeLists.txt @@ -1,4 +1,4 @@ -set(NAME glm) +set(NAME glm_dummy) file(GLOB ROOT_SOURCE *.cpp) file(GLOB ROOT_INLINE *.inl) @@ -38,8 +38,11 @@ source_group("VIRTREV Files" FILES ${VIRTREV_HEADER}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) add_executable(${NAME} ${ROOT_TEXT} - ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} - ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} - ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} ${VIRTREV_SOURCE} ${VIRTREV_INLINE} ${VIRTREV_HEADER}) + +add_library(glm STATIC glm.cpp) +add_library(glm_shared SHARED glm.cpp) diff --git a/glm/core/type_mat4x4.inl b/glm/core/type_mat4x4.inl index f409cdf8..0cdd070b 100644 --- a/glm/core/type_mat4x4.inl +++ b/glm/core/type_mat4x4.inl @@ -562,11 +562,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 = + T Determinant = T( + 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]; + + this->value[0][3] * Inverse[3][0]); Inverse /= Determinant; return Inverse; diff --git a/glm/glm.cpp b/glm/glm.cpp new file mode 100644 index 00000000..41513e00 --- /dev/null +++ b/glm/glm.cpp @@ -0,0 +1,519 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/glm.cpp +/// @date 2013-04-22 / 2013-04-22 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include +#include + +namespace glm{ +namespace detail +{ +// tvec1 type explicit instantiation +/* +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; + +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; + +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +template struct tvec1; +*/ +// tvec2 type explicit instantiation +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; + +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; + +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; +template struct tvec2; + +// tvec3 type explicit instantiation +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; + +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; + +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; +template struct tvec3; + +// tvec4 type explicit instantiation +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; + +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; + +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; +template struct tvec4; + +// tmat2x2 type explicit instantiation +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; + +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; + +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; +template struct tmat2x2; + +// tmat2x3 type explicit instantiation +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; + +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; + +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; +template struct tmat2x3; + +// tmat2x4 type explicit instantiation +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; + +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; + +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; +template struct tmat2x4; + +// tmat3x2 type explicit instantiation +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; + +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; + +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; +template struct tmat3x2; + +// tmat3x3 type explicit instantiation +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; + +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; + +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; +template struct tmat3x3; + +// tmat3x4 type explicit instantiation +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; + +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; + +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; +template struct tmat3x4; + +// tmat4x2 type explicit instantiation +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; + +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; + +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; +template struct tmat4x2; + +// tmat4x3 type explicit instantiation +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; + +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; + +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; +template struct tmat4x3; + +// tmat4x4 type explicit instantiation +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; + +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; + +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; +template struct tmat4x4; + +}//namespace detail +}//namespace glm + From 3c7989486edfba1890f869dd1fcec927ddc426e0 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 23 Apr 2013 16:39:15 +0200 Subject: [PATCH 2/3] Fixed literals in dual quaternion implementation --- glm/glm.cpp | 27 +++++++++++++++++++++++++++ glm/gtx/dual_quaternion.inl | 22 +++++++++++----------- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/glm/glm.cpp b/glm/glm.cpp index 41513e00..23a1dbd7 100644 --- a/glm/glm.cpp +++ b/glm/glm.cpp @@ -28,6 +28,7 @@ #include #include +#include namespace glm{ namespace detail @@ -514,6 +515,32 @@ template struct tmat4x4; template struct tmat4x4; template struct tmat4x4; +// tquat type explicit instantiation +template struct tquat; +template struct tquat; +template struct tquat; + +template struct tquat; +template struct tquat; +template struct tquat; + +template struct tquat; +template struct tquat; +template struct tquat; + +//tdualquat type explicit instantiation +template struct tdualquat; +template struct tdualquat; +template struct tdualquat; + +template struct tdualquat; +template struct tdualquat; +template struct tdualquat; + +template struct tdualquat; +template struct tdualquat; +template struct tdualquat; + }//namespace detail }//namespace glm diff --git a/glm/gtx/dual_quaternion.inl b/glm/gtx/dual_quaternion.inl index ed430ee1..6c2e7ffe 100644 --- a/glm/gtx/dual_quaternion.inl +++ b/glm/gtx/dual_quaternion.inl @@ -70,10 +70,10 @@ namespace detail ) : real(q), dual( - -0.5f*( p.x*q.x + p.y*q.y + p.z*q.z), - 0.5f*( p.x*q.w + p.y*q.z - p.z*q.y), - 0.5f*(-p.x*q.z + p.y*q.w + p.z*q.x), - 0.5f*( p.x*q.y - p.y*q.x + p.z*q.w)) + T(-0.5) * ( p.x*q.x + p.y*q.y + p.z*q.z), + T(+0.5) * ( p.x*q.w + p.y*q.z - p.z*q.y), + T(+0.5) * (-p.x*q.z + p.y*q.w + p.z*q.x), + T(+0.5) * ( p.x*q.y - p.y*q.x + p.z*q.w)) {} ////////////////////////////////////////////////////////////// @@ -378,20 +378,20 @@ namespace detail detail::tquat real; T const trace = x[0].x + x[1].y + x[2].z; - if(trace > detail::tdualquat::value_type(0)) + if(trace > T(0)) { - T const r = sqrt(detail::tdualquat::value_type(1) + trace); - T const invr = detail::tdualquat::value_type(0.5) / r; - real.w = detail::tdualquat::value_type(0.5) * r; + T const r = sqrt(T(1) + trace); + T const invr = T(0.5) / r; + real.w = T(0.5) * r; real.x = (x[2].y - x[1].z) * invr; real.y = (x[0].z - x[2].x) * invr; real.z = (x[1].x - x[0].y) * invr; } else if(x[0].x > x[1].y && x[0].x > x[2].z) { - T const r = sqrt(detail::tdualquat::value_type(1) + x[0].x - x[1].y - x[2].z); - T const invr = detail::tdualquat::value_type(0.5) / r; - real.x = detail::tdualquat::value_type(0.5)*r; + T const r = sqrt(T(1) + x[0].x - x[1].y - x[2].z); + T const invr = T(0.5) / r; + real.x = T(0.5)*r; real.y = (x[1].x + x[0].y) * invr; real.z = (x[0].z + x[2].x) * invr; real.w = (x[2].y - x[1].z) * invr; From 8c7828e6f702df378b5e8571d86f70dd6f5fbda7 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 23 Apr 2013 16:40:07 +0200 Subject: [PATCH 3/3] Fixed merge --- glm/core/func_common.hpp | 2 +- glm/gtc/matrix_transform.inl | 4 ++-- glm/gtx/fast_exponential.inl | 12 ++++++------ glm/gtx/fast_square_root.inl | 32 ++++++++++++++++---------------- glm/gtx/normal.hpp | 2 +- glm/gtx/normal.inl | 2 +- glm/gtx/orthonormalize.hpp | 4 ++-- glm/gtx/orthonormalize.inl | 4 ++-- glm/gtx/simd_mat4.hpp | 4 ++-- glm/gtx/simd_mat4.inl | 6 +++--- glm/gtx/simd_vec4.hpp | 6 +++--- glm/gtx/simd_vec4.inl | 6 +++--- 12 files changed, 42 insertions(+), 42 deletions(-) diff --git a/glm/core/func_common.hpp b/glm/core/func_common.hpp index eb66de7d..ce246010 100644 --- a/glm/core/func_common.hpp +++ b/glm/core/func_common.hpp @@ -208,7 +208,7 @@ namespace glm genType const & minVal, genType const & maxVal); - template + template genType clamp( genType const & x, typename genType::value_type const & minVal, diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index 6bd9a184..cb6fdd73 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -339,7 +339,7 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER detail::tvec3 project ( detail::tvec3 const & obj, @@ -360,7 +360,7 @@ namespace glm return detail::tvec3(tmp); } - template + template GLM_FUNC_QUALIFIER detail::tvec3 unProject ( detail::tvec3 const & win, diff --git a/glm/gtx/fast_exponential.inl b/glm/gtx/fast_exponential.inl index 5d957dab..790fabba 100644 --- a/glm/gtx/fast_exponential.inl +++ b/glm/gtx/fast_exponential.inl @@ -27,20 +27,20 @@ namespace glm return f; } - template + template GLM_FUNC_QUALIFIER detail::tvec2 fastPow( const detail::tvec2& x, - const detail::tvec2& y) + const detail::tvec2& y) { return detail::tvec2( fastPow(x.x, y.x), fastPow(x.y, y.y)); } - template + template GLM_FUNC_QUALIFIER detail::tvec3 fastPow( const detail::tvec3& x, - const detail::tvec3& y) + const detail::tvec3& y) { return detail::tvec3( fastPow(x.x, y.x), @@ -48,10 +48,10 @@ namespace glm fastPow(x.z, y.z)); } - template + template GLM_FUNC_QUALIFIER detail::tvec4 fastPow( const detail::tvec4& x, - const detail::tvec4& y) + const detail::tvec4& y) { return detail::tvec4( fastPow(x.x, y.x), diff --git a/glm/gtx/fast_square_root.inl b/glm/gtx/fast_square_root.inl index 0f51fbbd..aef9ad0d 100644 --- a/glm/gtx/fast_square_root.inl +++ b/glm/gtx/fast_square_root.inl @@ -36,7 +36,7 @@ namespace glm i = 0x5f375a86 - (i >> 1); //x = *(float*)&i; //x = *((float*)(char*)&i); - tmp = detail::uif(i).f; + tmp = detail::uif32(i).f; tmp = tmp * (1.5f - xhalf * tmp * tmp); return genType(tmp); } @@ -53,30 +53,30 @@ namespace glm return abs(x); } - template + template GLM_FUNC_QUALIFIER valType fastLength ( - detail::tvec2 const & x + detail::tvec2 const & x ) { valType sqr = x.x * x.x + x.y * x.y; return fastSqrt(sqr); } - template + template GLM_FUNC_QUALIFIER valType fastLength ( - detail::tvec3 const & x + detail::tvec3 const & x ) { valType sqr = x.x * x.x + x.y * x.y + x.z * x.z; return fastSqrt(sqr); } - template + template GLM_FUNC_QUALIFIER valType fastLength ( - detail::tvec4 const & x + detail::tvec4 const & x ) { valType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; @@ -104,30 +104,30 @@ namespace glm return x > genType(0) ? genType(1) : -genType(1); } - template - GLM_FUNC_QUALIFIER detail::tvec2 fastNormalize + template + GLM_FUNC_QUALIFIER detail::tvec2 fastNormalize ( - detail::tvec2 const & x + detail::tvec2 const & x ) { valType sqr = x.x * x.x + x.y * x.y; return x * fastInverseSqrt(sqr); } - template - GLM_FUNC_QUALIFIER detail::tvec3 fastNormalize + template + GLM_FUNC_QUALIFIER detail::tvec3 fastNormalize ( - detail::tvec3 const & x + detail::tvec3 const & x ) { valType sqr = x.x * x.x + x.y * x.y + x.z * x.z; return x * fastInverseSqrt(sqr); } - template - GLM_FUNC_QUALIFIER detail::tvec4 fastNormalize + template + GLM_FUNC_QUALIFIER detail::tvec4 fastNormalize ( - detail::tvec4 const & x + detail::tvec4 const & x ) { valType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; diff --git a/glm/gtx/normal.hpp b/glm/gtx/normal.hpp index e0392136..1a43ab80 100644 --- a/glm/gtx/normal.hpp +++ b/glm/gtx/normal.hpp @@ -53,7 +53,7 @@ namespace glm //! Computes triangle normal from triangle points. //! From GLM_GTX_normal extension. - template + template detail::tvec3 triangleNormal( detail::tvec3 const & p1, detail::tvec3 const & p2, diff --git a/glm/gtx/normal.inl b/glm/gtx/normal.inl index 2dceb6a6..0846d899 100644 --- a/glm/gtx/normal.inl +++ b/glm/gtx/normal.inl @@ -9,7 +9,7 @@ namespace glm { - template + template GLM_FUNC_QUALIFIER detail::tvec3 triangleNormal ( detail::tvec3 const & p1, diff --git a/glm/gtx/orthonormalize.hpp b/glm/gtx/orthonormalize.hpp index 7eeb0c79..d81b4e38 100644 --- a/glm/gtx/orthonormalize.hpp +++ b/glm/gtx/orthonormalize.hpp @@ -53,13 +53,13 @@ namespace glm //! Returns the orthonormalized matrix of m. //! From GLM_GTX_orthonormalize extension. - template + template detail::tmat3x3 orthonormalize( const detail::tmat3x3& m); //! Orthonormalizes x according y. //! From GLM_GTX_orthonormalize extension. - template + template detail::tvec3 orthonormalize( const detail::tvec3& x, const detail::tvec3& y); diff --git a/glm/gtx/orthonormalize.inl b/glm/gtx/orthonormalize.inl index a9f40a5f..939080f0 100644 --- a/glm/gtx/orthonormalize.inl +++ b/glm/gtx/orthonormalize.inl @@ -9,7 +9,7 @@ namespace glm { - template + template GLM_FUNC_QUALIFIER detail::tmat3x3 orthonormalize ( const detail::tmat3x3& m @@ -31,7 +31,7 @@ namespace glm return r; } - template + template GLM_FUNC_QUALIFIER detail::tvec3 orthonormalize ( const detail::tvec3& x, diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index b435b11e..5acb81bc 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -90,7 +90,7 @@ namespace detail fvec4SIMD const & v2, fvec4SIMD const & v3); explicit fmat4x4SIMD( - tmat4x4 const & m); + mat4x4 const & m); explicit fmat4x4SIMD( __m128 const in[4]); @@ -163,7 +163,7 @@ namespace detail //! Convert a simdMat4 to a mat4. //! (From GLM_GTX_simd_mat4 extension) - detail::tmat4x4 mat4_cast( + mat4 mat4_cast( detail::fmat4x4SIMD const & x); //! Multiply matrix x by matrix y component-wise, i.e., diff --git a/glm/gtx/simd_mat4.inl b/glm/gtx/simd_mat4.inl index d6ec8ca9..a5e2b68a 100644 --- a/glm/gtx/simd_mat4.inl +++ b/glm/gtx/simd_mat4.inl @@ -73,7 +73,7 @@ GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD ( - tmat4x4 const & m + mat4 const & m ) { this->Data[0] = fvec4SIMD(m[0]); @@ -520,12 +520,12 @@ GLM_FUNC_QUALIFIER fmat4x4SIMD const operator++ }//namespace detail -GLM_FUNC_QUALIFIER detail::tmat4x4 mat4_cast +GLM_FUNC_QUALIFIER mat4 mat4_cast ( detail::fmat4x4SIMD const & x ) { - GLM_ALIGN(16) detail::tmat4x4 Result; + GLM_ALIGN(16) mat4 Result; _mm_store_ps(&Result[0][0], x.Data[0].Data); _mm_store_ps(&Result[1][0], x.Data[1].Data); _mm_store_ps(&Result[2][0], x.Data[2].Data); diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index 67f10501..927e7df8 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -76,7 +76,7 @@ namespace detail static size_type value_size(); typedef fvec4SIMD type; - typedef tvec4 bool_type; + typedef tvec4 bool_type; #ifdef GLM_SIMD_ENABLE_XYZW_UNION union @@ -108,7 +108,7 @@ namespace detail float const & z, float const & w); explicit fvec4SIMD( - tvec4 const & v); + vec4 const & v); //////////////////////////////////////// //// Convertion vector constructors @@ -161,7 +161,7 @@ namespace detail //! Convert a simdVec4 to a vec4. //! (From GLM_GTX_simd_vec4 extension) - detail::tvec4 vec4_cast( + vec4 vec4_cast( detail::fvec4SIMD const & x); //! Returns x if x >= 0; otherwise, it returns -x. diff --git a/glm/gtx/simd_vec4.inl b/glm/gtx/simd_vec4.inl index 0b22115d..a71c550d 100644 --- a/glm/gtx/simd_vec4.inl +++ b/glm/gtx/simd_vec4.inl @@ -33,7 +33,7 @@ GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) : Data(v.Data) {} -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(tvec4 const & v) : +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec4 const & v) : Data(_mm_set_ps(v.w, v.z, v.y, v.x)) {} @@ -269,12 +269,12 @@ GLM_FUNC_QUALIFIER fvec4SIMD operator-- (fvec4SIMD const & v, int) }//namespace detail -GLM_FUNC_QUALIFIER detail::tvec4 vec4_cast +GLM_FUNC_QUALIFIER vec4 vec4_cast ( detail::fvec4SIMD const & x ) { - GLM_ALIGN(16) detail::tvec4 Result; + GLM_ALIGN(16) vec4 Result; _mm_store_ps(&Result[0], x.Data); return Result; }