diff --git a/glm/core/intrinsic_matrix.inl b/glm/core/intrinsic_matrix.inl index f09034e1..e753336b 100644 --- a/glm/core/intrinsic_matrix.inl +++ b/glm/core/intrinsic_matrix.inl @@ -1003,7 +1003,7 @@ GLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float con __m128 Sin0 = _mm_set_ss(s); __m128 SinA = _mm_shuffle_ps(Sin0, Sin0, _MM_SHUFFLE(0, 0, 0, 0)); - // detail::tvec3 temp = (valType(1) - c) * axis; + // detail::tvec3 temp = (valType(1) - c) * axis; __m128 Temp0 = _mm_sub_ps(one, CosA); __m128 Temp1 = _mm_mul_ps(Temp0, AxisC); diff --git a/glm/core/intrinsic_vector_relational.inl b/glm/core/intrinsic_vector_relational.inl index 80688325..853ab1fc 100644 --- a/glm/core/intrinsic_vector_relational.inl +++ b/glm/core/intrinsic_vector_relational.inl @@ -28,10 +28,10 @@ // //// lessThan //template -//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type lessThan +//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type lessThan //( -// detail::tvec2 const & x, -// detail::tvec2 const & y +// detail::tvec2 const & x, +// detail::tvec2 const & y //) //{ // GLM_STATIC_ASSERT( @@ -43,10 +43,10 @@ //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type lessThan +//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type lessThan //( -// detail::tvec3 const & x, -// detail::tvec3 const & y +// detail::tvec3 const & x, +// detail::tvec3 const & y //) //{ // GLM_STATIC_ASSERT( @@ -58,10 +58,10 @@ //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type lessThan +//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type lessThan //( -// detail::tvec4 const & x, -// detail::tvec4 const & y +// detail::tvec4 const & x, +// detail::tvec4 const & y //) //{ // GLM_STATIC_ASSERT( @@ -74,10 +74,10 @@ // //// lessThanEqual //template -//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type lessThanEqual +//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type lessThanEqual //( -// detail::tvec2 const & x, -// detail::tvec2 const & y +// detail::tvec2 const & x, +// detail::tvec2 const & y //) //{ // GLM_STATIC_ASSERT( @@ -89,10 +89,10 @@ //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type lessThanEqual +//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type lessThanEqual //( -// detail::tvec3 const & x, -// detail::tvec3 const & y +// detail::tvec3 const & x, +// detail::tvec3 const & y //) //{ // GLM_STATIC_ASSERT( @@ -104,10 +104,10 @@ //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type lessThanEqual +//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type lessThanEqual //( -// detail::tvec4 const & x, -// detail::tvec4 const & y +// detail::tvec4 const & x, +// detail::tvec4 const & y //) //{ // GLM_STATIC_ASSERT( @@ -120,10 +120,10 @@ // //// greaterThan //template -//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type greaterThan +//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type greaterThan //( -// detail::tvec2 const & x, -// detail::tvec2 const & y +// detail::tvec2 const & x, +// detail::tvec2 const & y //) //{ // GLM_STATIC_ASSERT( @@ -135,10 +135,10 @@ //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type greaterThan +//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type greaterThan //( -// detail::tvec3 const & x, -// detail::tvec3 const & y +// detail::tvec3 const & x, +// detail::tvec3 const & y //) //{ // GLM_STATIC_ASSERT( @@ -150,10 +150,10 @@ //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type greaterThan +//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type greaterThan //( -// detail::tvec4 const & x, -// detail::tvec4 const & y +// detail::tvec4 const & x, +// detail::tvec4 const & y //) //{ // GLM_STATIC_ASSERT( @@ -166,10 +166,10 @@ // //// greaterThanEqual //template -//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type greaterThanEqual +//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type greaterThanEqual //( -// detail::tvec2 const & x, -// detail::tvec2 const & y +// detail::tvec2 const & x, +// detail::tvec2 const & y //) //{ // GLM_STATIC_ASSERT( @@ -181,10 +181,10 @@ //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type greaterThanEqual +//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type greaterThanEqual //( -// detail::tvec3 const & x, -// detail::tvec3 const & y +// detail::tvec3 const & x, +// detail::tvec3 const & y //) //{ // GLM_STATIC_ASSERT( @@ -196,10 +196,10 @@ //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type greaterThanEqual +//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type greaterThanEqual //( -// detail::tvec4 const & x, -// detail::tvec4 const & y +// detail::tvec4 const & x, +// detail::tvec4 const & y //) //{ // GLM_STATIC_ASSERT( @@ -212,10 +212,10 @@ // //// equal //template -//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type equal +//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type equal //( -// detail::tvec2 const & x, -// detail::tvec2 const & y +// detail::tvec2 const & x, +// detail::tvec2 const & y //) //{ // GLM_STATIC_ASSERT( @@ -224,14 +224,14 @@ // detail::type::is_uint || // detail::type::is_bool); // -// return typename detail::tvec2::bool_type(x.x == y.x, x.y == y.y); +// return typename detail::tvec2::bool_type(x.x == y.x, x.y == y.y); //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type equal +//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type equal //( -// detail::tvec3 const & x, -// detail::tvec3 const & y +// detail::tvec3 const & x, +// detail::tvec3 const & y //) //{ // GLM_STATIC_ASSERT( @@ -240,14 +240,14 @@ // detail::type::is_uint || // detail::type::is_bool); // -// return typename detail::tvec3::bool_type(x.x == y.x, x.y == y.y, x.z == y.z); +// return typename detail::tvec3::bool_type(x.x == y.x, x.y == y.y, x.z == y.z); //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type equal +//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type equal //( -// detail::tvec4 const & x, -// detail::tvec4 const & y +// detail::tvec4 const & x, +// detail::tvec4 const & y //) //{ // GLM_STATIC_ASSERT( @@ -256,15 +256,15 @@ // detail::type::is_uint || // detail::type::is_bool); // -// return typename detail::tvec4::bool_type(x.x == y.x, x.y == y.y, x.z == y.z, x.w == y.w); +// return typename detail::tvec4::bool_type(x.x == y.x, x.y == y.y, x.z == y.z, x.w == y.w); //} // //// notEqual //template -//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type notEqual +//GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type notEqual //( -// detail::tvec2 const & x, -// detail::tvec2 const & y +// detail::tvec2 const & x, +// detail::tvec2 const & y //) //{ // GLM_STATIC_ASSERT( @@ -273,14 +273,14 @@ // detail::type::is_uint || // detail::type::is_bool); // -// return typename detail::tvec2::bool_type(x.x != y.x, x.y != y.y); +// return typename detail::tvec2::bool_type(x.x != y.x, x.y != y.y); //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type notEqual +//GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type notEqual //( -// detail::tvec3 const & x, -// detail::tvec3 const & y +// detail::tvec3 const & x, +// detail::tvec3 const & y //) //{ // GLM_STATIC_ASSERT( @@ -289,14 +289,14 @@ // detail::type::is_uint || // detail::type::is_bool); // -// return typename detail::tvec3::bool_type(x.x != y.x, x.y != y.y, x.z != y.z); +// return typename detail::tvec3::bool_type(x.x != y.x, x.y != y.y, x.z != y.z); //} // //template -//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type notEqual +//GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type notEqual //( -// detail::tvec4 const & x, -// detail::tvec4 const & y +// detail::tvec4 const & x, +// detail::tvec4 const & y //) //{ // GLM_STATIC_ASSERT( @@ -305,7 +305,7 @@ // detail::type::is_uint || // detail::type::is_bool); // -// return typename detail::tvec4::bool_type(x.x != y.x, x.y != y.y, x.z != y.z, x.w != y.w); +// return typename detail::tvec4::bool_type(x.x != y.x, x.y != y.y, x.z != y.z, x.w != y.w); //} // //// any diff --git a/glm/gtx/closest_point.hpp b/glm/gtx/closest_point.hpp index b12c1ce9..787ee1aa 100644 --- a/glm/gtx/closest_point.hpp +++ b/glm/gtx/closest_point.hpp @@ -52,9 +52,9 @@ namespace glm /// Find the point on a straight line which is the closet of a point. /// @see gtx_closest_point - template + template detail::tvec3 closestPointOnLine( - detail::tvec3 const & point, + detail::tvec3 const & point, detail::tvec3 const & a, detail::tvec3 const & b); diff --git a/glm/gtx/closest_point.inl b/glm/gtx/closest_point.inl index d018c1d1..6c0f8d87 100644 --- a/glm/gtx/closest_point.inl +++ b/glm/gtx/closest_point.inl @@ -12,22 +12,22 @@ namespace glm { - template - GLM_FUNC_QUALIFIER detail::tvec3 closestPointOnLine + template + GLM_FUNC_QUALIFIER detail::tvec3 closestPointOnLine ( - detail::tvec3 const & point, - detail::tvec3 const & a, - detail::tvec3 const & b + detail::tvec3 const & point, + detail::tvec3 const & a, + detail::tvec3 const & b ) { - valType LineLength = distance(a, b); - detail::tvec3 Vector = point - a; - detail::tvec3 LineDirection = (b - a) / LineLength; + T LineLength = distance(a, b); + detail::tvec3 Vector = point - a; + detail::tvec3 LineDirection = (b - a) / LineLength; // Project Vector to LineDirection to get the distance of point from a - valType Distance = dot(Vector, LineDirection); + T Distance = dot(Vector, LineDirection); - if(Distance <= valType(0)) return a; + if(Distance <= T(0)) return a; if(Distance >= LineLength) return b; return a + LineDirection * Distance; } diff --git a/glm/gtx/handed_coordinate_space.hpp b/glm/gtx/handed_coordinate_space.hpp index 776b55df..6a1e7aa8 100644 --- a/glm/gtx/handed_coordinate_space.hpp +++ b/glm/gtx/handed_coordinate_space.hpp @@ -52,18 +52,18 @@ namespace glm //! Return if a trihedron right handed or not. //! From GLM_GTX_handed_coordinate_space extension. - template + template bool rightHanded( - detail::tvec3 const & tangent, - detail::tvec3 const & binormal, + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, detail::tvec3 const & normal); //! Return if a trihedron left handed or not. //! From GLM_GTX_handed_coordinate_space extension. - template + template bool leftHanded( - detail::tvec3 const & tangent, - detail::tvec3 const & binormal, + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, detail::tvec3 const & normal); /// @} diff --git a/glm/gtx/handed_coordinate_space.inl b/glm/gtx/handed_coordinate_space.inl index 3e39379d..3e8060fe 100644 --- a/glm/gtx/handed_coordinate_space.inl +++ b/glm/gtx/handed_coordinate_space.inl @@ -9,10 +9,10 @@ namespace glm { - template + template GLM_FUNC_QUALIFIER bool rightHanded ( - detail::tvec3 const & tangent, + detail::tvec3 const & tangent, detail::tvec3 const & binormal, detail::tvec3 const & normal ) @@ -20,11 +20,11 @@ namespace glm return dot(cross(normal, tangent), binormal) > T(0); } - template + template GLM_FUNC_QUALIFIER bool leftHanded ( - detail::tvec3 const & tangent, - detail::tvec3 const & binormal, + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, detail::tvec3 const & normal ) { diff --git a/glm/gtx/inertia.hpp b/glm/gtx/inertia.hpp index b3a2d7c5..6cf9b334 100644 --- a/glm/gtx/inertia.hpp +++ b/glm/gtx/inertia.hpp @@ -48,65 +48,66 @@ namespace glm { + /* /// @addtogroup gtx_inertia /// @{ //! Build an inertia matrix for a box. //! From GLM_GTX_inertia extension. - template + template detail::tmat3x3 boxInertia3( T const & Mass, detail::tvec3 const & Scale); //! Build an inertia matrix for a box. //! From GLM_GTX_inertia extension. - template + template detail::tmat4x4 boxInertia4( T const & Mass, detail::tvec3 const & Scale); //! Build an inertia matrix for a disk. //! From GLM_GTX_inertia extension. - template + template detail::tmat3x3 diskInertia3( T const & Mass, T const & Radius); //! Build an inertia matrix for a disk. //! From GLM_GTX_inertia extension. - template + template detail::tmat4x4 diskInertia4( T const & Mass, T const & Radius); //! Build an inertia matrix for a ball. //! From GLM_GTX_inertia extension. - template + template detail::tmat3x3 ballInertia3( T const & Mass, T const & Radius); //! Build an inertia matrix for a ball. //! From GLM_GTX_inertia extension. - template + template detail::tmat4x4 ballInertia4( T const & Mass, T const & Radius); //! Build an inertia matrix for a sphere. //! From GLM_GTX_inertia extension. - template + template detail::tmat3x3 sphereInertia3( T const & Mass, T const & Radius); //! Build an inertia matrix for a sphere. //! From GLM_GTX_inertia extension. - template + template detail::tmat4x4 sphereInertia4( T const & Mass, T const & Radius); - + */ /// @} }// namespace glm diff --git a/glm/gtx/inertia.inl b/glm/gtx/inertia.inl index f959fd5c..4dc86496 100644 --- a/glm/gtx/inertia.inl +++ b/glm/gtx/inertia.inl @@ -9,6 +9,7 @@ namespace glm { +/* template GLM_FUNC_QUALIFIER detail::tmat3x3 boxInertia3 ( @@ -111,4 +112,5 @@ namespace glm Result[3][3] = static_cast(1); return Result; } + */ }//namespace glm diff --git a/glm/gtx/matrix_cross_product.hpp b/glm/gtx/matrix_cross_product.hpp index 498d0c8c..eac96b9f 100644 --- a/glm/gtx/matrix_cross_product.hpp +++ b/glm/gtx/matrix_cross_product.hpp @@ -53,13 +53,13 @@ namespace glm //! Build a cross product matrix. //! From GLM_GTX_matrix_cross_product extension. - template + template detail::tmat3x3 matrixCross3( detail::tvec3 const & x); //! Build a cross product matrix. //! From GLM_GTX_matrix_cross_product extension. - template + template detail::tmat4x4 matrixCross4( detail::tvec3 const & x); diff --git a/glm/gtx/matrix_cross_product.inl b/glm/gtx/matrix_cross_product.inl index ff9d0772..db0c749b 100644 --- a/glm/gtx/matrix_cross_product.inl +++ b/glm/gtx/matrix_cross_product.inl @@ -9,7 +9,7 @@ namespace glm { - template + template GLM_FUNC_QUALIFIER detail::tmat3x3 matrixCross3 ( detail::tvec3 const & x @@ -25,7 +25,7 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER detail::tmat4x4 matrixCross4 ( detail::tvec3 const & x diff --git a/glm/gtx/matrix_major_storage.hpp b/glm/gtx/matrix_major_storage.hpp index 264b59fc..747b7088 100644 --- a/glm/gtx/matrix_major_storage.hpp +++ b/glm/gtx/matrix_major_storage.hpp @@ -53,20 +53,20 @@ namespace glm //! Build a row major matrix from row vectors. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat2x2 rowMajor2( detail::tvec2 const & v1, detail::tvec2 const & v2); //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat2x2 rowMajor2( detail::tmat2x2 const & m); //! Build a row major matrix from row vectors. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat3x3 rowMajor3( detail::tvec3 const & v1, detail::tvec3 const & v2, @@ -74,13 +74,13 @@ namespace glm //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat3x3 rowMajor3( detail::tmat3x3 const & m); //! Build a row major matrix from row vectors. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat4x4 rowMajor4( detail::tvec4 const & v1, detail::tvec4 const & v2, @@ -89,26 +89,26 @@ namespace glm //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat4x4 rowMajor4( detail::tmat4x4 const & m); //! Build a column major matrix from column vectors. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat2x2 colMajor2( detail::tvec2 const & v1, detail::tvec2 const & v2); //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat2x2 colMajor2( detail::tmat2x2 const & m); //! Build a column major matrix from column vectors. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat3x3 colMajor3( detail::tvec3 const & v1, detail::tvec3 const & v2, @@ -116,13 +116,13 @@ namespace glm //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat3x3 colMajor3( detail::tmat3x3 const & m); //! Build a column major matrix from column vectors. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat4x4 colMajor4( detail::tvec4 const & v1, detail::tvec4 const & v2, @@ -131,7 +131,7 @@ namespace glm //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. - template + template detail::tmat4x4 colMajor4( detail::tmat4x4 const & m); diff --git a/glm/gtx/matrix_major_storage.inl b/glm/gtx/matrix_major_storage.inl index ddcbc1d3..1b789719 100644 --- a/glm/gtx/matrix_major_storage.inl +++ b/glm/gtx/matrix_major_storage.inl @@ -9,7 +9,7 @@ namespace glm { - template + template GLM_FUNC_QUALIFIER detail::tmat2x2 rowMajor2 ( detail::tvec2 const & v1, @@ -24,7 +24,7 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER detail::tmat2x2 rowMajor2( const detail::tmat2x2& m) { @@ -36,7 +36,7 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER detail::tmat3x3 rowMajor3( const detail::tvec3& v1, const detail::tvec3& v2, @@ -55,7 +55,7 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER detail::tmat3x3 rowMajor3( const detail::tmat3x3& m) { @@ -72,7 +72,7 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER detail::tmat4x4 rowMajor4( const detail::tvec4& v1, const detail::tvec4& v2, @@ -99,7 +99,7 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER detail::tmat4x4 rowMajor4( const detail::tmat4x4& m) { @@ -123,7 +123,7 @@ namespace glm return Result; } - template + template GLM_FUNC_QUALIFIER detail::tmat2x2 colMajor2( const detail::tvec2& v1, const detail::tvec2& v2) @@ -131,14 +131,14 @@ namespace glm return detail::tmat2x2(v1, v2); } - template + template GLM_FUNC_QUALIFIER detail::tmat2x2 colMajor2( const detail::tmat2x2& m) { return detail::tmat2x2(m); } - template + template GLM_FUNC_QUALIFIER detail::tmat3x3 colMajor3( const detail::tvec3& v1, const detail::tvec3& v2, @@ -147,14 +147,14 @@ namespace glm return detail::tmat3x3(v1, v2, v3); } - template + template GLM_FUNC_QUALIFIER detail::tmat3x3 colMajor3( const detail::tmat3x3& m) { return detail::tmat3x3(m); } - template + template GLM_FUNC_QUALIFIER detail::tmat4x4 colMajor4( const detail::tvec4& v1, const detail::tvec4& v2, @@ -164,7 +164,7 @@ namespace glm return detail::tmat4x4(v1, v2, v3, v4); } - template + template GLM_FUNC_QUALIFIER detail::tmat4x4 colMajor4( const detail::tmat4x4& m) { diff --git a/glm/gtx/matrix_operation.hpp b/glm/gtx/matrix_operation.hpp index 8a57324e..43a3de62 100644 --- a/glm/gtx/matrix_operation.hpp +++ b/glm/gtx/matrix_operation.hpp @@ -52,57 +52,57 @@ namespace glm //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. - template - detail::tmat2x2 diagonal2x2( - detail::tvec2 const & v); + template + detail::tmat2x2 diagonal2x2( + detail::tvec2 const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. - template - detail::tmat2x3 diagonal2x3( - detail::tvec2 const & v); + template + detail::tmat2x3 diagonal2x3( + detail::tvec2 const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. - template - detail::tmat2x4 diagonal2x4( - detail::tvec2 const & v); + template + detail::tmat2x4 diagonal2x4( + detail::tvec2 const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. - template - detail::tmat3x2 diagonal3x2( - detail::tvec2 const & v); + template + detail::tmat3x2 diagonal3x2( + detail::tvec2 const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. - template - detail::tmat3x3 diagonal3x3( - detail::tvec3 const & v); + template + detail::tmat3x3 diagonal3x3( + detail::tvec3 const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. - template - detail::tmat3x4 diagonal3x4( - detail::tvec3 const & v); + template + detail::tmat3x4 diagonal3x4( + detail::tvec3 const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. - template - detail::tmat4x2 diagonal4x2( - detail::tvec2 const & v); + template + detail::tmat4x2 diagonal4x2( + detail::tvec2 const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. - template - detail::tmat4x3 diagonal4x3( - detail::tvec3 const & v); + template + detail::tmat4x3 diagonal4x3( + detail::tvec3 const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. - template - detail::tmat4x4 diagonal4x4( - detail::tvec4 const & v); + template + detail::tmat4x4 diagonal4x4( + detail::tvec4 const & v); /// @} }//namespace glm diff --git a/glm/gtx/matrix_operation.inl b/glm/gtx/matrix_operation.inl index 37b2b02d..2407afaa 100644 --- a/glm/gtx/matrix_operation.inl +++ b/glm/gtx/matrix_operation.inl @@ -9,87 +9,87 @@ namespace glm { - template - GLM_FUNC_QUALIFIER detail::tmat2x2 diagonal2x2 + template + GLM_FUNC_QUALIFIER detail::tmat2x2 diagonal2x2 ( - detail::tvec2 const & v + detail::tvec2 const & v ) { - detail::tmat2x2 Result(valType(1)); + detail::tmat2x2 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; return Result; } - template - GLM_FUNC_QUALIFIER detail::tmat2x3 diagonal2x3 + template + GLM_FUNC_QUALIFIER detail::tmat2x3 diagonal2x3 ( - detail::tvec2 const & v + detail::tvec2 const & v ) { - detail::tmat2x3 Result(valType(1)); + detail::tmat2x3 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; return Result; } - template - GLM_FUNC_QUALIFIER detail::tmat2x4 diagonal2x4 + template + GLM_FUNC_QUALIFIER detail::tmat2x4 diagonal2x4 ( - detail::tvec2 const & v + detail::tvec2 const & v ) { - detail::tmat2x4 Result(valType(1)); + detail::tmat2x4 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; return Result; } - template - GLM_FUNC_QUALIFIER detail::tmat3x2 diagonal3x2 + template + GLM_FUNC_QUALIFIER detail::tmat3x2 diagonal3x2 ( - detail::tvec2 const & v + detail::tvec2 const & v ) { - detail::tmat3x2 Result(valType(1)); + detail::tmat3x2 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; return Result; } - template - GLM_FUNC_QUALIFIER detail::tmat3x3 diagonal3x3 + template + GLM_FUNC_QUALIFIER detail::tmat3x3 diagonal3x3 ( - detail::tvec3 const & v + detail::tvec3 const & v ) { - detail::tmat3x3 Result(valType(1)); + detail::tmat3x3 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; Result[2][2] = v[2]; return Result; } - template - GLM_FUNC_QUALIFIER detail::tmat3x4 diagonal3x4 + template + GLM_FUNC_QUALIFIER detail::tmat3x4 diagonal3x4 ( - detail::tvec3 const & v + detail::tvec3 const & v ) { - detail::tmat3x4 Result(valType(1)); + detail::tmat3x4 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; Result[2][2] = v[2]; return Result; } - template - GLM_FUNC_QUALIFIER detail::tmat4x4 diagonal4x4 + template + GLM_FUNC_QUALIFIER detail::tmat4x4 diagonal4x4 ( - detail::tvec4 const & v + detail::tvec4 const & v ) { - detail::tmat4x4 Result(valType(1)); + detail::tmat4x4 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; Result[2][2] = v[2]; @@ -97,26 +97,26 @@ namespace glm return Result; } - template - GLM_FUNC_QUALIFIER detail::tmat4x3 diagonal4x3 + template + GLM_FUNC_QUALIFIER detail::tmat4x3 diagonal4x3 ( - detail::tvec3 const & v + detail::tvec3 const & v ) { - detail::tmat4x3 Result(valType(1)); + detail::tmat4x3 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; Result[2][2] = v[2]; return Result; } - template - GLM_FUNC_QUALIFIER detail::tmat4x2 diagonal4x2 + template + GLM_FUNC_QUALIFIER detail::tmat4x2 diagonal4x2 ( - detail::tvec2 const & v + detail::tvec2 const & v ) { - detail::tmat4x2 Result(valType(1)); + detail::tmat4x2 Result(static_cast(1)); Result[0][0] = v[0]; Result[1][1] = v[1]; return Result; diff --git a/glm/gtx/mixed_product.hpp b/glm/gtx/mixed_product.hpp index b2222714..162607a4 100644 --- a/glm/gtx/mixed_product.hpp +++ b/glm/gtx/mixed_product.hpp @@ -53,9 +53,9 @@ namespace glm /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) template valType mixedProduct( - detail::tvec3 const & v1, - detail::tvec3 const & v2, - detail::tvec3 const & v3); + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3); /// @} }// namespace glm diff --git a/glm/gtx/mixed_product.inl b/glm/gtx/mixed_product.inl index 9c3a1793..dca57939 100644 --- a/glm/gtx/mixed_product.inl +++ b/glm/gtx/mixed_product.inl @@ -12,9 +12,9 @@ namespace glm template GLM_FUNC_QUALIFIER valType mixedProduct ( - detail::tvec3 const & v1, - detail::tvec3 const & v2, - detail::tvec3 const & v3 + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3 ) { return dot(cross(v1, v2), v3); diff --git a/glm/gtx/normalize_dot.inl b/glm/gtx/normalize_dot.inl index 5058eacc..5e9650e1 100644 --- a/glm/gtx/normalize_dot.inl +++ b/glm/gtx/normalize_dot.inl @@ -22,11 +22,11 @@ namespace glm glm::dot(y, y)); } - template - GLM_FUNC_QUALIFIER valType normalizeDot + template + GLM_FUNC_QUALIFIER T normalizeDot ( - detail::tvec2 const & x, - detail::tvec2 const & y + detail::tvec2 const & x, + detail::tvec2 const & y ) { return @@ -35,11 +35,11 @@ namespace glm glm::dot(y, y)); } - template - GLM_FUNC_QUALIFIER valType normalizeDot + template + GLM_FUNC_QUALIFIER T normalizeDot ( - detail::tvec3 const & x, - detail::tvec3 const & y + detail::tvec3 const & x, + detail::tvec3 const & y ) { return @@ -48,11 +48,11 @@ namespace glm glm::dot(y, y)); } - template - GLM_FUNC_QUALIFIER valType normalizeDot + template + GLM_FUNC_QUALIFIER T normalizeDot ( - detail::tvec4 const & x, - detail::tvec4 const & y + detail::tvec4 const & x, + detail::tvec4 const & y ) { return @@ -74,11 +74,11 @@ namespace glm glm::dot(y, y)); } - template - GLM_FUNC_QUALIFIER valType fastNormalizeDot + template + GLM_FUNC_QUALIFIER T fastNormalizeDot ( - detail::tvec2 const & x, - detail::tvec2 const & y + detail::tvec2 const & x, + detail::tvec2 const & y ) { return @@ -87,11 +87,11 @@ namespace glm glm::dot(y, y)); } - template - GLM_FUNC_QUALIFIER valType fastNormalizeDot + template + GLM_FUNC_QUALIFIER T fastNormalizeDot ( - detail::tvec3 const & x, - detail::tvec3 const & y + detail::tvec3 const & x, + detail::tvec3 const & y ) { return @@ -100,11 +100,11 @@ namespace glm glm::dot(y, y)); } - template - GLM_FUNC_QUALIFIER valType fastNormalizeDot + template + GLM_FUNC_QUALIFIER T fastNormalizeDot ( - detail::tvec4 const & x, - detail::tvec4 const & y + detail::tvec4 const & x, + detail::tvec4 const & y ) { return diff --git a/glm/gtx/polar_coordinates.hpp b/glm/gtx/polar_coordinates.hpp index f95fb782..04a9fc0c 100644 --- a/glm/gtx/polar_coordinates.hpp +++ b/glm/gtx/polar_coordinates.hpp @@ -53,14 +53,14 @@ namespace glm /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. /// /// @see gtx_polar_coordinates - template + template detail::tvec3 polar( detail::tvec3 const & euclidean); /// Convert Polar to Euclidean coordinates. /// /// @see gtx_polar_coordinates - template + template detail::tvec3 euclidean( detail::tvec2 const & polar); diff --git a/glm/gtx/polar_coordinates.inl b/glm/gtx/polar_coordinates.inl index 8349080b..43718d7f 100644 --- a/glm/gtx/polar_coordinates.inl +++ b/glm/gtx/polar_coordinates.inl @@ -9,7 +9,7 @@ namespace glm { - template + template GLM_FUNC_QUALIFIER detail::tvec3 polar ( detail::tvec3 const & euclidean @@ -32,7 +32,7 @@ namespace glm #endif } - template + template GLM_FUNC_QUALIFIER detail::tvec3 euclidean ( detail::tvec2 const & polar diff --git a/glm/gtx/vector_access.hpp b/glm/gtx/vector_access.hpp index 29bb8971..82b73eee 100644 --- a/glm/gtx/vector_access.hpp +++ b/glm/gtx/vector_access.hpp @@ -54,7 +54,7 @@ namespace glm /// @see gtx_vector_access extension. template void set( - detail::tvec2 & v, + detail::tvec2 & v, valType const & x, valType const & y); @@ -62,7 +62,7 @@ namespace glm /// @see gtx_vector_access extension. template void set( - detail::tvec3 & v, + detail::tvec3 & v, valType const & x, valType const & y, valType const & z); @@ -71,7 +71,7 @@ namespace glm /// @see gtx_vector_access extension. template void set( - detail::tvec4 & v, + detail::tvec4 & v, valType const & x, valType const & y, valType const & z, diff --git a/glm/gtx/vector_access.inl b/glm/gtx/vector_access.inl index b5a56037..e50b27b1 100644 --- a/glm/gtx/vector_access.inl +++ b/glm/gtx/vector_access.inl @@ -12,7 +12,7 @@ namespace glm template GLM_FUNC_QUALIFIER void set ( - detail::tvec2& v, + detail::tvec2& v, valType const & x, valType const & y ) @@ -24,7 +24,7 @@ namespace glm template GLM_FUNC_QUALIFIER void set ( - detail::tvec3& v, + detail::tvec3& v, valType const & x, valType const & y, valType const & z @@ -38,7 +38,7 @@ namespace glm template GLM_FUNC_QUALIFIER void set ( - detail::tvec4& v, + detail::tvec4& v, valType const & x, valType const & y, valType const & z, diff --git a/test/gtx/gtx_fast_exponential.cpp b/test/gtx/gtx_fast_exponential.cpp index 65ae56c8..5b52bed5 100644 --- a/test/gtx/gtx_fast_exponential.cpp +++ b/test/gtx/gtx_fast_exponential.cpp @@ -7,11 +7,9 @@ // File : test/gtx/associated_min_max.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_fast_square_root.cpp b/test/gtx/gtx_fast_square_root.cpp index 65ae56c8..f6c4bcc1 100644 --- a/test/gtx/gtx_fast_square_root.cpp +++ b/test/gtx/gtx_fast_square_root.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/fast_square_root.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp index 65ae56c8..638313aa 100644 --- a/test/gtx/gtx_fast_trigonometry.cpp +++ b/test/gtx/gtx_fast_trigonometry.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/fast_trigonometry.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_handed_coordinate_space.cpp b/test/gtx/gtx_handed_coordinate_space.cpp index 65ae56c8..c5ca22e8 100644 --- a/test/gtx/gtx_handed_coordinate_space.cpp +++ b/test/gtx/gtx_handed_coordinate_space.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/handed_coordinate_space.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_inertia.cpp b/test/gtx/gtx_inertia.cpp index 65ae56c8..fa15e62f 100644 --- a/test/gtx/gtx_inertia.cpp +++ b/test/gtx/gtx_inertia.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/inertia.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_intersect.cpp b/test/gtx/gtx_intersect.cpp index 65ae56c8..fe6c674e 100644 --- a/test/gtx/gtx_intersect.cpp +++ b/test/gtx/gtx_intersect.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/intersect.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_log_base.cpp b/test/gtx/gtx_log_base.cpp index 65ae56c8..b3991044 100644 --- a/test/gtx/gtx_log_base.cpp +++ b/test/gtx/gtx_log_base.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/log_base.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_matrix_cross_product.cpp b/test/gtx/gtx_matrix_cross_product.cpp index 65ae56c8..6d7651c1 100644 --- a/test/gtx/gtx_matrix_cross_product.cpp +++ b/test/gtx/gtx_matrix_cross_product.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/matrix_cross_product.hpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_matrix_major_storage.cpp b/test/gtx/gtx_matrix_major_storage.cpp index 65ae56c8..8eec864b 100644 --- a/test/gtx/gtx_matrix_major_storage.cpp +++ b/test/gtx/gtx_matrix_major_storage.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/matrix_major_storage.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_matrix_operation.cpp b/test/gtx/gtx_matrix_operation.cpp index 65ae56c8..23f6ee10 100644 --- a/test/gtx/gtx_matrix_operation.cpp +++ b/test/gtx/gtx_matrix_operation.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/matrix_operation.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_norm.cpp b/test/gtx/gtx_norm.cpp index 65ae56c8..4489288a 100644 --- a/test/gtx/gtx_norm.cpp +++ b/test/gtx/gtx_norm.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/norm.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_normal.cpp b/test/gtx/gtx_normal.cpp index 65ae56c8..5ac088ad 100644 --- a/test/gtx/gtx_normal.cpp +++ b/test/gtx/gtx_normal.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/normal.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_normalize_dot.cpp b/test/gtx/gtx_normalize_dot.cpp index 65ae56c8..758ecf04 100644 --- a/test/gtx/gtx_normalize_dot.cpp +++ b/test/gtx/gtx_normalize_dot.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/normalize_dot.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_number_precision.cpp b/test/gtx/gtx_number_precision.cpp index 65ae56c8..cc4c4055 100644 --- a/test/gtx/gtx_number_precision.cpp +++ b/test/gtx/gtx_number_precision.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/number_precision.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_optimum_pow.cpp b/test/gtx/gtx_optimum_pow.cpp index 65ae56c8..e6de00b9 100644 --- a/test/gtx/gtx_optimum_pow.cpp +++ b/test/gtx/gtx_optimum_pow.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/optimum_pow.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_orthonormalize.cpp b/test/gtx/gtx_orthonormalize.cpp index 65ae56c8..3f1127f8 100644 --- a/test/gtx/gtx_orthonormalize.cpp +++ b/test/gtx/gtx_orthonormalize.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/orthonormalize.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_perpendicular.cpp b/test/gtx/gtx_perpendicular.cpp index 65ae56c8..274d0dba 100644 --- a/test/gtx/gtx_perpendicular.cpp +++ b/test/gtx/gtx_perpendicular.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/perpendicular.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_polar_coordinates.cpp b/test/gtx/gtx_polar_coordinates.cpp index 65ae56c8..3f94bda0 100644 --- a/test/gtx/gtx_polar_coordinates.cpp +++ b/test/gtx/gtx_polar_coordinates.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/polar_coordinates.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_projection.cpp b/test/gtx/gtx_projection.cpp index 65ae56c8..102e0786 100644 --- a/test/gtx/gtx_projection.cpp +++ b/test/gtx/gtx_projection.cpp @@ -4,14 +4,12 @@ // Created : 2013-10-25 // Updated : 2013-10-25 // Licence : This source is under MIT licence -// File : test/gtx/associated_min_max.cpp +// File : test/gtx/projection.cpp /////////////////////////////////////////////////////////////////////////////////////////////////// -#include - #include #include -#include +#include int main() { diff --git a/test/gtx/gtx_vector_query.cpp b/test/gtx/gtx_vector_query.cpp index 0682dab9..384a1906 100644 --- a/test/gtx/gtx_vector_query.cpp +++ b/test/gtx/gtx_vector_query.cpp @@ -12,7 +12,7 @@ int test_areCollinear() { - int Error(0); + int Error(0); { bool TestA = glm::areCollinear(glm::vec2(-1), glm::vec2(1), 0.00001f); @@ -29,47 +29,47 @@ int test_areCollinear() Error += TestA ? 0 : 1; } - return Error; + return Error; } int test_areOrthogonal() { - int Error(0); - + int Error(0); + bool TestA = glm::areOrthogonal(glm::vec2(1, 0), glm::vec2(0, 1), 0.00001f); - Error += TestA ? 0 : 1; + Error += TestA ? 0 : 1; - return Error; + return Error; } int test_isNormalized() { - int Error(0); - + int Error(0); + bool TestA = glm::isNormalized(glm::vec4(1, 0, 0, 0), 0.00001f); - Error += TestA ? 0 : 1; + Error += TestA ? 0 : 1; - return Error; + return Error; } int test_isNull() { - int Error(0); - + int Error(0); + bool TestA = glm::isNull(glm::vec4(0), 0.00001f); - Error += TestA ? 0 : 1; + Error += TestA ? 0 : 1; - return Error; + return Error; } int test_areOrthonormal() { - int Error(0); - + int Error(0); + bool TestA = glm::areOrthonormal(glm::vec2(1, 0), glm::vec2(0, 1), 0.00001f); - Error += TestA ? 0 : 1; + Error += TestA ? 0 : 1; - return Error; + return Error; } int main()