Added test files and fixed build errors for experimental extensions.

master
Christophe Riccio ago%!(EXTRA string=12 years)
parent 2e72af3f6d
commit fbb54649b7
  1. 2
      glm/core/intrinsic_matrix.inl
  2. 120
      glm/core/intrinsic_vector_relational.inl
  3. 4
      glm/gtx/closest_point.hpp
  4. 20
      glm/gtx/closest_point.inl
  5. 12
      glm/gtx/handed_coordinate_space.hpp
  6. 10
      glm/gtx/handed_coordinate_space.inl
  7. 19
      glm/gtx/inertia.hpp
  8. 2
      glm/gtx/inertia.inl
  9. 4
      glm/gtx/matrix_cross_product.hpp
  10. 4
      glm/gtx/matrix_cross_product.inl
  11. 24
      glm/gtx/matrix_major_storage.hpp
  12. 24
      glm/gtx/matrix_major_storage.inl
  13. 54
      glm/gtx/matrix_operation.hpp
  14. 72
      glm/gtx/matrix_operation.inl
  15. 6
      glm/gtx/mixed_product.hpp
  16. 6
      glm/gtx/mixed_product.inl
  17. 48
      glm/gtx/normalize_dot.inl
  18. 4
      glm/gtx/polar_coordinates.hpp
  19. 4
      glm/gtx/polar_coordinates.inl
  20. 6
      glm/gtx/vector_access.hpp
  21. 6
      glm/gtx/vector_access.inl
  22. 4
      test/gtx/gtx_fast_exponential.cpp
  23. 6
      test/gtx/gtx_fast_square_root.cpp
  24. 6
      test/gtx/gtx_fast_trigonometry.cpp
  25. 6
      test/gtx/gtx_handed_coordinate_space.cpp
  26. 6
      test/gtx/gtx_inertia.cpp
  27. 6
      test/gtx/gtx_intersect.cpp
  28. 6
      test/gtx/gtx_log_base.cpp
  29. 6
      test/gtx/gtx_matrix_cross_product.cpp
  30. 6
      test/gtx/gtx_matrix_major_storage.cpp
  31. 6
      test/gtx/gtx_matrix_operation.cpp
  32. 6
      test/gtx/gtx_norm.cpp
  33. 6
      test/gtx/gtx_normal.cpp
  34. 6
      test/gtx/gtx_normalize_dot.cpp
  35. 6
      test/gtx/gtx_number_precision.cpp
  36. 6
      test/gtx/gtx_optimum_pow.cpp
  37. 6
      test/gtx/gtx_orthonormalize.cpp
  38. 6
      test/gtx/gtx_perpendicular.cpp
  39. 6
      test/gtx/gtx_polar_coordinates.cpp
  40. 6
      test/gtx/gtx_projection.cpp
  41. 36
      test/gtx/gtx_vector_query.cpp

@ -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 Sin0 = _mm_set_ss(s);
__m128 SinA = _mm_shuffle_ps(Sin0, Sin0, _MM_SHUFFLE(0, 0, 0, 0)); __m128 SinA = _mm_shuffle_ps(Sin0, Sin0, _MM_SHUFFLE(0, 0, 0, 0));
// detail::tvec3<valType> temp = (valType(1) - c) * axis; // detail::tvec3<T, P> temp = (valType(1) - c) * axis;
__m128 Temp0 = _mm_sub_ps(one, CosA); __m128 Temp0 = _mm_sub_ps(one, CosA);
__m128 Temp1 = _mm_mul_ps(Temp0, AxisC); __m128 Temp1 = _mm_mul_ps(Temp0, AxisC);

@ -28,10 +28,10 @@
// //
//// lessThan //// lessThan
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type lessThan //GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type lessThan
//( //(
// detail::tvec2<valType> const & x, // detail::tvec2<T, P> const & x,
// detail::tvec2<valType> const & y // detail::tvec2<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -43,10 +43,10 @@
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type lessThan //GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type lessThan
//( //(
// detail::tvec3<valType> const & x, // detail::tvec3<T, P> const & x,
// detail::tvec3<valType> const & y // detail::tvec3<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -58,10 +58,10 @@
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type lessThan //GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type lessThan
//( //(
// detail::tvec4<valType> const & x, // detail::tvec4<T, P> const & x,
// detail::tvec4<valType> const & y // detail::tvec4<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -74,10 +74,10 @@
// //
//// lessThanEqual //// lessThanEqual
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type lessThanEqual //GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type lessThanEqual
//( //(
// detail::tvec2<valType> const & x, // detail::tvec2<T, P> const & x,
// detail::tvec2<valType> const & y // detail::tvec2<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -89,10 +89,10 @@
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type lessThanEqual //GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type lessThanEqual
//( //(
// detail::tvec3<valType> const & x, // detail::tvec3<T, P> const & x,
// detail::tvec3<valType> const & y // detail::tvec3<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -104,10 +104,10 @@
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type lessThanEqual //GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type lessThanEqual
//( //(
// detail::tvec4<valType> const & x, // detail::tvec4<T, P> const & x,
// detail::tvec4<valType> const & y // detail::tvec4<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -120,10 +120,10 @@
// //
//// greaterThan //// greaterThan
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type greaterThan //GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type greaterThan
//( //(
// detail::tvec2<valType> const & x, // detail::tvec2<T, P> const & x,
// detail::tvec2<valType> const & y // detail::tvec2<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -135,10 +135,10 @@
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type greaterThan //GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type greaterThan
//( //(
// detail::tvec3<valType> const & x, // detail::tvec3<T, P> const & x,
// detail::tvec3<valType> const & y // detail::tvec3<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -150,10 +150,10 @@
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type greaterThan //GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type greaterThan
//( //(
// detail::tvec4<valType> const & x, // detail::tvec4<T, P> const & x,
// detail::tvec4<valType> const & y // detail::tvec4<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -166,10 +166,10 @@
// //
//// greaterThanEqual //// greaterThanEqual
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type greaterThanEqual //GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type greaterThanEqual
//( //(
// detail::tvec2<valType> const & x, // detail::tvec2<T, P> const & x,
// detail::tvec2<valType> const & y // detail::tvec2<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -181,10 +181,10 @@
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type greaterThanEqual //GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type greaterThanEqual
//( //(
// detail::tvec3<valType> const & x, // detail::tvec3<T, P> const & x,
// detail::tvec3<valType> const & y // detail::tvec3<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -196,10 +196,10 @@
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type greaterThanEqual //GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type greaterThanEqual
//( //(
// detail::tvec4<valType> const & x, // detail::tvec4<T, P> const & x,
// detail::tvec4<valType> const & y // detail::tvec4<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -212,10 +212,10 @@
// //
//// equal //// equal
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type equal //GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type equal
//( //(
// detail::tvec2<valType> const & x, // detail::tvec2<T, P> const & x,
// detail::tvec2<valType> const & y // detail::tvec2<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -224,14 +224,14 @@
// detail::type<valType>::is_uint || // detail::type<valType>::is_uint ||
// detail::type<valType>::is_bool); // detail::type<valType>::is_bool);
// //
// return typename detail::tvec2<valType>::bool_type(x.x == y.x, x.y == y.y); // return typename detail::tvec2<T, P>::bool_type(x.x == y.x, x.y == y.y);
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type equal //GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type equal
//( //(
// detail::tvec3<valType> const & x, // detail::tvec3<T, P> const & x,
// detail::tvec3<valType> const & y // detail::tvec3<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -240,14 +240,14 @@
// detail::type<valType>::is_uint || // detail::type<valType>::is_uint ||
// detail::type<valType>::is_bool); // detail::type<valType>::is_bool);
// //
// return typename detail::tvec3<valType>::bool_type(x.x == y.x, x.y == y.y, x.z == y.z); // return typename detail::tvec3<T, P>::bool_type(x.x == y.x, x.y == y.y, x.z == y.z);
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type equal //GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type equal
//( //(
// detail::tvec4<valType> const & x, // detail::tvec4<T, P> const & x,
// detail::tvec4<valType> const & y // detail::tvec4<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -256,15 +256,15 @@
// detail::type<valType>::is_uint || // detail::type<valType>::is_uint ||
// detail::type<valType>::is_bool); // detail::type<valType>::is_bool);
// //
// return typename detail::tvec4<valType>::bool_type(x.x == y.x, x.y == y.y, x.z == y.z, x.w == y.w); // return typename detail::tvec4<T, P>::bool_type(x.x == y.x, x.y == y.y, x.z == y.z, x.w == y.w);
//} //}
// //
//// notEqual //// notEqual
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type notEqual //GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type notEqual
//( //(
// detail::tvec2<valType> const & x, // detail::tvec2<T, P> const & x,
// detail::tvec2<valType> const & y // detail::tvec2<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -273,14 +273,14 @@
// detail::type<valType>::is_uint || // detail::type<valType>::is_uint ||
// detail::type<valType>::is_bool); // detail::type<valType>::is_bool);
// //
// return typename detail::tvec2<valType>::bool_type(x.x != y.x, x.y != y.y); // return typename detail::tvec2<T, P>::bool_type(x.x != y.x, x.y != y.y);
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type notEqual //GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type notEqual
//( //(
// detail::tvec3<valType> const & x, // detail::tvec3<T, P> const & x,
// detail::tvec3<valType> const & y // detail::tvec3<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -289,14 +289,14 @@
// detail::type<valType>::is_uint || // detail::type<valType>::is_uint ||
// detail::type<valType>::is_bool); // detail::type<valType>::is_bool);
// //
// return typename detail::tvec3<valType>::bool_type(x.x != y.x, x.y != y.y, x.z != y.z); // return typename detail::tvec3<T, P>::bool_type(x.x != y.x, x.y != y.y, x.z != y.z);
//} //}
// //
//template <typename valType> //template <typename valType>
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type notEqual //GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type notEqual
//( //(
// detail::tvec4<valType> const & x, // detail::tvec4<T, P> const & x,
// detail::tvec4<valType> const & y // detail::tvec4<T, P> const & y
//) //)
//{ //{
// GLM_STATIC_ASSERT( // GLM_STATIC_ASSERT(
@ -305,7 +305,7 @@
// detail::type<valType>::is_uint || // detail::type<valType>::is_uint ||
// detail::type<valType>::is_bool); // detail::type<valType>::is_bool);
// //
// return typename detail::tvec4<valType>::bool_type(x.x != y.x, x.y != y.y, x.z != y.z, x.w != y.w); // return typename detail::tvec4<T, P>::bool_type(x.x != y.x, x.y != y.y, x.z != y.z, x.w != y.w);
//} //}
// //
//// any //// any

@ -52,9 +52,9 @@ namespace glm
/// Find the point on a straight line which is the closet of a point. /// Find the point on a straight line which is the closet of a point.
/// @see gtx_closest_point /// @see gtx_closest_point
template <typename T> template <typename T, precision P>
detail::tvec3<T, P> closestPointOnLine( detail::tvec3<T, P> closestPointOnLine(
detail::tvec3<T, P> const & point, detail::tvec3<T, P> const & point,
detail::tvec3<T, P> const & a, detail::tvec3<T, P> const & a,
detail::tvec3<T, P> const & b); detail::tvec3<T, P> const & b);

@ -12,22 +12,22 @@
namespace glm namespace glm
{ {
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<valType> closestPointOnLine GLM_FUNC_QUALIFIER detail::tvec3<T, P> closestPointOnLine
( (
detail::tvec3<valType> const & point, detail::tvec3<T, P> const & point,
detail::tvec3<valType> const & a, detail::tvec3<T, P> const & a,
detail::tvec3<valType> const & b detail::tvec3<T, P> const & b
) )
{ {
valType LineLength = distance(a, b); T LineLength = distance(a, b);
detail::tvec3<valType> Vector = point - a; detail::tvec3<T, P> Vector = point - a;
detail::tvec3<valType> LineDirection = (b - a) / LineLength; detail::tvec3<T, P> LineDirection = (b - a) / LineLength;
// Project Vector to LineDirection to get the distance of point from a // 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; if(Distance >= LineLength) return b;
return a + LineDirection * Distance; return a + LineDirection * Distance;
} }

@ -52,18 +52,18 @@ namespace glm
//! Return if a trihedron right handed or not. //! Return if a trihedron right handed or not.
//! From GLM_GTX_handed_coordinate_space extension. //! From GLM_GTX_handed_coordinate_space extension.
template <typename T> template <typename T, precision P>
bool rightHanded( bool rightHanded(
detail::tvec3<T, P> const & tangent, detail::tvec3<T, P> const & tangent,
detail::tvec3<T, P> const & binormal, detail::tvec3<T, P> const & binormal,
detail::tvec3<T, P> const & normal); detail::tvec3<T, P> const & normal);
//! Return if a trihedron left handed or not. //! Return if a trihedron left handed or not.
//! From GLM_GTX_handed_coordinate_space extension. //! From GLM_GTX_handed_coordinate_space extension.
template <typename T> template <typename T, precision P>
bool leftHanded( bool leftHanded(
detail::tvec3<T, P> const & tangent, detail::tvec3<T, P> const & tangent,
detail::tvec3<T, P> const & binormal, detail::tvec3<T, P> const & binormal,
detail::tvec3<T, P> const & normal); detail::tvec3<T, P> const & normal);
/// @} /// @}

@ -9,10 +9,10 @@
namespace glm namespace glm
{ {
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER bool rightHanded GLM_FUNC_QUALIFIER bool rightHanded
( (
detail::tvec3<T, P> const & tangent, detail::tvec3<T, P> const & tangent,
detail::tvec3<T, P> const & binormal, detail::tvec3<T, P> const & binormal,
detail::tvec3<T, P> const & normal detail::tvec3<T, P> const & normal
) )
@ -20,11 +20,11 @@ namespace glm
return dot(cross(normal, tangent), binormal) > T(0); return dot(cross(normal, tangent), binormal) > T(0);
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER bool leftHanded GLM_FUNC_QUALIFIER bool leftHanded
( (
detail::tvec3<T, P> const & tangent, detail::tvec3<T, P> const & tangent,
detail::tvec3<T, P> const & binormal, detail::tvec3<T, P> const & binormal,
detail::tvec3<T, P> const & normal detail::tvec3<T, P> const & normal
) )
{ {

@ -48,65 +48,66 @@
namespace glm namespace glm
{ {
/*
/// @addtogroup gtx_inertia /// @addtogroup gtx_inertia
/// @{ /// @{
//! Build an inertia matrix for a box. //! Build an inertia matrix for a box.
//! From GLM_GTX_inertia extension. //! From GLM_GTX_inertia extension.
template <typename T> template <typename T, precision P>
detail::tmat3x3<T, P> boxInertia3( detail::tmat3x3<T, P> boxInertia3(
T const & Mass, T const & Mass,
detail::tvec3<T, P> const & Scale); detail::tvec3<T, P> const & Scale);
//! Build an inertia matrix for a box. //! Build an inertia matrix for a box.
//! From GLM_GTX_inertia extension. //! From GLM_GTX_inertia extension.
template <typename T> template <typename T, precision P>
detail::tmat4x4<T, P> boxInertia4( detail::tmat4x4<T, P> boxInertia4(
T const & Mass, T const & Mass,
detail::tvec3<T, P> const & Scale); detail::tvec3<T, P> const & Scale);
//! Build an inertia matrix for a disk. //! Build an inertia matrix for a disk.
//! From GLM_GTX_inertia extension. //! From GLM_GTX_inertia extension.
template <typename T> template <typename T, precision P>
detail::tmat3x3<T, P> diskInertia3( detail::tmat3x3<T, P> diskInertia3(
T const & Mass, T const & Mass,
T const & Radius); T const & Radius);
//! Build an inertia matrix for a disk. //! Build an inertia matrix for a disk.
//! From GLM_GTX_inertia extension. //! From GLM_GTX_inertia extension.
template <typename T> template <typename T, precision P>
detail::tmat4x4<T, P> diskInertia4( detail::tmat4x4<T, P> diskInertia4(
T const & Mass, T const & Mass,
T const & Radius); T const & Radius);
//! Build an inertia matrix for a ball. //! Build an inertia matrix for a ball.
//! From GLM_GTX_inertia extension. //! From GLM_GTX_inertia extension.
template <typename T> template <typename T, precision P>
detail::tmat3x3<T, P> ballInertia3( detail::tmat3x3<T, P> ballInertia3(
T const & Mass, T const & Mass,
T const & Radius); T const & Radius);
//! Build an inertia matrix for a ball. //! Build an inertia matrix for a ball.
//! From GLM_GTX_inertia extension. //! From GLM_GTX_inertia extension.
template <typename T> template <typename T, precision P>
detail::tmat4x4<T, P> ballInertia4( detail::tmat4x4<T, P> ballInertia4(
T const & Mass, T const & Mass,
T const & Radius); T const & Radius);
//! Build an inertia matrix for a sphere. //! Build an inertia matrix for a sphere.
//! From GLM_GTX_inertia extension. //! From GLM_GTX_inertia extension.
template <typename T> template <typename T, precision P>
detail::tmat3x3<T, P> sphereInertia3( detail::tmat3x3<T, P> sphereInertia3(
T const & Mass, T const & Mass,
T const & Radius); T const & Radius);
//! Build an inertia matrix for a sphere. //! Build an inertia matrix for a sphere.
//! From GLM_GTX_inertia extension. //! From GLM_GTX_inertia extension.
template <typename T> template <typename T, precision P>
detail::tmat4x4<T, P> sphereInertia4( detail::tmat4x4<T, P> sphereInertia4(
T const & Mass, T const & Mass,
T const & Radius); T const & Radius);
*/
/// @} /// @}
}// namespace glm }// namespace glm

@ -9,6 +9,7 @@
namespace glm namespace glm
{ {
/*
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> boxInertia3 GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> boxInertia3
( (
@ -111,4 +112,5 @@ namespace glm
Result[3][3] = static_cast<T>(1); Result[3][3] = static_cast<T>(1);
return Result; return Result;
} }
*/
}//namespace glm }//namespace glm

@ -53,13 +53,13 @@ namespace glm
//! Build a cross product matrix. //! Build a cross product matrix.
//! From GLM_GTX_matrix_cross_product extension. //! From GLM_GTX_matrix_cross_product extension.
template <typename T> template <typename T, precision P>
detail::tmat3x3<T, P> matrixCross3( detail::tmat3x3<T, P> matrixCross3(
detail::tvec3<T, P> const & x); detail::tvec3<T, P> const & x);
//! Build a cross product matrix. //! Build a cross product matrix.
//! From GLM_GTX_matrix_cross_product extension. //! From GLM_GTX_matrix_cross_product extension.
template <typename T> template <typename T, precision P>
detail::tmat4x4<T, P> matrixCross4( detail::tmat4x4<T, P> matrixCross4(
detail::tvec3<T, P> const & x); detail::tvec3<T, P> const & x);

@ -9,7 +9,7 @@
namespace glm namespace glm
{ {
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> matrixCross3 GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> matrixCross3
( (
detail::tvec3<T, P> const & x detail::tvec3<T, P> const & x
@ -25,7 +25,7 @@ namespace glm
return Result; return Result;
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> matrixCross4 GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> matrixCross4
( (
detail::tvec3<T, P> const & x detail::tvec3<T, P> const & x

@ -53,20 +53,20 @@ namespace glm
//! Build a row major matrix from row vectors. //! Build a row major matrix from row vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat2x2<T, P> rowMajor2( detail::tmat2x2<T, P> rowMajor2(
detail::tvec2<T, P> const & v1, detail::tvec2<T, P> const & v1,
detail::tvec2<T, P> const & v2); detail::tvec2<T, P> const & v2);
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat2x2<T, P> rowMajor2( detail::tmat2x2<T, P> rowMajor2(
detail::tmat2x2<T, P> const & m); detail::tmat2x2<T, P> const & m);
//! Build a row major matrix from row vectors. //! Build a row major matrix from row vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat3x3<T, P> rowMajor3( detail::tmat3x3<T, P> rowMajor3(
detail::tvec3<T, P> const & v1, detail::tvec3<T, P> const & v1,
detail::tvec3<T, P> const & v2, detail::tvec3<T, P> const & v2,
@ -74,13 +74,13 @@ namespace glm
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat3x3<T, P> rowMajor3( detail::tmat3x3<T, P> rowMajor3(
detail::tmat3x3<T, P> const & m); detail::tmat3x3<T, P> const & m);
//! Build a row major matrix from row vectors. //! Build a row major matrix from row vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat4x4<T, P> rowMajor4( detail::tmat4x4<T, P> rowMajor4(
detail::tvec4<T, P> const & v1, detail::tvec4<T, P> const & v1,
detail::tvec4<T, P> const & v2, detail::tvec4<T, P> const & v2,
@ -89,26 +89,26 @@ namespace glm
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat4x4<T, P> rowMajor4( detail::tmat4x4<T, P> rowMajor4(
detail::tmat4x4<T, P> const & m); detail::tmat4x4<T, P> const & m);
//! Build a column major matrix from column vectors. //! Build a column major matrix from column vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat2x2<T, P> colMajor2( detail::tmat2x2<T, P> colMajor2(
detail::tvec2<T, P> const & v1, detail::tvec2<T, P> const & v1,
detail::tvec2<T, P> const & v2); detail::tvec2<T, P> const & v2);
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat2x2<T, P> colMajor2( detail::tmat2x2<T, P> colMajor2(
detail::tmat2x2<T, P> const & m); detail::tmat2x2<T, P> const & m);
//! Build a column major matrix from column vectors. //! Build a column major matrix from column vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat3x3<T, P> colMajor3( detail::tmat3x3<T, P> colMajor3(
detail::tvec3<T, P> const & v1, detail::tvec3<T, P> const & v1,
detail::tvec3<T, P> const & v2, detail::tvec3<T, P> const & v2,
@ -116,13 +116,13 @@ namespace glm
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat3x3<T, P> colMajor3( detail::tmat3x3<T, P> colMajor3(
detail::tmat3x3<T, P> const & m); detail::tmat3x3<T, P> const & m);
//! Build a column major matrix from column vectors. //! Build a column major matrix from column vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat4x4<T, P> colMajor4( detail::tmat4x4<T, P> colMajor4(
detail::tvec4<T, P> const & v1, detail::tvec4<T, P> const & v1,
detail::tvec4<T, P> const & v2, detail::tvec4<T, P> const & v2,
@ -131,7 +131,7 @@ namespace glm
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template <typename T> template <typename T, precision P>
detail::tmat4x4<T, P> colMajor4( detail::tmat4x4<T, P> colMajor4(
detail::tmat4x4<T, P> const & m); detail::tmat4x4<T, P> const & m);

@ -9,7 +9,7 @@
namespace glm namespace glm
{ {
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> rowMajor2 GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> rowMajor2
( (
detail::tvec2<T, P> const & v1, detail::tvec2<T, P> const & v1,
@ -24,7 +24,7 @@ namespace glm
return Result; return Result;
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> rowMajor2( GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> rowMajor2(
const detail::tmat2x2<T, P>& m) const detail::tmat2x2<T, P>& m)
{ {
@ -36,7 +36,7 @@ namespace glm
return Result; return Result;
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> rowMajor3( GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> rowMajor3(
const detail::tvec3<T, P>& v1, const detail::tvec3<T, P>& v1,
const detail::tvec3<T, P>& v2, const detail::tvec3<T, P>& v2,
@ -55,7 +55,7 @@ namespace glm
return Result; return Result;
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> rowMajor3( GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> rowMajor3(
const detail::tmat3x3<T, P>& m) const detail::tmat3x3<T, P>& m)
{ {
@ -72,7 +72,7 @@ namespace glm
return Result; return Result;
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rowMajor4( GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rowMajor4(
const detail::tvec4<T, P>& v1, const detail::tvec4<T, P>& v1,
const detail::tvec4<T, P>& v2, const detail::tvec4<T, P>& v2,
@ -99,7 +99,7 @@ namespace glm
return Result; return Result;
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rowMajor4( GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rowMajor4(
const detail::tmat4x4<T, P>& m) const detail::tmat4x4<T, P>& m)
{ {
@ -123,7 +123,7 @@ namespace glm
return Result; return Result;
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> colMajor2( GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> colMajor2(
const detail::tvec2<T, P>& v1, const detail::tvec2<T, P>& v1,
const detail::tvec2<T, P>& v2) const detail::tvec2<T, P>& v2)
@ -131,14 +131,14 @@ namespace glm
return detail::tmat2x2<T, P>(v1, v2); return detail::tmat2x2<T, P>(v1, v2);
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> colMajor2( GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> colMajor2(
const detail::tmat2x2<T, P>& m) const detail::tmat2x2<T, P>& m)
{ {
return detail::tmat2x2<T, P>(m); return detail::tmat2x2<T, P>(m);
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> colMajor3( GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> colMajor3(
const detail::tvec3<T, P>& v1, const detail::tvec3<T, P>& v1,
const detail::tvec3<T, P>& v2, const detail::tvec3<T, P>& v2,
@ -147,14 +147,14 @@ namespace glm
return detail::tmat3x3<T, P>(v1, v2, v3); return detail::tmat3x3<T, P>(v1, v2, v3);
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> colMajor3( GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> colMajor3(
const detail::tmat3x3<T, P>& m) const detail::tmat3x3<T, P>& m)
{ {
return detail::tmat3x3<T, P>(m); return detail::tmat3x3<T, P>(m);
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> colMajor4( GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> colMajor4(
const detail::tvec4<T, P>& v1, const detail::tvec4<T, P>& v1,
const detail::tvec4<T, P>& v2, const detail::tvec4<T, P>& v2,
@ -164,7 +164,7 @@ namespace glm
return detail::tmat4x4<T, P>(v1, v2, v3, v4); return detail::tmat4x4<T, P>(v1, v2, v3, v4);
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> colMajor4( GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> colMajor4(
const detail::tmat4x4<T, P>& m) const detail::tmat4x4<T, P>& m)
{ {

@ -52,57 +52,57 @@ namespace glm
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename valType> template <typename T, precision P>
detail::tmat2x2<valType> diagonal2x2( detail::tmat2x2<T, P> diagonal2x2(
detail::tvec2<valType> const & v); detail::tvec2<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename valType> template <typename T, precision P>
detail::tmat2x3<valType> diagonal2x3( detail::tmat2x3<T, P> diagonal2x3(
detail::tvec2<valType> const & v); detail::tvec2<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename valType> template <typename T, precision P>
detail::tmat2x4<valType> diagonal2x4( detail::tmat2x4<T, P> diagonal2x4(
detail::tvec2<valType> const & v); detail::tvec2<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename valType> template <typename T, precision P>
detail::tmat3x2<valType> diagonal3x2( detail::tmat3x2<T, P> diagonal3x2(
detail::tvec2<valType> const & v); detail::tvec2<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename valType> template <typename T, precision P>
detail::tmat3x3<valType> diagonal3x3( detail::tmat3x3<T, P> diagonal3x3(
detail::tvec3<valType> const & v); detail::tvec3<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename valType> template <typename T, precision P>
detail::tmat3x4<valType> diagonal3x4( detail::tmat3x4<T, P> diagonal3x4(
detail::tvec3<valType> const & v); detail::tvec3<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename valType> template <typename T, precision P>
detail::tmat4x2<valType> diagonal4x2( detail::tmat4x2<T, P> diagonal4x2(
detail::tvec2<valType> const & v); detail::tvec2<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename valType> template <typename T, precision P>
detail::tmat4x3<valType> diagonal4x3( detail::tmat4x3<T, P> diagonal4x3(
detail::tvec3<valType> const & v); detail::tvec3<T, P> const & v);
//! Build a diagonal matrix. //! Build a diagonal matrix.
//! From GLM_GTX_matrix_operation extension. //! From GLM_GTX_matrix_operation extension.
template <typename valType> template <typename T, precision P>
detail::tmat4x4<valType> diagonal4x4( detail::tmat4x4<T, P> diagonal4x4(
detail::tvec4<valType> const & v); detail::tvec4<T, P> const & v);
/// @} /// @}
}//namespace glm }//namespace glm

@ -9,87 +9,87 @@
namespace glm namespace glm
{ {
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat2x2<valType> diagonal2x2 GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> diagonal2x2
( (
detail::tvec2<valType> const & v detail::tvec2<T, P> const & v
) )
{ {
detail::tmat2x2<valType> Result(valType(1)); detail::tmat2x2<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
return Result; return Result;
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat2x3<valType> diagonal2x3 GLM_FUNC_QUALIFIER detail::tmat2x3<T, P> diagonal2x3
( (
detail::tvec2<valType> const & v detail::tvec2<T, P> const & v
) )
{ {
detail::tmat2x3<valType> Result(valType(1)); detail::tmat2x3<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
return Result; return Result;
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat2x4<valType> diagonal2x4 GLM_FUNC_QUALIFIER detail::tmat2x4<T, P> diagonal2x4
( (
detail::tvec2<valType> const & v detail::tvec2<T, P> const & v
) )
{ {
detail::tmat2x4<valType> Result(valType(1)); detail::tmat2x4<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
return Result; return Result;
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x2<valType> diagonal3x2 GLM_FUNC_QUALIFIER detail::tmat3x2<T, P> diagonal3x2
( (
detail::tvec2<valType> const & v detail::tvec2<T, P> const & v
) )
{ {
detail::tmat3x2<valType> Result(valType(1)); detail::tmat3x2<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
return Result; return Result;
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<valType> diagonal3x3 GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> diagonal3x3
( (
detail::tvec3<valType> const & v detail::tvec3<T, P> const & v
) )
{ {
detail::tmat3x3<valType> Result(valType(1)); detail::tmat3x3<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
Result[2][2] = v[2]; Result[2][2] = v[2];
return Result; return Result;
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x4<valType> diagonal3x4 GLM_FUNC_QUALIFIER detail::tmat3x4<T, P> diagonal3x4
( (
detail::tvec3<valType> const & v detail::tvec3<T, P> const & v
) )
{ {
detail::tmat3x4<valType> Result(valType(1)); detail::tmat3x4<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
Result[2][2] = v[2]; Result[2][2] = v[2];
return Result; return Result;
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> diagonal4x4 GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> diagonal4x4
( (
detail::tvec4<valType> const & v detail::tvec4<T, P> const & v
) )
{ {
detail::tmat4x4<valType> Result(valType(1)); detail::tmat4x4<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
Result[2][2] = v[2]; Result[2][2] = v[2];
@ -97,26 +97,26 @@ namespace glm
return Result; return Result;
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x3<valType> diagonal4x3 GLM_FUNC_QUALIFIER detail::tmat4x3<T, P> diagonal4x3
( (
detail::tvec3<valType> const & v detail::tvec3<T, P> const & v
) )
{ {
detail::tmat4x3<valType> Result(valType(1)); detail::tmat4x3<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
Result[2][2] = v[2]; Result[2][2] = v[2];
return Result; return Result;
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x2<valType> diagonal4x2 GLM_FUNC_QUALIFIER detail::tmat4x2<T, P> diagonal4x2
( (
detail::tvec2<valType> const & v detail::tvec2<T, P> const & v
) )
{ {
detail::tmat4x2<valType> Result(valType(1)); detail::tmat4x2<T, P> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
return Result; return Result;

@ -53,9 +53,9 @@ namespace glm
/// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension)
template <typename valType> template <typename valType>
valType mixedProduct( valType mixedProduct(
detail::tvec3<valType> const & v1, detail::tvec3<T, P> const & v1,
detail::tvec3<valType> const & v2, detail::tvec3<T, P> const & v2,
detail::tvec3<valType> const & v3); detail::tvec3<T, P> const & v3);
/// @} /// @}
}// namespace glm }// namespace glm

@ -12,9 +12,9 @@ namespace glm
template <typename valType> template <typename valType>
GLM_FUNC_QUALIFIER valType mixedProduct GLM_FUNC_QUALIFIER valType mixedProduct
( (
detail::tvec3<valType> const & v1, detail::tvec3<T, P> const & v1,
detail::tvec3<valType> const & v2, detail::tvec3<T, P> const & v2,
detail::tvec3<valType> const & v3 detail::tvec3<T, P> const & v3
) )
{ {
return dot(cross(v1, v2), v3); return dot(cross(v1, v2), v3);

@ -22,11 +22,11 @@ namespace glm
glm::dot(y, y)); glm::dot(y, y));
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER valType normalizeDot GLM_FUNC_QUALIFIER T normalizeDot
( (
detail::tvec2<valType> const & x, detail::tvec2<T, P> const & x,
detail::tvec2<valType> const & y detail::tvec2<T, P> const & y
) )
{ {
return return
@ -35,11 +35,11 @@ namespace glm
glm::dot(y, y)); glm::dot(y, y));
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER valType normalizeDot GLM_FUNC_QUALIFIER T normalizeDot
( (
detail::tvec3<valType> const & x, detail::tvec3<T, P> const & x,
detail::tvec3<valType> const & y detail::tvec3<T, P> const & y
) )
{ {
return return
@ -48,11 +48,11 @@ namespace glm
glm::dot(y, y)); glm::dot(y, y));
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER valType normalizeDot GLM_FUNC_QUALIFIER T normalizeDot
( (
detail::tvec4<valType> const & x, detail::tvec4<T, P> const & x,
detail::tvec4<valType> const & y detail::tvec4<T, P> const & y
) )
{ {
return return
@ -74,11 +74,11 @@ namespace glm
glm::dot(y, y)); glm::dot(y, y));
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER valType fastNormalizeDot GLM_FUNC_QUALIFIER T fastNormalizeDot
( (
detail::tvec2<valType> const & x, detail::tvec2<T, P> const & x,
detail::tvec2<valType> const & y detail::tvec2<T, P> const & y
) )
{ {
return return
@ -87,11 +87,11 @@ namespace glm
glm::dot(y, y)); glm::dot(y, y));
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER valType fastNormalizeDot GLM_FUNC_QUALIFIER T fastNormalizeDot
( (
detail::tvec3<valType> const & x, detail::tvec3<T, P> const & x,
detail::tvec3<valType> const & y detail::tvec3<T, P> const & y
) )
{ {
return return
@ -100,11 +100,11 @@ namespace glm
glm::dot(y, y)); glm::dot(y, y));
} }
template <typename valType> template <typename T, precision P>
GLM_FUNC_QUALIFIER valType fastNormalizeDot GLM_FUNC_QUALIFIER T fastNormalizeDot
( (
detail::tvec4<valType> const & x, detail::tvec4<T, P> const & x,
detail::tvec4<valType> const & y detail::tvec4<T, P> const & y
) )
{ {
return return

@ -53,14 +53,14 @@ namespace glm
/// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.
/// ///
/// @see gtx_polar_coordinates /// @see gtx_polar_coordinates
template <typename T> template <typename T, precision P>
detail::tvec3<T, P> polar( detail::tvec3<T, P> polar(
detail::tvec3<T, P> const & euclidean); detail::tvec3<T, P> const & euclidean);
/// Convert Polar to Euclidean coordinates. /// Convert Polar to Euclidean coordinates.
/// ///
/// @see gtx_polar_coordinates /// @see gtx_polar_coordinates
template <typename T> template <typename T, precision P>
detail::tvec3<T, P> euclidean( detail::tvec3<T, P> euclidean(
detail::tvec2<T, P> const & polar); detail::tvec2<T, P> const & polar);

@ -9,7 +9,7 @@
namespace glm namespace glm
{ {
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> polar GLM_FUNC_QUALIFIER detail::tvec3<T, P> polar
( (
detail::tvec3<T, P> const & euclidean detail::tvec3<T, P> const & euclidean
@ -32,7 +32,7 @@ namespace glm
#endif #endif
} }
template <typename T> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> euclidean GLM_FUNC_QUALIFIER detail::tvec3<T, P> euclidean
( (
detail::tvec2<T, P> const & polar detail::tvec2<T, P> const & polar

@ -54,7 +54,7 @@ namespace glm
/// @see gtx_vector_access extension. /// @see gtx_vector_access extension.
template <typename valType> template <typename valType>
void set( void set(
detail::tvec2<valType> & v, detail::tvec2<T, P> & v,
valType const & x, valType const & x,
valType const & y); valType const & y);
@ -62,7 +62,7 @@ namespace glm
/// @see gtx_vector_access extension. /// @see gtx_vector_access extension.
template <typename valType> template <typename valType>
void set( void set(
detail::tvec3<valType> & v, detail::tvec3<T, P> & v,
valType const & x, valType const & x,
valType const & y, valType const & y,
valType const & z); valType const & z);
@ -71,7 +71,7 @@ namespace glm
/// @see gtx_vector_access extension. /// @see gtx_vector_access extension.
template <typename valType> template <typename valType>
void set( void set(
detail::tvec4<valType> & v, detail::tvec4<T, P> & v,
valType const & x, valType const & x,
valType const & y, valType const & y,
valType const & z, valType const & z,

@ -12,7 +12,7 @@ namespace glm
template <typename valType> template <typename valType>
GLM_FUNC_QUALIFIER void set GLM_FUNC_QUALIFIER void set
( (
detail::tvec2<valType>& v, detail::tvec2<T, P>& v,
valType const & x, valType const & x,
valType const & y valType const & y
) )
@ -24,7 +24,7 @@ namespace glm
template <typename valType> template <typename valType>
GLM_FUNC_QUALIFIER void set GLM_FUNC_QUALIFIER void set
( (
detail::tvec3<valType>& v, detail::tvec3<T, P>& v,
valType const & x, valType const & x,
valType const & y, valType const & y,
valType const & z valType const & z
@ -38,7 +38,7 @@ namespace glm
template <typename valType> template <typename valType>
GLM_FUNC_QUALIFIER void set GLM_FUNC_QUALIFIER void set
( (
detail::tvec4<valType>& v, detail::tvec4<T, P>& v,
valType const & x, valType const & x,
valType const & y, valType const & y,
valType const & z, valType const & z,

@ -7,11 +7,9 @@
// File : test/gtx/associated_min_max.cpp // File : test/gtx/associated_min_max.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/fast_exponential.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/fast_square_root.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/fast_square_root.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/fast_trigonometry.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/fast_trigonometry.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/handed_coordinate_space.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/handed_coordinate_space.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/inertia.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/inertia.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/intersect.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/intersect.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/log_base.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/log_base.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/matrix_cross_product.hpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/matrix_cross_product.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/matrix_major_storage.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/matrix_major_storage.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/matrix_operation.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/matrix_operation.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/norm.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/norm.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/normal.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/normal.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/normalize_dot.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/normalize_dot.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/number_precision.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/number_precision.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/optimum_pow.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/optimum_pow.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/orthonormalize.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/orthonormalize.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/perpendicular.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/perpendicular.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/polar_coordinates.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/polar_coordinates.hpp>
int main() int main()
{ {

@ -4,14 +4,12 @@
// Created : 2013-10-25 // Created : 2013-10-25
// Updated : 2013-10-25 // Updated : 2013-10-25
// Licence : This source is under MIT licence // Licence : This source is under MIT licence
// File : test/gtx/associated_min_max.cpp // File : test/gtx/projection.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <emmintrin.h>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtc/type_precision.hpp> #include <glm/gtc/type_precision.hpp>
#include <glm/gtx/associated_min_max.hpp> #include <glm/gtx/projection.hpp>
int main() int main()
{ {

@ -12,7 +12,7 @@
int test_areCollinear() int test_areCollinear()
{ {
int Error(0); int Error(0);
{ {
bool TestA = glm::areCollinear(glm::vec2(-1), glm::vec2(1), 0.00001f); bool TestA = glm::areCollinear(glm::vec2(-1), glm::vec2(1), 0.00001f);
@ -29,47 +29,47 @@ int test_areCollinear()
Error += TestA ? 0 : 1; Error += TestA ? 0 : 1;
} }
return Error; return Error;
} }
int test_areOrthogonal() int test_areOrthogonal()
{ {
int Error(0); int Error(0);
bool TestA = glm::areOrthogonal(glm::vec2(1, 0), glm::vec2(0, 1), 0.00001f); 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 test_isNormalized()
{ {
int Error(0); int Error(0);
bool TestA = glm::isNormalized(glm::vec4(1, 0, 0, 0), 0.00001f); 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 test_isNull()
{ {
int Error(0); int Error(0);
bool TestA = glm::isNull(glm::vec4(0), 0.00001f); 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 test_areOrthonormal()
{ {
int Error(0); int Error(0);
bool TestA = glm::areOrthonormal(glm::vec2(1, 0), glm::vec2(0, 1), 0.00001f); 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() int main()

Loading…
Cancel
Save