mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Added test files and fixed build errors for experimental extensions.
This commit is contained in:
parent
2e72af3f6d
commit
fbb54649b7
@ -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<valType> temp = (valType(1) - c) * axis;
|
||||
// detail::tvec3<T, P> temp = (valType(1) - c) * axis;
|
||||
__m128 Temp0 = _mm_sub_ps(one, CosA);
|
||||
__m128 Temp1 = _mm_mul_ps(Temp0, AxisC);
|
||||
|
||||
|
@ -28,10 +28,10 @@
|
||||
//
|
||||
//// lessThan
|
||||
//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<valType> const & y
|
||||
// detail::tvec2<T, P> const & x,
|
||||
// detail::tvec2<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -43,10 +43,10 @@
|
||||
//}
|
||||
//
|
||||
//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<valType> const & y
|
||||
// detail::tvec3<T, P> const & x,
|
||||
// detail::tvec3<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -58,10 +58,10 @@
|
||||
//}
|
||||
//
|
||||
//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<valType> const & y
|
||||
// detail::tvec4<T, P> const & x,
|
||||
// detail::tvec4<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -74,10 +74,10 @@
|
||||
//
|
||||
//// lessThanEqual
|
||||
//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<valType> const & y
|
||||
// detail::tvec2<T, P> const & x,
|
||||
// detail::tvec2<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -89,10 +89,10 @@
|
||||
//}
|
||||
//
|
||||
//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<valType> const & y
|
||||
// detail::tvec3<T, P> const & x,
|
||||
// detail::tvec3<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -104,10 +104,10 @@
|
||||
//}
|
||||
//
|
||||
//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<valType> const & y
|
||||
// detail::tvec4<T, P> const & x,
|
||||
// detail::tvec4<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -120,10 +120,10 @@
|
||||
//
|
||||
//// greaterThan
|
||||
//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<valType> const & y
|
||||
// detail::tvec2<T, P> const & x,
|
||||
// detail::tvec2<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -135,10 +135,10 @@
|
||||
//}
|
||||
//
|
||||
//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<valType> const & y
|
||||
// detail::tvec3<T, P> const & x,
|
||||
// detail::tvec3<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -150,10 +150,10 @@
|
||||
//}
|
||||
//
|
||||
//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<valType> const & y
|
||||
// detail::tvec4<T, P> const & x,
|
||||
// detail::tvec4<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -166,10 +166,10 @@
|
||||
//
|
||||
//// greaterThanEqual
|
||||
//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<valType> const & y
|
||||
// detail::tvec2<T, P> const & x,
|
||||
// detail::tvec2<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -181,10 +181,10 @@
|
||||
//}
|
||||
//
|
||||
//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<valType> const & y
|
||||
// detail::tvec3<T, P> const & x,
|
||||
// detail::tvec3<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -196,10 +196,10 @@
|
||||
//}
|
||||
//
|
||||
//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<valType> const & y
|
||||
// detail::tvec4<T, P> const & x,
|
||||
// detail::tvec4<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -212,10 +212,10 @@
|
||||
//
|
||||
//// equal
|
||||
//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<valType> const & y
|
||||
// detail::tvec2<T, P> const & x,
|
||||
// detail::tvec2<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -224,14 +224,14 @@
|
||||
// detail::type<valType>::is_uint ||
|
||||
// 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>
|
||||
//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<valType> const & y
|
||||
// detail::tvec3<T, P> const & x,
|
||||
// detail::tvec3<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -240,14 +240,14 @@
|
||||
// detail::type<valType>::is_uint ||
|
||||
// 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>
|
||||
//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<valType> const & y
|
||||
// detail::tvec4<T, P> const & x,
|
||||
// detail::tvec4<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -256,15 +256,15 @@
|
||||
// detail::type<valType>::is_uint ||
|
||||
// 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
|
||||
//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<valType> const & y
|
||||
// detail::tvec2<T, P> const & x,
|
||||
// detail::tvec2<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -273,14 +273,14 @@
|
||||
// detail::type<valType>::is_uint ||
|
||||
// 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>
|
||||
//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<valType> const & y
|
||||
// detail::tvec3<T, P> const & x,
|
||||
// detail::tvec3<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -289,14 +289,14 @@
|
||||
// detail::type<valType>::is_uint ||
|
||||
// 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>
|
||||
//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<valType> const & y
|
||||
// detail::tvec4<T, P> const & x,
|
||||
// detail::tvec4<T, P> const & y
|
||||
//)
|
||||
//{
|
||||
// GLM_STATIC_ASSERT(
|
||||
@ -305,7 +305,7 @@
|
||||
// detail::type<valType>::is_uint ||
|
||||
// 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
|
||||
|
@ -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 <typename T>
|
||||
template <typename T, precision P>
|
||||
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 & b);
|
||||
|
||||
|
@ -12,22 +12,22 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<valType> closestPointOnLine
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<T, P> closestPointOnLine
|
||||
(
|
||||
detail::tvec3<valType> const & point,
|
||||
detail::tvec3<valType> const & a,
|
||||
detail::tvec3<valType> const & b
|
||||
detail::tvec3<T, P> const & point,
|
||||
detail::tvec3<T, P> const & a,
|
||||
detail::tvec3<T, P> const & b
|
||||
)
|
||||
{
|
||||
valType LineLength = distance(a, b);
|
||||
detail::tvec3<valType> Vector = point - a;
|
||||
detail::tvec3<valType> LineDirection = (b - a) / LineLength;
|
||||
T LineLength = distance(a, b);
|
||||
detail::tvec3<T, P> Vector = point - a;
|
||||
detail::tvec3<T, P> 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;
|
||||
}
|
||||
|
@ -52,18 +52,18 @@ namespace glm
|
||||
|
||||
//! Return if a trihedron right handed or not.
|
||||
//! From GLM_GTX_handed_coordinate_space extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
bool rightHanded(
|
||||
detail::tvec3<T, P> const & tangent,
|
||||
detail::tvec3<T, P> const & binormal,
|
||||
detail::tvec3<T, P> const & tangent,
|
||||
detail::tvec3<T, P> const & binormal,
|
||||
detail::tvec3<T, P> const & normal);
|
||||
|
||||
//! Return if a trihedron left handed or not.
|
||||
//! From GLM_GTX_handed_coordinate_space extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
bool leftHanded(
|
||||
detail::tvec3<T, P> const & tangent,
|
||||
detail::tvec3<T, P> const & binormal,
|
||||
detail::tvec3<T, P> const & tangent,
|
||||
detail::tvec3<T, P> const & binormal,
|
||||
detail::tvec3<T, P> const & normal);
|
||||
|
||||
/// @}
|
||||
|
@ -9,10 +9,10 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
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 & normal
|
||||
)
|
||||
@ -20,11 +20,11 @@ namespace glm
|
||||
return dot(cross(normal, tangent), binormal) > T(0);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool leftHanded
|
||||
(
|
||||
detail::tvec3<T, P> const & tangent,
|
||||
detail::tvec3<T, P> const & binormal,
|
||||
detail::tvec3<T, P> const & tangent,
|
||||
detail::tvec3<T, P> const & binormal,
|
||||
detail::tvec3<T, P> const & normal
|
||||
)
|
||||
{
|
||||
|
@ -48,65 +48,66 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
/*
|
||||
/// @addtogroup gtx_inertia
|
||||
/// @{
|
||||
|
||||
//! Build an inertia matrix for a box.
|
||||
//! From GLM_GTX_inertia extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> boxInertia3(
|
||||
T const & Mass,
|
||||
detail::tvec3<T, P> const & Scale);
|
||||
|
||||
//! Build an inertia matrix for a box.
|
||||
//! From GLM_GTX_inertia extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> boxInertia4(
|
||||
T const & Mass,
|
||||
detail::tvec3<T, P> const & Scale);
|
||||
|
||||
//! Build an inertia matrix for a disk.
|
||||
//! From GLM_GTX_inertia extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> diskInertia3(
|
||||
T const & Mass,
|
||||
T const & Radius);
|
||||
|
||||
//! Build an inertia matrix for a disk.
|
||||
//! From GLM_GTX_inertia extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> diskInertia4(
|
||||
T const & Mass,
|
||||
T const & Radius);
|
||||
|
||||
//! Build an inertia matrix for a ball.
|
||||
//! From GLM_GTX_inertia extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> ballInertia3(
|
||||
T const & Mass,
|
||||
T const & Radius);
|
||||
|
||||
//! Build an inertia matrix for a ball.
|
||||
//! From GLM_GTX_inertia extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> ballInertia4(
|
||||
T const & Mass,
|
||||
T const & Radius);
|
||||
|
||||
//! Build an inertia matrix for a sphere.
|
||||
//! From GLM_GTX_inertia extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> sphereInertia3(
|
||||
T const & Mass,
|
||||
T const & Radius);
|
||||
|
||||
//! Build an inertia matrix for a sphere.
|
||||
//! From GLM_GTX_inertia extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> sphereInertia4(
|
||||
T const & Mass,
|
||||
T const & Radius);
|
||||
|
||||
*/
|
||||
/// @}
|
||||
}// namespace glm
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
/*
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> boxInertia3
|
||||
(
|
||||
@ -111,4 +112,5 @@ namespace glm
|
||||
Result[3][3] = static_cast<T>(1);
|
||||
return Result;
|
||||
}
|
||||
*/
|
||||
}//namespace glm
|
||||
|
@ -53,13 +53,13 @@ namespace glm
|
||||
|
||||
//! Build a cross product matrix.
|
||||
//! From GLM_GTX_matrix_cross_product extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> matrixCross3(
|
||||
detail::tvec3<T, P> const & x);
|
||||
|
||||
//! Build a cross product matrix.
|
||||
//! From GLM_GTX_matrix_cross_product extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> matrixCross4(
|
||||
detail::tvec3<T, P> const & x);
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> matrixCross3
|
||||
(
|
||||
detail::tvec3<T, P> const & x
|
||||
@ -25,7 +25,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> matrixCross4
|
||||
(
|
||||
detail::tvec3<T, P> const & x
|
||||
|
@ -53,20 +53,20 @@ namespace glm
|
||||
|
||||
//! Build a row major matrix from row vectors.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat2x2<T, P> rowMajor2(
|
||||
detail::tvec2<T, P> const & v1,
|
||||
detail::tvec2<T, P> const & v2);
|
||||
|
||||
//! Build a row major matrix from other matrix.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat2x2<T, P> rowMajor2(
|
||||
detail::tmat2x2<T, P> const & m);
|
||||
|
||||
//! Build a row major matrix from row vectors.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> rowMajor3(
|
||||
detail::tvec3<T, P> const & v1,
|
||||
detail::tvec3<T, P> const & v2,
|
||||
@ -74,13 +74,13 @@ namespace glm
|
||||
|
||||
//! Build a row major matrix from other matrix.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> rowMajor3(
|
||||
detail::tmat3x3<T, P> const & m);
|
||||
|
||||
//! Build a row major matrix from row vectors.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> rowMajor4(
|
||||
detail::tvec4<T, P> const & v1,
|
||||
detail::tvec4<T, P> const & v2,
|
||||
@ -89,26 +89,26 @@ namespace glm
|
||||
|
||||
//! Build a row major matrix from other matrix.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> rowMajor4(
|
||||
detail::tmat4x4<T, P> const & m);
|
||||
|
||||
//! Build a column major matrix from column vectors.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat2x2<T, P> colMajor2(
|
||||
detail::tvec2<T, P> const & v1,
|
||||
detail::tvec2<T, P> const & v2);
|
||||
|
||||
//! Build a column major matrix from other matrix.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat2x2<T, P> colMajor2(
|
||||
detail::tmat2x2<T, P> const & m);
|
||||
|
||||
//! Build a column major matrix from column vectors.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> colMajor3(
|
||||
detail::tvec3<T, P> const & v1,
|
||||
detail::tvec3<T, P> const & v2,
|
||||
@ -116,13 +116,13 @@ namespace glm
|
||||
|
||||
//! Build a column major matrix from other matrix.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> colMajor3(
|
||||
detail::tmat3x3<T, P> const & m);
|
||||
|
||||
//! Build a column major matrix from column vectors.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> colMajor4(
|
||||
detail::tvec4<T, P> const & v1,
|
||||
detail::tvec4<T, P> const & v2,
|
||||
@ -131,7 +131,7 @@ namespace glm
|
||||
|
||||
//! Build a column major matrix from other matrix.
|
||||
//! From GLM_GTX_matrix_major_storage extension.
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> colMajor4(
|
||||
detail::tmat4x4<T, P> const & m);
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> rowMajor2
|
||||
(
|
||||
detail::tvec2<T, P> const & v1,
|
||||
@ -24,7 +24,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> rowMajor2(
|
||||
const detail::tmat2x2<T, P>& m)
|
||||
{
|
||||
@ -36,7 +36,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> rowMajor3(
|
||||
const detail::tvec3<T, P>& v1,
|
||||
const detail::tvec3<T, P>& v2,
|
||||
@ -55,7 +55,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> rowMajor3(
|
||||
const detail::tmat3x3<T, P>& m)
|
||||
{
|
||||
@ -72,7 +72,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rowMajor4(
|
||||
const detail::tvec4<T, P>& v1,
|
||||
const detail::tvec4<T, P>& v2,
|
||||
@ -99,7 +99,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rowMajor4(
|
||||
const detail::tmat4x4<T, P>& m)
|
||||
{
|
||||
@ -123,7 +123,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> colMajor2(
|
||||
const detail::tvec2<T, P>& v1,
|
||||
const detail::tvec2<T, P>& v2)
|
||||
@ -131,14 +131,14 @@ namespace glm
|
||||
return detail::tmat2x2<T, P>(v1, v2);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat2x2<T, P> colMajor2(
|
||||
const 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(
|
||||
const detail::tvec3<T, P>& v1,
|
||||
const detail::tvec3<T, P>& v2,
|
||||
@ -147,14 +147,14 @@ namespace glm
|
||||
return detail::tmat3x3<T, P>(v1, v2, v3);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> colMajor3(
|
||||
const 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(
|
||||
const detail::tvec4<T, P>& v1,
|
||||
const detail::tvec4<T, P>& v2,
|
||||
@ -164,7 +164,7 @@ namespace glm
|
||||
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(
|
||||
const detail::tmat4x4<T, P>& m)
|
||||
{
|
||||
|
@ -52,57 +52,57 @@ namespace glm
|
||||
|
||||
//! Build a diagonal matrix.
|
||||
//! From GLM_GTX_matrix_operation extension.
|
||||
template <typename valType>
|
||||
detail::tmat2x2<valType> diagonal2x2(
|
||||
detail::tvec2<valType> const & v);
|
||||
template <typename T, precision P>
|
||||
detail::tmat2x2<T, P> diagonal2x2(
|
||||
detail::tvec2<T, P> const & v);
|
||||
|
||||
//! Build a diagonal matrix.
|
||||
//! From GLM_GTX_matrix_operation extension.
|
||||
template <typename valType>
|
||||
detail::tmat2x3<valType> diagonal2x3(
|
||||
detail::tvec2<valType> const & v);
|
||||
template <typename T, precision P>
|
||||
detail::tmat2x3<T, P> diagonal2x3(
|
||||
detail::tvec2<T, P> const & v);
|
||||
|
||||
//! Build a diagonal matrix.
|
||||
//! From GLM_GTX_matrix_operation extension.
|
||||
template <typename valType>
|
||||
detail::tmat2x4<valType> diagonal2x4(
|
||||
detail::tvec2<valType> const & v);
|
||||
template <typename T, precision P>
|
||||
detail::tmat2x4<T, P> diagonal2x4(
|
||||
detail::tvec2<T, P> const & v);
|
||||
|
||||
//! Build a diagonal matrix.
|
||||
//! From GLM_GTX_matrix_operation extension.
|
||||
template <typename valType>
|
||||
detail::tmat3x2<valType> diagonal3x2(
|
||||
detail::tvec2<valType> const & v);
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x2<T, P> diagonal3x2(
|
||||
detail::tvec2<T, P> const & v);
|
||||
|
||||
//! Build a diagonal matrix.
|
||||
//! From GLM_GTX_matrix_operation extension.
|
||||
template <typename valType>
|
||||
detail::tmat3x3<valType> diagonal3x3(
|
||||
detail::tvec3<valType> const & v);
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x3<T, P> diagonal3x3(
|
||||
detail::tvec3<T, P> const & v);
|
||||
|
||||
//! Build a diagonal matrix.
|
||||
//! From GLM_GTX_matrix_operation extension.
|
||||
template <typename valType>
|
||||
detail::tmat3x4<valType> diagonal3x4(
|
||||
detail::tvec3<valType> const & v);
|
||||
template <typename T, precision P>
|
||||
detail::tmat3x4<T, P> diagonal3x4(
|
||||
detail::tvec3<T, P> const & v);
|
||||
|
||||
//! Build a diagonal matrix.
|
||||
//! From GLM_GTX_matrix_operation extension.
|
||||
template <typename valType>
|
||||
detail::tmat4x2<valType> diagonal4x2(
|
||||
detail::tvec2<valType> const & v);
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x2<T, P> diagonal4x2(
|
||||
detail::tvec2<T, P> const & v);
|
||||
|
||||
//! Build a diagonal matrix.
|
||||
//! From GLM_GTX_matrix_operation extension.
|
||||
template <typename valType>
|
||||
detail::tmat4x3<valType> diagonal4x3(
|
||||
detail::tvec3<valType> const & v);
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x3<T, P> diagonal4x3(
|
||||
detail::tvec3<T, P> const & v);
|
||||
|
||||
//! Build a diagonal matrix.
|
||||
//! From GLM_GTX_matrix_operation extension.
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> diagonal4x4(
|
||||
detail::tvec4<valType> const & v);
|
||||
template <typename T, precision P>
|
||||
detail::tmat4x4<T, P> diagonal4x4(
|
||||
detail::tvec4<T, P> const & v);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
@ -9,87 +9,87 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat2x2<valType> diagonal2x2
|
||||
template <typename T, precision P>
|
||||
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[1][1] = v[1];
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat2x3<valType> diagonal2x3
|
||||
template <typename T, precision P>
|
||||
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[1][1] = v[1];
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat2x4<valType> diagonal2x4
|
||||
template <typename T, precision P>
|
||||
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[1][1] = v[1];
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x2<valType> diagonal3x2
|
||||
template <typename T, precision P>
|
||||
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[1][1] = v[1];
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x3<valType> diagonal3x3
|
||||
template <typename T, precision P>
|
||||
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[1][1] = v[1];
|
||||
Result[2][2] = v[2];
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat3x4<valType> diagonal3x4
|
||||
template <typename T, precision P>
|
||||
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[1][1] = v[1];
|
||||
Result[2][2] = v[2];
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> diagonal4x4
|
||||
template <typename T, precision P>
|
||||
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[1][1] = v[1];
|
||||
Result[2][2] = v[2];
|
||||
@ -97,26 +97,26 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x3<valType> diagonal4x3
|
||||
template <typename T, precision P>
|
||||
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[1][1] = v[1];
|
||||
Result[2][2] = v[2];
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x2<valType> diagonal4x2
|
||||
template <typename T, precision P>
|
||||
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[1][1] = v[1];
|
||||
return Result;
|
||||
|
@ -53,9 +53,9 @@ namespace glm
|
||||
/// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension)
|
||||
template <typename valType>
|
||||
valType mixedProduct(
|
||||
detail::tvec3<valType> const & v1,
|
||||
detail::tvec3<valType> const & v2,
|
||||
detail::tvec3<valType> const & v3);
|
||||
detail::tvec3<T, P> const & v1,
|
||||
detail::tvec3<T, P> const & v2,
|
||||
detail::tvec3<T, P> const & v3);
|
||||
|
||||
/// @}
|
||||
}// namespace glm
|
||||
|
@ -12,9 +12,9 @@ namespace glm
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER valType mixedProduct
|
||||
(
|
||||
detail::tvec3<valType> const & v1,
|
||||
detail::tvec3<valType> const & v2,
|
||||
detail::tvec3<valType> const & v3
|
||||
detail::tvec3<T, P> const & v1,
|
||||
detail::tvec3<T, P> const & v2,
|
||||
detail::tvec3<T, P> const & v3
|
||||
)
|
||||
{
|
||||
return dot(cross(v1, v2), v3);
|
||||
|
@ -22,11 +22,11 @@ namespace glm
|
||||
glm::dot(y, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER valType normalizeDot
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T normalizeDot
|
||||
(
|
||||
detail::tvec2<valType> const & x,
|
||||
detail::tvec2<valType> const & y
|
||||
detail::tvec2<T, P> const & x,
|
||||
detail::tvec2<T, P> const & y
|
||||
)
|
||||
{
|
||||
return
|
||||
@ -35,11 +35,11 @@ namespace glm
|
||||
glm::dot(y, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER valType normalizeDot
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T normalizeDot
|
||||
(
|
||||
detail::tvec3<valType> const & x,
|
||||
detail::tvec3<valType> const & y
|
||||
detail::tvec3<T, P> const & x,
|
||||
detail::tvec3<T, P> const & y
|
||||
)
|
||||
{
|
||||
return
|
||||
@ -48,11 +48,11 @@ namespace glm
|
||||
glm::dot(y, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER valType normalizeDot
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T normalizeDot
|
||||
(
|
||||
detail::tvec4<valType> const & x,
|
||||
detail::tvec4<valType> const & y
|
||||
detail::tvec4<T, P> const & x,
|
||||
detail::tvec4<T, P> const & y
|
||||
)
|
||||
{
|
||||
return
|
||||
@ -74,11 +74,11 @@ namespace glm
|
||||
glm::dot(y, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER valType fastNormalizeDot
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T fastNormalizeDot
|
||||
(
|
||||
detail::tvec2<valType> const & x,
|
||||
detail::tvec2<valType> const & y
|
||||
detail::tvec2<T, P> const & x,
|
||||
detail::tvec2<T, P> const & y
|
||||
)
|
||||
{
|
||||
return
|
||||
@ -87,11 +87,11 @@ namespace glm
|
||||
glm::dot(y, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER valType fastNormalizeDot
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T fastNormalizeDot
|
||||
(
|
||||
detail::tvec3<valType> const & x,
|
||||
detail::tvec3<valType> const & y
|
||||
detail::tvec3<T, P> const & x,
|
||||
detail::tvec3<T, P> const & y
|
||||
)
|
||||
{
|
||||
return
|
||||
@ -100,11 +100,11 @@ namespace glm
|
||||
glm::dot(y, y));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER valType fastNormalizeDot
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T fastNormalizeDot
|
||||
(
|
||||
detail::tvec4<valType> const & x,
|
||||
detail::tvec4<valType> const & y
|
||||
detail::tvec4<T, P> const & x,
|
||||
detail::tvec4<T, P> const & y
|
||||
)
|
||||
{
|
||||
return
|
||||
|
@ -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 <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tvec3<T, P> polar(
|
||||
detail::tvec3<T, P> const & euclidean);
|
||||
|
||||
/// Convert Polar to Euclidean coordinates.
|
||||
///
|
||||
/// @see gtx_polar_coordinates
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
detail::tvec3<T, P> euclidean(
|
||||
detail::tvec2<T, P> const & polar);
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<T, P> polar
|
||||
(
|
||||
detail::tvec3<T, P> const & euclidean
|
||||
@ -32,7 +32,7 @@ namespace glm
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<T, P> euclidean
|
||||
(
|
||||
detail::tvec2<T, P> const & polar
|
||||
|
@ -54,7 +54,7 @@ namespace glm
|
||||
/// @see gtx_vector_access extension.
|
||||
template <typename valType>
|
||||
void set(
|
||||
detail::tvec2<valType> & v,
|
||||
detail::tvec2<T, P> & v,
|
||||
valType const & x,
|
||||
valType const & y);
|
||||
|
||||
@ -62,7 +62,7 @@ namespace glm
|
||||
/// @see gtx_vector_access extension.
|
||||
template <typename valType>
|
||||
void set(
|
||||
detail::tvec3<valType> & v,
|
||||
detail::tvec3<T, P> & v,
|
||||
valType const & x,
|
||||
valType const & y,
|
||||
valType const & z);
|
||||
@ -71,7 +71,7 @@ namespace glm
|
||||
/// @see gtx_vector_access extension.
|
||||
template <typename valType>
|
||||
void set(
|
||||
detail::tvec4<valType> & v,
|
||||
detail::tvec4<T, P> & v,
|
||||
valType const & x,
|
||||
valType const & y,
|
||||
valType const & z,
|
||||
|
@ -12,7 +12,7 @@ namespace glm
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER void set
|
||||
(
|
||||
detail::tvec2<valType>& v,
|
||||
detail::tvec2<T, P>& v,
|
||||
valType const & x,
|
||||
valType const & y
|
||||
)
|
||||
@ -24,7 +24,7 @@ namespace glm
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER void set
|
||||
(
|
||||
detail::tvec3<valType>& v,
|
||||
detail::tvec3<T, P>& v,
|
||||
valType const & x,
|
||||
valType const & y,
|
||||
valType const & z
|
||||
@ -38,7 +38,7 @@ namespace glm
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER void set
|
||||
(
|
||||
detail::tvec4<valType>& v,
|
||||
detail::tvec4<T, P>& v,
|
||||
valType const & x,
|
||||
valType const & y,
|
||||
valType const & z,
|
||||
|
@ -7,11 +7,9 @@
|
||||
// File : test/gtx/associated_min_max.cpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/fast_exponential.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/fast_square_root.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/fast_trigonometry.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/handed_coordinate_space.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/inertia.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/intersect.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/log_base.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/matrix_cross_product.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/matrix_major_storage.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/matrix_operation.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/norm.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/normal.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/normalize_dot.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/number_precision.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/optimum_pow.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/orthonormalize.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/perpendicular.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/polar_coordinates.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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 <emmintrin.h>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtx/associated_min_max.hpp>
|
||||
#include <glm/gtx/projection.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
bool TestA = glm::areOrthonormal(glm::vec2(1, 0), glm::vec2(0, 1), 0.00001f);
|
||||
Error += TestA ? 0 : 1;
|
||||
int Error(0);
|
||||
|
||||
return Error;
|
||||
bool TestA = glm::areOrthonormal(glm::vec2(1, 0), glm::vec2(0, 1), 0.00001f);
|
||||
Error += TestA ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
|
Loading…
Reference in New Issue
Block a user