Commit 40b30d43 authored by unknown's avatar unknown Committed by jean-pierre charras

GLM (tool for opengl) update to 0.9.4.6

parent 9b1eb354
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -445,7 +445,14 @@ namespace detail ...@@ -445,7 +445,14 @@ namespace detail
# define GLM_RESTRICT __declspec(restrict) # define GLM_RESTRICT __declspec(restrict)
# define GLM_RESTRICT_VAR __restrict # define GLM_RESTRICT_VAR __restrict
# define GLM_CONSTEXPR # define GLM_CONSTEXPR
#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) #elif(GLM_COMPILER & GLM_COMPILER_INTEL)
# define GLM_DEPRECATED
# define GLM_ALIGN(x) __declspec(align(x))
# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct
# define GLM_RESTRICT
# define GLM_RESTRICT_VAR __restrict
# define GLM_CONSTEXPR
#elif(((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) || (GLM_COMPILER & GLM_COMPILER_CLANG))
# define GLM_DEPRECATED __attribute__((__deprecated__)) # define GLM_DEPRECATED __attribute__((__deprecated__))
# define GLM_ALIGN(x) __attribute__((aligned(x))) # define GLM_ALIGN(x) __attribute__((aligned(x)))
# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) # define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -36,7 +36,7 @@ namespace detail ...@@ -36,7 +36,7 @@ namespace detail
template <typename genFIType> template <typename genFIType>
struct Abs_<genFIType, true> struct Abs_<genFIType, true>
{ {
static genFIType get(genFIType const & x) GLM_FUNC_QUALIFIER static genFIType get(genFIType const & x)
{ {
GLM_STATIC_ASSERT( GLM_STATIC_ASSERT(
detail::type<genFIType>::is_float || detail::type<genFIType>::is_float ||
...@@ -49,7 +49,7 @@ namespace detail ...@@ -49,7 +49,7 @@ namespace detail
template <typename genFIType> template <typename genFIType>
struct Abs_<genFIType, false> struct Abs_<genFIType, false>
{ {
static genFIType get(genFIType const & x) GLM_FUNC_QUALIFIER static genFIType get(genFIType const & x)
{ {
GLM_STATIC_ASSERT( GLM_STATIC_ASSERT(
detail::type<genFIType>::is_uint, "'abs' only accept floating-point and integer inputs"); detail::type<genFIType>::is_uint, "'abs' only accept floating-point and integer inputs");
...@@ -275,7 +275,7 @@ namespace detail ...@@ -275,7 +275,7 @@ namespace detail
//// Only valid if (INT_MIN <= x-y <= INT_MAX) //// Only valid if (INT_MIN <= x-y <= INT_MAX)
//// min(x,y) //// min(x,y)
//r = y + ((x - y) & ((x - y) >> (sizeof(int) * //r = y + ((x - y) & ((x - y) >> (sizeof(int) *
//CHAR_BIT 1))); //CHAR_BIT - 1)));
//// max(x,y) //// max(x,y)
//r = x - ((x - y) & ((x - y) >> (sizeof(int) * //r = x - ((x - y) & ((x - y) >> (sizeof(int) *
//CHAR_BIT - 1))); //CHAR_BIT - 1)));
...@@ -420,93 +420,87 @@ namespace detail ...@@ -420,93 +420,87 @@ namespace detail
} }
// mix // mix
template <typename genTypeT, typename genTypeU> template <typename genType>
GLM_FUNC_QUALIFIER genTypeT mix GLM_FUNC_QUALIFIER genType mix
( (
genTypeT const & x, genType const & x,
genTypeT const & y, genType const & y,
genTypeU const & a genType const & a
) )
{ {
// It could be a vector too GLM_STATIC_ASSERT(detail::type<genType>::is_float , "'genType' is not floating-point type");
//GLM_STATIC_ASSERT(
// detail::type<genTypeT>::is_float &&
// detail::type<genTypeU>::is_float);
//return x + a * (y - x); return x + a * (y - x);
return genTypeT(genTypeU(x) + a * genTypeU(y - x));
} }
template <typename valTypeA, typename valTypeB> template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec2<valTypeA> mix GLM_FUNC_QUALIFIER detail::tvec2<valType> mix
( (
detail::tvec2<valTypeA> const & x, detail::tvec2<valType> const & x,
detail::tvec2<valTypeA> const & y, detail::tvec2<valType> const & y,
valTypeB const & a valType const & a
) )
{ {
return detail::tvec2<valTypeA>( GLM_STATIC_ASSERT(detail::type<valType>::is_float , "'genType' is not floating-point type");
detail::tvec2<valTypeB>(x) + a * detail::tvec2<valTypeB>(y - x));
return x + a * (y - x);
} }
template <typename valTypeA, typename valTypeB> template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec3<valTypeA> mix GLM_FUNC_QUALIFIER detail::tvec3<valType> mix
( (
detail::tvec3<valTypeA> const & x, detail::tvec3<valType> const & x,
detail::tvec3<valTypeA> const & y, detail::tvec3<valType> const & y,
valTypeB const & a valType const & a
) )
{ {
return detail::tvec3<valTypeA>( return x + a * (y - x);
detail::tvec3<valTypeB>(x) + a * detail::tvec3<valTypeB>(y - x));
} }
template <typename valTypeA, typename valTypeB> template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec4<valTypeA> mix GLM_FUNC_QUALIFIER detail::tvec4<valType> mix
( (
detail::tvec4<valTypeA> const & x, detail::tvec4<valType> const & x,
detail::tvec4<valTypeA> const & y, detail::tvec4<valType> const & y,
valTypeB const & a valType const & a
) )
{ {
return detail::tvec4<valTypeA>( return x + a * (y - x);
detail::tvec4<valTypeB>(x) + a * detail::tvec4<valTypeB>(y - x));
} }
template <typename valTypeA, typename valTypeB> template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec2<valTypeA> mix GLM_FUNC_QUALIFIER detail::tvec2<valType> mix
( (
detail::tvec2<valTypeA> const & x, detail::tvec2<valType> const & x,
detail::tvec2<valTypeA> const & y, detail::tvec2<valType> const & y,
detail::tvec2<valTypeB> const & a detail::tvec2<valType> const & a
) )
{ {
return detail::tvec2<valTypeA>( return x + a * (y - x);
detail::tvec2<valTypeB>(x) + a * detail::tvec2<valTypeB>(y - x));
} }
template <typename valTypeA, typename valTypeB> template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec3<valTypeA> mix GLM_FUNC_QUALIFIER detail::tvec3<valType> mix
( (
detail::tvec3<valTypeA> const & x, detail::tvec3<valType> const & x,
detail::tvec3<valTypeA> const & y, detail::tvec3<valType> const & y,
detail::tvec3<valTypeB> const & a detail::tvec3<valType> const & a
) )
{ {
return detail::tvec3<valTypeA>( GLM_STATIC_ASSERT(detail::type<valType>::is_float , "'genType' is not floating-point type");
detail::tvec3<valTypeB>(x) + a * detail::tvec3<valTypeB>(y - x));
return x + a * (y - x);
} }
template <typename valTypeA, typename valTypeB> template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec4<valTypeA> mix GLM_FUNC_QUALIFIER detail::tvec4<valType> mix
( (
detail::tvec4<valTypeA> const & x, detail::tvec4<valType> const & x,
detail::tvec4<valTypeA> const & y, detail::tvec4<valType> const & y,
detail::tvec4<valTypeB> const & a detail::tvec4<valType> const & a
) )
{ {
return detail::tvec4<valTypeA>( return x + a * (y - x);
detail::tvec4<valTypeB>(x) + a * detail::tvec4<valTypeB>(y - x));
} }
//template <typename genTypeT> //template <typename genTypeT>
...@@ -525,15 +519,63 @@ namespace detail ...@@ -525,15 +519,63 @@ namespace detail
// return x + a * (y - x); // return x + a * (y - x);
//} //}
template <typename genType> template <>
GLM_FUNC_QUALIFIER genType mix GLM_FUNC_QUALIFIER float mix
( (
genType const & x, float const & x,
genType const & y, float const & y,
bool const & a bool const & a
) )
{ {
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'mix' only accept floating-point inputs"); return a ? y : x;
}
template <>
GLM_FUNC_QUALIFIER double mix
(
double const & x,
double const & y,
bool const & a
)
{
return a ? y : x;
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec2<T> mix
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y,
bool a
)
{
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'mix' only accept floating-point inputs");
return a ? y : x;
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec3<T> mix
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y,
bool a
)
{
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'mix' only accept floating-point inputs");
return a ? y : x;
}
template <typename T>
GLM_FUNC_QUALIFIER detail::tvec4<T> mix
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y,
bool a
)
{
GLM_STATIC_ASSERT(detail::type<T>::is_float, "'mix' only accept floating-point inputs");
return a ? y : x; return a ? y : x;
} }
...@@ -552,8 +594,7 @@ namespace detail ...@@ -552,8 +594,7 @@ namespace detail
for for
( (
typename detail::tvec2<T>::size_type i = 0; typename detail::tvec2<T>::size_type i = 0;
i < detail::tvec2<T>::value_size(); i < x.length(); ++i
++i
) )
{ {
result[i] = a[i] ? y[i] : x[i]; result[i] = a[i] ? y[i] : x[i];
...@@ -575,8 +616,7 @@ namespace detail ...@@ -575,8 +616,7 @@ namespace detail
for for
( (
typename detail::tvec3<T>::size_type i = 0; typename detail::tvec3<T>::size_type i = 0;
i < detail::tvec3<T>::value_size(); i < x.length(); ++i
++i
) )
{ {
result[i] = a[i] ? y[i] : x[i]; result[i] = a[i] ? y[i] : x[i];
...@@ -598,8 +638,7 @@ namespace detail ...@@ -598,8 +638,7 @@ namespace detail
for for
( (
typename detail::tvec4<T>::size_type i = 0; typename detail::tvec4<T>::size_type i = 0;
i < detail::tvec4<T>::value_size(); i < x.length(); ++i
++i
) )
{ {
result[i] = a[i] ? y[i] : x[i]; result[i] = a[i] ? y[i] : x[i];
...@@ -803,17 +842,19 @@ namespace detail ...@@ -803,17 +842,19 @@ namespace detail
{ {
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isnan' only accept floating-point inputs"); GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isnan' only accept floating-point inputs");
# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)) # if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))
return _isnan(x) != 0; return _isnan(x) != 0;
# elif(GLM_COMPILER & GLM_COMPILER_GCC) # elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isnan(x) != 0; return _isnan(x) != 0;
# else # else
return std::isnan(x); return std::isnan(x);
# endif # endif
# else # elif(GLM_COMPILER & GLM_COMPILER_CUDA)
return isnan(x) != 0;
# else
return std::isnan(x); return std::isnan(x);
# endif # endif
} }
template <typename T> template <typename T>
...@@ -858,32 +899,20 @@ namespace detail ...@@ -858,32 +899,20 @@ namespace detail
{ {
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isinf' only accept floating-point inputs"); GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isinf' only accept floating-point inputs");
# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)) # if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
# elif(GLM_COMPILER & GLM_COMPILER_GCC) # elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isinf(x) != 0; return _isinf(x) != 0;
# else # else
return std::isinf(x); return std::isinf(x);
# endif # endif
# else # elif(GLM_COMPILER & GLM_COMPILER_CUDA)
// http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab
return isinf(double(x)) != 0;
# else
return std::isinf(x); return std::isinf(x);
# endif # endif
/*
# if(GLM_COMPILER & GLM_COMPILER_VC)
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isinf(x) != 0;
# else
return std::isinf(x);
# endif
# elif(GLM_COMPILER & GLM_COMPILER_INTEL)
return isinf(x) != 0;
# else
return std::isinf(x);
# endif
*/
} }
template <typename T> template <typename T>
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -41,16 +41,16 @@ namespace glm ...@@ -41,16 +41,16 @@ namespace glm
/// @addtogroup core_func_exponential /// @addtogroup core_func_exponential
/// @{ /// @{
/// Returns x raised to the y power. /// Returns 'base' raised to the power 'exponent'.
/// ///
/// @param x pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. /// @param base Floating point value. pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
/// @param y /// @param exponent Floating point value representing the 'exponent'.
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
genType pow(genType const & x, genType const & y); GLM_FUNC_DECL genType pow(genType const & base, genType const & exponent);
/// Returns the natural exponentiation of x, i.e., e^x. /// Returns the natural exponentiation of x, i.e., e^x.
/// ///
...@@ -60,7 +60,7 @@ namespace glm ...@@ -60,7 +60,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
genType exp(genType const & x); GLM_FUNC_DECL genType exp(genType const & x);
/// Returns the natural logarithm of x, i.e., /// Returns the natural logarithm of x, i.e.,
/// returns the value y which satisfies the equation x = e^y. /// returns the value y which satisfies the equation x = e^y.
...@@ -72,7 +72,7 @@ namespace glm ...@@ -72,7 +72,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
genType log(genType const & x); GLM_FUNC_DECL genType log(genType const & x);
/// Returns 2 raised to the x power. /// Returns 2 raised to the x power.
/// ///
...@@ -82,7 +82,7 @@ namespace glm ...@@ -82,7 +82,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
genType exp2(genType const & x); GLM_FUNC_DECL genType exp2(genType const & x);
/// Returns the base 2 log of x, i.e., returns the value y, /// Returns the base 2 log of x, i.e., returns the value y,
/// which satisfies the equation x = 2 ^ y. /// which satisfies the equation x = 2 ^ y.
...@@ -93,7 +93,7 @@ namespace glm ...@@ -93,7 +93,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
genType log2(genType const & x); GLM_FUNC_DECL genType log2(genType const & x);
/// Returns the positive square root of x. /// Returns the positive square root of x.
/// ///
...@@ -103,7 +103,7 @@ namespace glm ...@@ -103,7 +103,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
genType sqrt(genType const & x); GLM_FUNC_DECL genType sqrt(genType const & x);
/// Returns the reciprocal of the positive square root of x. /// Returns the reciprocal of the positive square root of x.
/// ///
...@@ -113,7 +113,7 @@ namespace glm ...@@ -113,7 +113,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType> template <typename genType>
genType inversesqrt(genType const & x); GLM_FUNC_DECL genType inversesqrt(genType const & x);
/// @} /// @}
}//namespace glm }//namespace glm
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -146,6 +146,7 @@ namespace _detail ...@@ -146,6 +146,7 @@ namespace _detail
) )
{ {
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'inversesqrt' only accept floating-point input"); GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'inversesqrt' only accept floating-point input");
assert(x > genType(0));
return genType(1) / ::std::sqrt(x); return genType(1) / ::std::sqrt(x);
} }
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -48,7 +48,7 @@ namespace glm ...@@ -48,7 +48,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
typename genType::value_type length( GLM_FUNC_DECL typename genType::value_type length(
genType const & x); genType const & x);
/// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). /// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
...@@ -58,7 +58,7 @@ namespace glm ...@@ -58,7 +58,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
typename genType::value_type distance( GLM_FUNC_DECL typename genType::value_type distance(
genType const & p0, genType const & p0,
genType const & p1); genType const & p1);
...@@ -69,7 +69,7 @@ namespace glm ...@@ -69,7 +69,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
typename genType::value_type dot( GLM_FUNC_DECL typename genType::value_type dot(
genType const & x, genType const & x,
genType const & y); genType const & y);
...@@ -80,7 +80,7 @@ namespace glm ...@@ -80,7 +80,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename valType> template <typename valType>
detail::tvec3<valType> cross( GLM_FUNC_DECL detail::tvec3<valType> cross(
detail::tvec3<valType> const & x, detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y); detail::tvec3<valType> const & y);
...@@ -89,7 +89,7 @@ namespace glm ...@@ -89,7 +89,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
genType normalize( GLM_FUNC_DECL genType normalize(
genType const & x); genType const & x);
/// If dot(Nref, I) < 0.0, return N, otherwise, return -N. /// If dot(Nref, I) < 0.0, return N, otherwise, return -N.
...@@ -99,7 +99,7 @@ namespace glm ...@@ -99,7 +99,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
genType faceforward( GLM_FUNC_DECL genType faceforward(
genType const & N, genType const & N,
genType const & I, genType const & I,
genType const & Nref); genType const & Nref);
...@@ -112,7 +112,7 @@ namespace glm ...@@ -112,7 +112,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml">GLSL reflect man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml">GLSL reflect man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
genType reflect( GLM_FUNC_DECL genType reflect(
genType const & I, genType const & I,
genType const & N); genType const & N);
...@@ -125,7 +125,7 @@ namespace glm ...@@ -125,7 +125,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml">GLSL refract man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml">GLSL refract man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType> template <typename genType>
genType refract( GLM_FUNC_DECL genType refract(
genType const & I, genType const & I,
genType const & N, genType const & N,
typename genType::value_type const & eta); typename genType::value_type const & eta);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -132,7 +132,6 @@ namespace glm ...@@ -132,7 +132,6 @@ namespace glm
( (
genType const & x, genType const & x,
genType const & y genType const & y
) )
{ {
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'dot' only accept floating-point inputs"); GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'dot' only accept floating-point inputs");
...@@ -271,7 +270,7 @@ namespace glm ...@@ -271,7 +270,7 @@ namespace glm
// reflect // reflect
template <typename genType> template <typename genType>
genType reflect GLM_FUNC_QUALIFIER genType reflect
( (
genType const & I, genType const & I,
genType const & N genType const & N
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -52,7 +52,7 @@ namespace glm ...@@ -52,7 +52,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml">GLSL uaddCarry man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml">GLSL uaddCarry man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType> template <typename genUType>
genUType uaddCarry( GLM_FUNC_DECL genUType uaddCarry(
genUType const & x, genUType const & x,
genUType const & y, genUType const & y,
genUType & carry); genUType & carry);
...@@ -66,7 +66,7 @@ namespace glm ...@@ -66,7 +66,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml">GLSL usubBorrow man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml">GLSL usubBorrow man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType> template <typename genUType>
genUType usubBorrow( GLM_FUNC_DECL genUType usubBorrow(
genUType const & x, genUType const & x,
genUType const & y, genUType const & y,
genUType & borrow); genUType & borrow);
...@@ -80,7 +80,7 @@ namespace glm ...@@ -80,7 +80,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml">GLSL umulExtended man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml">GLSL umulExtended man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType> template <typename genUType>
void umulExtended( GLM_FUNC_DECL void umulExtended(
genUType const & x, genUType const & x,
genUType const & y, genUType const & y,
genUType & msb, genUType & msb,
...@@ -95,7 +95,7 @@ namespace glm ...@@ -95,7 +95,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml">GLSL imulExtended man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml">GLSL imulExtended man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIType> template <typename genIType>
void imulExtended( GLM_FUNC_DECL void imulExtended(
genIType const & x, genIType const & x,
genIType const & y, genIType const & y,
genIType & msb, genIType & msb,
...@@ -105,7 +105,7 @@ namespace glm ...@@ -105,7 +105,7 @@ namespace glm
/// returning them in the least significant bits of the result. /// returning them in the least significant bits of the result.
/// For unsigned data types, the most significant bits of the /// For unsigned data types, the most significant bits of the
/// result will be set to zero. For signed data types, the /// result will be set to zero. For signed data types, the
/// most significant bits will be set to the value of bit offset + base – 1. /// most significant bits will be set to the value of bit offset + base - 1.
/// ///
/// If bits is zero, the result will be zero. The result will be /// If bits is zero, the result will be zero. The result will be
/// undefined if offset or bits is negative, or if the sum of /// undefined if offset or bits is negative, or if the sum of
...@@ -117,7 +117,7 @@ namespace glm ...@@ -117,7 +117,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml">GLSL bitfieldExtract man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml">GLSL bitfieldExtract man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType> template <typename genIUType>
genIUType bitfieldExtract( GLM_FUNC_DECL genIUType bitfieldExtract(
genIUType const & Value, genIUType const & Value,
int const & Offset, int const & Offset,
int const & Bits); int const & Bits);
...@@ -125,7 +125,7 @@ namespace glm ...@@ -125,7 +125,7 @@ namespace glm
/// Returns the insertion the bits least-significant bits of insert into base. /// Returns the insertion the bits least-significant bits of insert into base.
/// ///
/// The result will have bits [offset, offset + bits - 1] taken /// The result will have bits [offset, offset + bits - 1] taken
/// from bits [0, bits – 1] of insert, and all other bits taken /// from bits [0, bits - 1] of insert, and all other bits taken
/// directly from the corresponding bits of base. If bits is /// directly from the corresponding bits of base. If bits is
/// zero, the result will simply be base. The result will be /// zero, the result will simply be base. The result will be
/// undefined if offset or bits is negative, or if the sum of /// undefined if offset or bits is negative, or if the sum of
...@@ -137,7 +137,7 @@ namespace glm ...@@ -137,7 +137,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml">GLSL bitfieldInsert man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml">GLSL bitfieldInsert man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType> template <typename genIUType>
genIUType bitfieldInsert( GLM_FUNC_DECL genIUType bitfieldInsert(
genIUType const & Base, genIUType const & Base,
genIUType const & Insert, genIUType const & Insert,
int const & Offset, int const & Offset,
...@@ -152,7 +152,7 @@ namespace glm ...@@ -152,7 +152,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml">GLSL bitfieldReverse man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml">GLSL bitfieldReverse man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType> template <typename genIUType>
genIUType bitfieldReverse(genIUType const & Value); GLM_FUNC_DECL genIUType bitfieldReverse(genIUType const & Value);
/// Returns the number of bits set to 1 in the binary representation of value. /// Returns the number of bits set to 1 in the binary representation of value.
/// ///
...@@ -163,7 +163,7 @@ namespace glm ...@@ -163,7 +163,7 @@ namespace glm
/// ///
/// @todo Clarify the declaration to specify that scalars are suported. /// @todo Clarify the declaration to specify that scalars are suported.
template <typename T, template <typename> class genIUType> template <typename T, template <typename> class genIUType>
typename genIUType<T>::signed_type bitCount(genIUType<T> const & Value); GLM_FUNC_DECL typename genIUType<T>::signed_type bitCount(genIUType<T> const & Value);
/// Returns the bit number of the least significant bit set to /// Returns the bit number of the least significant bit set to
/// 1 in the binary representation of value. /// 1 in the binary representation of value.
...@@ -176,7 +176,7 @@ namespace glm ...@@ -176,7 +176,7 @@ namespace glm
/// ///
/// @todo Clarify the declaration to specify that scalars are suported. /// @todo Clarify the declaration to specify that scalars are suported.
template <typename T, template <typename> class genIUType> template <typename T, template <typename> class genIUType>
typename genIUType<T>::signed_type findLSB(genIUType<T> const & Value); GLM_FUNC_DECL typename genIUType<T>::signed_type findLSB(genIUType<T> const & Value);
/// Returns the bit number of the most significant bit in the binary representation of value. /// Returns the bit number of the most significant bit in the binary representation of value.
/// For positive integers, the result will be the bit number of the most significant bit set to 1. /// For positive integers, the result will be the bit number of the most significant bit set to 1.
...@@ -190,7 +190,7 @@ namespace glm ...@@ -190,7 +190,7 @@ namespace glm
/// ///
/// @todo Clarify the declaration to specify that scalars are suported. /// @todo Clarify the declaration to specify that scalars are suported.
template <typename T, template <typename> class genIUType> template <typename T, template <typename> class genIUType>
typename genIUType<T>::signed_type findMSB(genIUType<T> const & Value); GLM_FUNC_DECL typename genIUType<T>::signed_type findMSB(genIUType<T> const & Value);
/// @} /// @}
}//namespace glm }//namespace glm
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -26,10 +26,12 @@ ...@@ -26,10 +26,12 @@
/// @author Christophe Riccio /// @author Christophe Riccio
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#if(GLM_ARCH != GLM_ARCH_PURE)
#if(GLM_COMPILER & GLM_COMPILER_VC) #if(GLM_COMPILER & GLM_COMPILER_VC)
#include <intrin.h> # include <intrin.h>
#pragma intrinsic(_BitScanReverse) # pragma intrinsic(_BitScanReverse)
#endif #endif//(GLM_COMPILER & GLM_COMPILER_VC)
#endif//(GLM_ARCH != GLM_ARCH_PURE)
namespace glm namespace glm
{ {
...@@ -103,7 +105,7 @@ namespace glm ...@@ -103,7 +105,7 @@ namespace glm
if(x > y) if(x > y)
return genUType(detail::highp_int_t(x) - detail::highp_int_t(y)); return genUType(detail::highp_int_t(x) - detail::highp_int_t(y));
else else
return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y)); return genUType((detail::highp_int_t(1) << detail::highp_int_t(32)) + detail::highp_int_t(x) - detail::highp_int_t(y));
} }
template <typename T> template <typename T>
...@@ -521,7 +523,6 @@ namespace glm ...@@ -521,7 +523,6 @@ namespace glm
} }
// findMSB // findMSB
/*
#if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC)) #if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC))
template <typename genIUType> template <typename genIUType>
...@@ -538,7 +539,7 @@ namespace glm ...@@ -538,7 +539,7 @@ namespace glm
_BitScanReverse(&Result, Value); _BitScanReverse(&Result, Value);
return int(Result); return int(Result);
} }
/*
// __builtin_clz seems to be buggy as it crasks for some values, from 0x00200000 to 80000000 // __builtin_clz seems to be buggy as it crasks for some values, from 0x00200000 to 80000000
#elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40)) #elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40))
...@@ -560,8 +561,9 @@ namespace glm ...@@ -560,8 +561,9 @@ namespace glm
// //
return 31 - __builtin_clzl(Value); return 31 - __builtin_clzl(Value);
} }
#else
*/ */
#else
/* SSE implementation idea /* SSE implementation idea
__m128i const Zero = _mm_set_epi32( 0, 0, 0, 0); __m128i const Zero = _mm_set_epi32( 0, 0, 0, 0);
...@@ -606,7 +608,7 @@ namespace glm ...@@ -606,7 +608,7 @@ namespace glm
return MostSignificantBit; return MostSignificantBit;
} }
} }
//#endif//(GLM_COMPILER) #endif//(GLM_COMPILER)
template <typename T> template <typename T>
GLM_FUNC_QUALIFIER detail::tvec2<int> findMSB GLM_FUNC_QUALIFIER detail::tvec2<int> findMSB
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -53,7 +53,7 @@ namespace glm ...@@ -53,7 +53,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml">GLSL matrixCompMult man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml">GLSL matrixCompMult man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename matType> template <typename matType>
matType matrixCompMult( GLM_FUNC_DECL matType matrixCompMult(
matType const & x, matType const & x,
matType const & y); matType const & y);
...@@ -68,7 +68,7 @@ namespace glm ...@@ -68,7 +68,7 @@ namespace glm
/// ///
/// @todo Clarify the declaration to specify that matType doesn't have to be provided when used. /// @todo Clarify the declaration to specify that matType doesn't have to be provided when used.
template <typename vecType, typename matType> template <typename vecType, typename matType>
matType outerProduct( GLM_FUNC_DECL matType outerProduct(
vecType const & c, vecType const & c,
vecType const & r); vecType const & r);
...@@ -79,7 +79,7 @@ namespace glm ...@@ -79,7 +79,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename matType> template <typename matType>
typename matType::transpose_type transpose( GLM_FUNC_DECL typename matType::transpose_type transpose(
matType const & x); matType const & x);
/// Return the determinant of a mat2 matrix. /// Return the determinant of a mat2 matrix.
...@@ -89,7 +89,7 @@ namespace glm ...@@ -89,7 +89,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename valType> template <typename valType>
typename detail::tmat2x2<valType>::value_type determinant( GLM_FUNC_DECL typename detail::tmat2x2<valType>::value_type determinant(
detail::tmat2x2<valType> const & m); detail::tmat2x2<valType> const & m);
/// Return the determinant of a mat3 matrix. /// Return the determinant of a mat3 matrix.
...@@ -99,7 +99,7 @@ namespace glm ...@@ -99,7 +99,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename valType> template <typename valType>
typename detail::tmat3x3<valType>::value_type determinant( GLM_FUNC_DECL typename detail::tmat3x3<valType>::value_type determinant(
detail::tmat3x3<valType> const & m); detail::tmat3x3<valType> const & m);
/// Return the determinant of a mat4 matrix. /// Return the determinant of a mat4 matrix.
...@@ -109,7 +109,7 @@ namespace glm ...@@ -109,7 +109,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename valType> template <typename valType>
typename detail::tmat4x4<valType>::value_type determinant( GLM_FUNC_DECL typename detail::tmat4x4<valType>::value_type determinant(
detail::tmat4x4<valType> const & m); detail::tmat4x4<valType> const & m);
/// Return the inverse of a mat2 matrix. /// Return the inverse of a mat2 matrix.
...@@ -119,7 +119,7 @@ namespace glm ...@@ -119,7 +119,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename valType> template <typename valType>
detail::tmat2x2<valType> inverse( GLM_FUNC_DECL detail::tmat2x2<valType> inverse(
detail::tmat2x2<valType> const & m); detail::tmat2x2<valType> const & m);
/// Return the inverse of a mat3 matrix. /// Return the inverse of a mat3 matrix.
...@@ -129,7 +129,7 @@ namespace glm ...@@ -129,7 +129,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename valType> template <typename valType>
detail::tmat3x3<valType> inverse( GLM_FUNC_DECL detail::tmat3x3<valType> inverse(
detail::tmat3x3<valType> const & m); detail::tmat3x3<valType> const & m);
/// Return the inverse of a mat4 matrix. /// Return the inverse of a mat4 matrix.
...@@ -139,7 +139,7 @@ namespace glm ...@@ -139,7 +139,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template <typename valType> template <typename valType>
detail::tmat4x4<valType> inverse( GLM_FUNC_DECL detail::tmat4x4<valType> inverse(
detail::tmat4x4<valType> const & m); detail::tmat4x4<valType> const & m);
/// @} /// @}
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -50,7 +50,7 @@ namespace glm ...@@ -50,7 +50,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise1.xml">GLSL noise1 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise1.xml">GLSL noise1 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
template <typename genType> template <typename genType>
typename genType::value_type noise1(genType const & x); GLM_FUNC_DECL typename genType::value_type noise1(genType const & x);
/// Returns a 2D noise value based on the input value x. /// Returns a 2D noise value based on the input value x.
/// ///
...@@ -59,7 +59,7 @@ namespace glm ...@@ -59,7 +59,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise2.xml">GLSL noise2 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise2.xml">GLSL noise2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
template <typename genType> template <typename genType>
detail::tvec2<typename genType::value_type> noise2(genType const & x); GLM_FUNC_DECL detail::tvec2<typename genType::value_type> noise2(genType const & x);
/// Returns a 3D noise value based on the input value x. /// Returns a 3D noise value based on the input value x.
/// ///
...@@ -68,7 +68,7 @@ namespace glm ...@@ -68,7 +68,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise3.xml">GLSL noise3 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise3.xml">GLSL noise3 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
template <typename genType> template <typename genType>
detail::tvec3<typename genType::value_type> noise3(genType const & x); GLM_FUNC_DECL detail::tvec3<typename genType::value_type> noise3(genType const & x);
/// Returns a 4D noise value based on the input value x. /// Returns a 4D noise value based on the input value x.
/// ///
...@@ -77,7 +77,7 @@ namespace glm ...@@ -77,7 +77,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise4.xml">GLSL noise4 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/noise4.xml">GLSL noise4 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>
template <typename genType> template <typename genType>
detail::tvec4<typename genType::value_type> noise4(genType const & x); GLM_FUNC_DECL detail::tvec4<typename genType::value_type> noise4(genType const & x);
/// @} /// @}
}//namespace glm }//namespace glm
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -52,7 +52,7 @@ namespace glm ...@@ -52,7 +52,7 @@ namespace glm
//! //!
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm2x16.xml">GLSL packUnorm2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm2x16.xml">GLSL packUnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> const & v); GLM_FUNC_DECL detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> const & v);
//! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
//! Then, the results are packed into the returned 32-bit unsigned integer. //! Then, the results are packed into the returned 32-bit unsigned integer.
...@@ -65,7 +65,7 @@ namespace glm ...@@ -65,7 +65,7 @@ namespace glm
//! //!
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm2x16.xml">GLSL packSnorm2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm2x16.xml">GLSL packSnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
detail::uint32 packSnorm2x16(detail::tvec2<detail::float32> const & v); GLM_FUNC_DECL detail::uint32 packSnorm2x16(detail::tvec2<detail::float32> const & v);
//! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
//! Then, the results are packed into the returned 32-bit unsigned integer. //! Then, the results are packed into the returned 32-bit unsigned integer.
...@@ -78,7 +78,7 @@ namespace glm ...@@ -78,7 +78,7 @@ namespace glm
//! //!
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml">GLSL packUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
detail::uint32 packUnorm4x8(detail::tvec4<detail::float32> const & v); GLM_FUNC_DECL detail::uint32 packUnorm4x8(detail::tvec4<detail::float32> const & v);
//! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
//! Then, the results are packed into the returned 32-bit unsigned integer. //! Then, the results are packed into the returned 32-bit unsigned integer.
...@@ -91,7 +91,7 @@ namespace glm ...@@ -91,7 +91,7 @@ namespace glm
//! //!
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml">GLSL packSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
detail::uint32 packSnorm4x8(detail::tvec4<detail::float32> const & v); GLM_FUNC_DECL detail::uint32 packSnorm4x8(detail::tvec4<detail::float32> const & v);
//! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
//! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
...@@ -104,7 +104,7 @@ namespace glm ...@@ -104,7 +104,7 @@ namespace glm
//! //!
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
detail::tvec2<detail::float32> unpackUnorm2x16(detail::uint32 const & p); GLM_FUNC_DECL detail::tvec2<detail::float32> unpackUnorm2x16(detail::uint32 const & p);
//! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
//! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
...@@ -117,7 +117,7 @@ namespace glm ...@@ -117,7 +117,7 @@ namespace glm
//! //!
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
detail::tvec2<detail::float32> unpackSnorm2x16(detail::uint32 const & p); GLM_FUNC_DECL detail::tvec2<detail::float32> unpackSnorm2x16(detail::uint32 const & p);
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
...@@ -130,7 +130,7 @@ namespace glm ...@@ -130,7 +130,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
detail::tvec4<detail::float32> unpackUnorm4x8(detail::uint32 const & p); GLM_FUNC_DECL detail::tvec4<detail::float32> unpackUnorm4x8(detail::uint32 const & p);
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
...@@ -143,7 +143,7 @@ namespace glm ...@@ -143,7 +143,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
detail::tvec4<detail::float32> unpackSnorm4x8(detail::uint32 const & p); GLM_FUNC_DECL detail::tvec4<detail::float32> unpackSnorm4x8(detail::uint32 const & p);
/// Returns a double-precision value obtained by packing the components of v into a 64-bit value. /// Returns a double-precision value obtained by packing the components of v into a 64-bit value.
/// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. /// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified.
...@@ -153,7 +153,7 @@ namespace glm ...@@ -153,7 +153,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packDouble2x32.xml">GLSL packDouble2x32 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packDouble2x32.xml">GLSL packDouble2x32 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
double packDouble2x32(detail::tvec2<detail::uint32> const & v); GLM_FUNC_DECL double packDouble2x32(detail::tvec2<detail::uint32> const & v);
/// Returns a two-component unsigned integer vector representation of v. /// Returns a two-component unsigned integer vector representation of v.
/// The bit-level representation of v is preserved. /// The bit-level representation of v is preserved.
...@@ -162,7 +162,7 @@ namespace glm ...@@ -162,7 +162,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml">GLSL unpackDouble2x32 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml">GLSL unpackDouble2x32 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
detail::tvec2<detail::uint32> unpackDouble2x32(double const & v); GLM_FUNC_DECL detail::tvec2<detail::uint32> unpackDouble2x32(double const & v);
/// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector /// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector
/// to the 16-bit floating-point representation found in the OpenGL Specification, /// to the 16-bit floating-point representation found in the OpenGL Specification,
...@@ -172,7 +172,7 @@ namespace glm ...@@ -172,7 +172,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
uint packHalf2x16(vec2 const & v); GLM_FUNC_DECL uint packHalf2x16(vec2 const & v);
/// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, /// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values,
/// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification,
...@@ -182,7 +182,7 @@ namespace glm ...@@ -182,7 +182,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
vec2 unpackHalf2x16(uint const & v); GLM_FUNC_DECL vec2 unpackHalf2x16(uint const & v);
/// @} /// @}
}//namespace glm }//namespace glm
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -136,12 +136,42 @@ namespace glm ...@@ -136,12 +136,42 @@ namespace glm
GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2<detail::uint32> const & v) GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2<detail::uint32> const & v)
{ {
return *(double*)&v; struct uint32_pair
{
detail::uint32 x;
detail::uint32 y;
};
union helper
{
uint32_pair input;
double output;
} Helper;
Helper.input.x = v.x;
Helper.input.y = v.y;
return Helper.output;
//return *(double*)&v;
} }
GLM_FUNC_QUALIFIER detail::tvec2<uint> unpackDouble2x32(double const & v) GLM_FUNC_QUALIFIER detail::tvec2<uint> unpackDouble2x32(double const & v)
{ {
return *(detail::tvec2<uint>*)&v; struct uint32_pair
{
detail::uint32 x;
detail::uint32 y;
};
union helper
{
double input;
uint32_pair output;
} Helper;
Helper.input = v;
return detail::tvec2<uint>(Helper.output.x, Helper.output.y);
} }
GLM_FUNC_QUALIFIER uint packHalf2x16(detail::tvec2<float> const & v) GLM_FUNC_QUALIFIER uint packHalf2x16(detail::tvec2<float> const & v)
...@@ -157,7 +187,7 @@ namespace glm ...@@ -157,7 +187,7 @@ namespace glm
Pack.orig.a = detail::toFloat16(v.x); Pack.orig.a = detail::toFloat16(v.x);
Pack.orig.b = detail::toFloat16(v.y); Pack.orig.b = detail::toFloat16(v.y);
return *(uint*)&Pack; return Pack.other;
} }
GLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint const & v) GLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint const & v)
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -52,7 +52,7 @@ namespace glm ...@@ -52,7 +52,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml">GLSL radians man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml">GLSL radians man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType radians(genType const & degrees); GLM_FUNC_DECL genType radians(genType const & degrees);
/// Converts radians to degrees and returns the result. /// Converts radians to degrees and returns the result.
/// ///
...@@ -61,7 +61,7 @@ namespace glm ...@@ -61,7 +61,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml">GLSL degrees man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml">GLSL degrees man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType degrees(genType const & radians); GLM_FUNC_DECL genType degrees(genType const & radians);
/// The standard trigonometric sine function. /// The standard trigonometric sine function.
/// The values returned by this function will range from [-1, 1]. /// The values returned by this function will range from [-1, 1].
...@@ -71,7 +71,7 @@ namespace glm ...@@ -71,7 +71,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sin.xml">GLSL sin man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sin.xml">GLSL sin man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType sin(genType const & angle); GLM_FUNC_DECL genType sin(genType const & angle);
/// The standard trigonometric cosine function. /// The standard trigonometric cosine function.
/// The values returned by this function will range from [-1, 1]. /// The values returned by this function will range from [-1, 1].
...@@ -81,7 +81,7 @@ namespace glm ...@@ -81,7 +81,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cos.xml">GLSL cos man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cos.xml">GLSL cos man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType cos(genType const & angle); GLM_FUNC_DECL genType cos(genType const & angle);
/// The standard trigonometric tangent function. /// The standard trigonometric tangent function.
/// ///
...@@ -90,7 +90,7 @@ namespace glm ...@@ -90,7 +90,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tan.xml">GLSL tan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tan.xml">GLSL tan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType tan(genType const & angle); GLM_FUNC_DECL genType tan(genType const & angle);
/// Arc sine. Returns an angle whose sine is x. /// Arc sine. Returns an angle whose sine is x.
/// The range of values returned by this function is [-PI/2, PI/2]. /// The range of values returned by this function is [-PI/2, PI/2].
...@@ -101,7 +101,7 @@ namespace glm ...@@ -101,7 +101,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asin.xml">GLSL asin man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asin.xml">GLSL asin man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType asin(genType const & x); GLM_FUNC_DECL genType asin(genType const & x);
/// Arc cosine. Returns an angle whose sine is x. /// Arc cosine. Returns an angle whose sine is x.
/// The range of values returned by this function is [0, PI]. /// The range of values returned by this function is [0, PI].
...@@ -112,7 +112,7 @@ namespace glm ...@@ -112,7 +112,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acos.xml">GLSL acos man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acos.xml">GLSL acos man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType acos(genType const & x); GLM_FUNC_DECL genType acos(genType const & x);
/// Arc tangent. Returns an angle whose tangent is y/x. /// Arc tangent. Returns an angle whose tangent is y/x.
/// The signs of x and y are used to determine what /// The signs of x and y are used to determine what
...@@ -125,7 +125,7 @@ namespace glm ...@@ -125,7 +125,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType atan(genType const & y, genType const & x); GLM_FUNC_DECL genType atan(genType const & y, genType const & x);
/// Arc tangent. Returns an angle whose tangent is y_over_x. /// Arc tangent. Returns an angle whose tangent is y_over_x.
/// The range of values returned by this function is [-PI/2, PI/2]. /// The range of values returned by this function is [-PI/2, PI/2].
...@@ -135,7 +135,7 @@ namespace glm ...@@ -135,7 +135,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType atan(genType const & y_over_x); GLM_FUNC_DECL genType atan(genType const & y_over_x);
/// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2 /// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2
/// ///
...@@ -144,7 +144,7 @@ namespace glm ...@@ -144,7 +144,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sinh.xml">GLSL sinh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sinh.xml">GLSL sinh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType sinh(genType const & angle); GLM_FUNC_DECL genType sinh(genType const & angle);
/// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2 /// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2
/// ///
...@@ -153,7 +153,7 @@ namespace glm ...@@ -153,7 +153,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cosh.xml">GLSL cosh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cosh.xml">GLSL cosh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType cosh(genType const & angle); GLM_FUNC_DECL genType cosh(genType const & angle);
/// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) /// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)
/// ///
...@@ -162,7 +162,7 @@ namespace glm ...@@ -162,7 +162,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tanh.xml">GLSL tanh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tanh.xml">GLSL tanh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType tanh(genType const & angle); GLM_FUNC_DECL genType tanh(genType const & angle);
/// Arc hyperbolic sine; returns the inverse of sinh. /// Arc hyperbolic sine; returns the inverse of sinh.
/// ///
...@@ -171,7 +171,7 @@ namespace glm ...@@ -171,7 +171,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asinh.xml">GLSL asinh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asinh.xml">GLSL asinh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType asinh(genType const & x); GLM_FUNC_DECL genType asinh(genType const & x);
/// Arc hyperbolic cosine; returns the non-negative inverse /// Arc hyperbolic cosine; returns the non-negative inverse
/// of cosh. Results are undefined if x < 1. /// of cosh. Results are undefined if x < 1.
...@@ -181,7 +181,7 @@ namespace glm ...@@ -181,7 +181,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acosh.xml">GLSL acosh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acosh.xml">GLSL acosh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType acosh(genType const & x); GLM_FUNC_DECL genType acosh(genType const & x);
/// Arc hyperbolic tangent; returns the inverse of tanh. /// Arc hyperbolic tangent; returns the inverse of tanh.
/// Results are undefined if abs(x) >= 1. /// Results are undefined if abs(x) >= 1.
...@@ -191,7 +191,7 @@ namespace glm ...@@ -191,7 +191,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atanh.xml">GLSL atanh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atanh.xml">GLSL atanh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template <typename genType> template <typename genType>
genType atanh(genType const & x); GLM_FUNC_DECL genType atanh(genType const & x);
/// @} /// @}
}//namespace glm }//namespace glm
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -55,7 +55,7 @@ namespace glm ...@@ -55,7 +55,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename vecType> template <typename vecType>
typename vecType::bool_type lessThan(vecType const & x, vecType const & y); GLM_FUNC_DECL typename vecType::bool_type lessThan(vecType const & x, vecType const & y);
/// Returns the component-wise comparison of result x <= y. /// Returns the component-wise comparison of result x <= y.
/// ///
...@@ -64,7 +64,7 @@ namespace glm ...@@ -64,7 +64,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename vecType> template <typename vecType>
typename vecType::bool_type lessThanEqual(vecType const & x, vecType const & y); GLM_FUNC_DECL typename vecType::bool_type lessThanEqual(vecType const & x, vecType const & y);
/// Returns the component-wise comparison of result x > y. /// Returns the component-wise comparison of result x > y.
/// ///
...@@ -73,7 +73,7 @@ namespace glm ...@@ -73,7 +73,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename vecType> template <typename vecType>
typename vecType::bool_type greaterThan(vecType const & x, vecType const & y); GLM_FUNC_DECL typename vecType::bool_type greaterThan(vecType const & x, vecType const & y);
/// Returns the component-wise comparison of result x >= y. /// Returns the component-wise comparison of result x >= y.
/// ///
...@@ -82,7 +82,7 @@ namespace glm ...@@ -82,7 +82,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename vecType> template <typename vecType>
typename vecType::bool_type greaterThanEqual(vecType const & x, vecType const & y); GLM_FUNC_DECL typename vecType::bool_type greaterThanEqual(vecType const & x, vecType const & y);
/// Returns the component-wise comparison of result x == y. /// Returns the component-wise comparison of result x == y.
/// ///
...@@ -91,7 +91,7 @@ namespace glm ...@@ -91,7 +91,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename vecType> template <typename vecType>
typename vecType::bool_type equal(vecType const & x, vecType const & y); GLM_FUNC_DECL typename vecType::bool_type equal(vecType const & x, vecType const & y);
/// Returns the component-wise comparison of result x != y. /// Returns the component-wise comparison of result x != y.
/// ///
...@@ -100,7 +100,7 @@ namespace glm ...@@ -100,7 +100,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <typename vecType> template <typename vecType>
typename vecType::bool_type notEqual(vecType const & x, vecType const & y); GLM_FUNC_DECL typename vecType::bool_type notEqual(vecType const & x, vecType const & y);
/// Returns true if any component of x is true. /// Returns true if any component of x is true.
/// ///
...@@ -109,7 +109,7 @@ namespace glm ...@@ -109,7 +109,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <template <typename> class vecType> template <template <typename> class vecType>
bool any(vecType<bool> const & v); GLM_FUNC_DECL bool any(vecType<bool> const & v);
/// Returns true if all components of x are true. /// Returns true if all components of x are true.
/// ///
...@@ -118,7 +118,7 @@ namespace glm ...@@ -118,7 +118,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <template <typename> class vecType> template <template <typename> class vecType>
bool all(vecType<bool> const & v); GLM_FUNC_DECL bool all(vecType<bool> const & v);
/// Returns the component-wise logical complement of x. /// Returns the component-wise logical complement of x.
/// /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead. /// /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
...@@ -128,7 +128,7 @@ namespace glm ...@@ -128,7 +128,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template <template <typename> class vecType> template <template <typename> class vecType>
vecType<bool> not_(vecType<bool> const & v); GLM_FUNC_DECL vecType<bool> not_(vecType<bool> const & v);
/// @} /// @}
}//namespace glm }//namespace glm
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -36,8 +36,8 @@ namespace detail ...@@ -36,8 +36,8 @@ namespace detail
{ {
typedef short hdata; typedef short hdata;
float toFloat32(hdata value); GLM_FUNC_DECL float toFloat32(hdata value);
hdata toFloat16(float const & value); GLM_FUNC_DECL hdata toFloat16(float const & value);
class half class half
{ {
...@@ -71,42 +71,42 @@ namespace detail ...@@ -71,42 +71,42 @@ namespace detail
hdata data; hdata data;
}; };
half operator+ (half const & s1, half const & s2); GLM_FUNC_DECL half operator+ (half const & s1, half const & s2);
half operator- (half const & s1, half const & s2); GLM_FUNC_DECL half operator- (half const & s1, half const & s2);
half operator* (half const & s1, half const & s2); GLM_FUNC_DECL half operator* (half const & s1, half const & s2);
half operator/ (half const & s1, half const & s2); GLM_FUNC_DECL half operator/ (half const & s1, half const & s2);
// Unary constant operators // Unary constant operators
half operator- (half const & s); GLM_FUNC_DECL half operator- (half const & s);
half operator-- (half const & s, int); GLM_FUNC_DECL half operator-- (half const & s, int);
half operator++ (half const & s, int); GLM_FUNC_DECL half operator++ (half const & s, int);
bool operator==( GLM_FUNC_DECL bool operator==(
detail::half const & x, detail::half const & x,
detail::half const & y); detail::half const & y);
bool operator!=( GLM_FUNC_DECL bool operator!=(
detail::half const & x, detail::half const & x,
detail::half const & y); detail::half const & y);
bool operator<( GLM_FUNC_DECL bool operator<(
detail::half const & x, detail::half const & x,
detail::half const & y); detail::half const & y);
bool operator<=( GLM_FUNC_DECL bool operator<=(
detail::half const & x, detail::half const & x,
detail::half const & y); detail::half const & y);
bool operator>( GLM_FUNC_DECL bool operator>(
detail::half const & x, detail::half const & x,
detail::half const & y); detail::half const & y);
bool operator>=( GLM_FUNC_DECL bool operator>=(
detail::half const & x, detail::half const & x,
detail::half const & y); detail::half const & y);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// ///
/// This half implementation is based on OpenEXR which is Copyright (c) 2002, /// This half implementation is based on OpenEXR which is Copyright (c) 2002,
/// Industrial Light & Magic, a division of Lucas Digital Ltd. LLC /// Industrial Light & Magic, a division of Lucas Digital Ltd. LLC
...@@ -135,9 +135,9 @@ namespace detail ...@@ -135,9 +135,9 @@ namespace detail
// of float and half (127 versus 15). // of float and half (127 versus 15).
// //
register int s = (i >> 16) & 0x00008000; int s = (i >> 16) & 0x00008000;
register int e = ((i >> 23) & 0x000000ff) - (127 - 15); int e = ((i >> 23) & 0x000000ff) - (127 - 15);
register int m = i & 0x007fffff; int m = i & 0x007fffff;
// //
// Now reassemble s, e and m into a half: // Now reassemble s, e and m into a half:
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -47,13 +47,19 @@ namespace detail ...@@ -47,13 +47,19 @@ namespace detail
GLM_DETAIL_IS_INT(signed short); GLM_DETAIL_IS_INT(signed short);
GLM_DETAIL_IS_INT(signed int); GLM_DETAIL_IS_INT(signed int);
GLM_DETAIL_IS_INT(signed long); GLM_DETAIL_IS_INT(signed long);
GLM_DETAIL_IS_INT(highp_int_t);
GLM_DETAIL_IS_UINT(unsigned char); GLM_DETAIL_IS_UINT(unsigned char);
GLM_DETAIL_IS_UINT(unsigned short); GLM_DETAIL_IS_UINT(unsigned short);
GLM_DETAIL_IS_UINT(unsigned int); GLM_DETAIL_IS_UINT(unsigned int);
GLM_DETAIL_IS_UINT(unsigned long); GLM_DETAIL_IS_UINT(unsigned long);
#if(GLM_LANG >= GLM_LANG_CXX0X)
GLM_DETAIL_IS_INT(signed long long);
GLM_DETAIL_IS_UINT(unsigned long long);
#else
GLM_DETAIL_IS_INT(highp_int_t);
GLM_DETAIL_IS_UINT(highp_uint_t); GLM_DETAIL_IS_UINT(highp_uint_t);
#endif
}//namespace detail }//namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -34,40 +34,6 @@ ...@@ -34,40 +34,6 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
//template
//<
// typename T,
// template <typename> class C,
// template <typename> class R
//>
//struct matType
//{
// enum ctor{null};
// typedef T value_type;
// typedef std::size_t size_type;
// typedef C<T> col_type;
// typedef R<T> row_type;
// static size_type const col_size;
// static size_type const row_size;
//};
//template
//<
// typename T,
// template <typename> class C,
// template <typename> class R
//>
//typename matType<T, C, R>::size_type const
//matType<T, C, R>::col_size = matType<T, C, R>::col_type::value_size;
//template
//<
// typename T,
// template <typename> class C,
// template <typename> class R
//>
//typename matType<T, C, R>::size_type const
//matType<T, C, R>::row_size = matType<T, C, R>::row_type::value_size;
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -133,19 +133,19 @@ namespace detail ...@@ -133,19 +133,19 @@ namespace detail
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<U> const & m); GLM_FUNC_DECL tmat2x2<T> & operator=(tmat2x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator+=(U const & s); GLM_FUNC_DECL tmat2x2<T> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator+=(tmat2x2<U> const & m); GLM_FUNC_DECL tmat2x2<T> & operator+=(tmat2x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator-=(U const & s); GLM_FUNC_DECL tmat2x2<T> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator-=(tmat2x2<U> const & m); GLM_FUNC_DECL tmat2x2<T> & operator-=(tmat2x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator*=(U const & s); GLM_FUNC_DECL tmat2x2<T> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator*=(tmat2x2<U> const & m); GLM_FUNC_DECL tmat2x2<T> & operator*=(tmat2x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator/=(U const & s); GLM_FUNC_DECL tmat2x2<T> & operator/=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T> & operator/=(tmat2x2<U> const & m); GLM_FUNC_DECL tmat2x2<T> & operator/=(tmat2x2<U> const & m);
GLM_FUNC_DECL tmat2x2<T> & operator++(); GLM_FUNC_DECL tmat2x2<T> & operator++();
...@@ -154,107 +154,107 @@ namespace detail ...@@ -154,107 +154,107 @@ namespace detail
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat2x2<T> operator+ ( GLM_FUNC_DECL tmat2x2<T> operator+ (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s); typename tmat2x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x2<T> operator+ ( GLM_FUNC_DECL tmat2x2<T> operator+ (
typename tmat2x2<T>::value_type const & s, typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator+ ( GLM_FUNC_DECL tmat2x2<T> operator+ (
tmat2x2<T> const & m1, tmat2x2<T> const & m1,
tmat2x2<T> const & m2); tmat2x2<T> const & m2);
template <typename T> template <typename T>
tmat2x2<T> operator- ( GLM_FUNC_DECL tmat2x2<T> operator- (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s); typename tmat2x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x2<T> operator- ( GLM_FUNC_DECL tmat2x2<T> operator- (
typename tmat2x2<T>::value_type const & s, typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator- ( GLM_FUNC_DECL tmat2x2<T> operator- (
tmat2x2<T> const & m1, tmat2x2<T> const & m1,
tmat2x2<T> const & m2); tmat2x2<T> const & m2);
template <typename T> template <typename T>
tmat2x2<T> operator* ( GLM_FUNC_DECL tmat2x2<T> operator* (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s); typename tmat2x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x2<T> operator* ( GLM_FUNC_DECL tmat2x2<T> operator* (
typename tmat2x2<T>::value_type const & s, typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
typename tmat2x2<T>::col_type operator* ( GLM_FUNC_DECL typename tmat2x2<T>::col_type operator* (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::row_type const & v); typename tmat2x2<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat2x2<T>::row_type operator* ( GLM_FUNC_DECL typename tmat2x2<T>::row_type operator* (
typename tmat2x2<T>::col_type const & v, typename tmat2x2<T>::col_type const & v,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator* ( GLM_FUNC_DECL tmat2x2<T> operator* (
tmat2x2<T> const & m1, tmat2x2<T> const & m1,
tmat2x2<T> const & m2); tmat2x2<T> const & m2);
template <typename T> template <typename T>
tmat3x2<T> operator* ( GLM_FUNC_DECL tmat3x2<T> operator* (
tmat2x2<T> const & m1, tmat2x2<T> const & m1,
tmat3x2<T> const & m2); tmat3x2<T> const & m2);
template <typename T> template <typename T>
tmat4x2<T> operator* ( GLM_FUNC_DECL tmat4x2<T> operator* (
tmat2x2<T> const & m1, tmat2x2<T> const & m1,
tmat4x2<T> const & m2); tmat4x2<T> const & m2);
template <typename T> template <typename T>
tmat2x2<T> operator/ ( GLM_FUNC_DECL tmat2x2<T> operator/ (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s); typename tmat2x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x2<T> operator/ ( GLM_FUNC_DECL tmat2x2<T> operator/ (
typename tmat2x2<T>::value_type const & s, typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
typename tmat2x2<T>::col_type operator/ ( GLM_FUNC_DECL typename tmat2x2<T>::col_type operator/ (
tmat2x2<T> const & m, tmat2x2<T> const & m,
typename tmat2x2<T>::row_type const & v); typename tmat2x2<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat2x2<T>::row_type operator/ ( GLM_FUNC_DECL typename tmat2x2<T>::row_type operator/ (
typename tmat2x2<T>::col_type const & v, typename tmat2x2<T>::col_type const & v,
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator/ ( GLM_FUNC_DECL tmat2x2<T> operator/ (
tmat2x2<T> const & m1, tmat2x2<T> const & m1,
tmat2x2<T> const & m2); tmat2x2<T> const & m2);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat2x2<T> const operator- ( GLM_FUNC_DECL tmat2x2<T> const operator- (
tmat2x2<T> const & m); tmat2x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> const operator-- ( GLM_FUNC_DECL tmat2x2<T> const operator-- (
tmat2x2<T> const & m, tmat2x2<T> const & m,
int); int);
template <typename T> template <typename T>
tmat2x2<T> const operator++ ( GLM_FUNC_DECL tmat2x2<T> const operator++ (
tmat2x2<T> const & m, tmat2x2<T> const & m,
int); int);
} //namespace detail } //namespace detail
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -306,10 +306,7 @@ namespace detail ...@@ -306,10 +306,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator+= GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator+= (U s)
(
U const & s
)
{ {
this->value[0] += s; this->value[0] += s;
this->value[1] += s; this->value[1] += s;
...@@ -330,10 +327,7 @@ namespace detail ...@@ -330,10 +327,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator-= GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator-= (U s)
(
U const & s
)
{ {
this->value[0] -= s; this->value[0] -= s;
this->value[1] -= s; this->value[1] -= s;
...@@ -354,10 +348,7 @@ namespace detail ...@@ -354,10 +348,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator*= GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator*= (U s)
(
U const & s
)
{ {
this->value[0] *= s; this->value[0] *= s;
this->value[1] *= s; this->value[1] *= s;
...@@ -376,10 +367,7 @@ namespace detail ...@@ -376,10 +367,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator/= GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator/= (U s)
(
U const & s
)
{ {
this->value[0] /= s; this->value[0] /= s;
this->value[1] /= s; this->value[1] /= s;
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -115,27 +115,27 @@ namespace detail ...@@ -115,27 +115,27 @@ namespace detail
GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T> const & x); GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T> const & x);
// Accesses // Accesses
col_type & operator[](size_type i); GLM_FUNC_DECL col_type & operator[](size_type i);
col_type const & operator[](size_type i) const; GLM_FUNC_DECL col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<T> const & m); GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<U> const & m); GLM_FUNC_DECL tmat2x3<T> & operator= (tmat2x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator+= (U const & s); GLM_FUNC_DECL tmat2x3<T> & operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator+= (tmat2x3<U> const & m); GLM_FUNC_DECL tmat2x3<T> & operator+= (tmat2x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator-= (U const & s); GLM_FUNC_DECL tmat2x3<T> & operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator-= (tmat2x3<U> const & m); GLM_FUNC_DECL tmat2x3<T> & operator-= (tmat2x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator*= (U const & s); GLM_FUNC_DECL tmat2x3<T> & operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator*= (tmat2x3<U> const & m); GLM_FUNC_DECL tmat2x3<T> & operator*= (tmat2x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T> & operator/= (U const & s); GLM_FUNC_DECL tmat2x3<T> & operator/= (U s);
GLM_FUNC_DECL tmat2x3<T> & operator++ (); GLM_FUNC_DECL tmat2x3<T> & operator++ ();
GLM_FUNC_DECL tmat2x3<T> & operator-- (); GLM_FUNC_DECL tmat2x3<T> & operator-- ();
...@@ -143,82 +143,82 @@ namespace detail ...@@ -143,82 +143,82 @@ namespace detail
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat2x3<T> operator+ ( GLM_FUNC_DECL tmat2x3<T> operator+ (
tmat2x3<T> const & m, tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s); typename tmat2x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x3<T> operator+ ( GLM_FUNC_DECL tmat2x3<T> operator+ (
tmat2x3<T> const & m1, tmat2x3<T> const & m1,
tmat2x3<T> const & m2); tmat2x3<T> const & m2);
template <typename T> template <typename T>
tmat2x3<T> operator- ( GLM_FUNC_DECL tmat2x3<T> operator- (
tmat2x3<T> const & m, tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s); typename tmat2x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x3<T> operator- ( GLM_FUNC_DECL tmat2x3<T> operator- (
tmat2x3<T> const & m1, tmat2x3<T> const & m1,
tmat2x3<T> const & m2); tmat2x3<T> const & m2);
template <typename T> template <typename T>
tmat2x3<T> operator* ( GLM_FUNC_DECL tmat2x3<T> operator* (
tmat2x3<T> const & m, tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s); typename tmat2x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x3<T> operator* ( GLM_FUNC_DECL tmat2x3<T> operator* (
typename tmat2x3<T>::value_type const & s, typename tmat2x3<T>::value_type const & s,
tmat2x3<T> const & m); tmat2x3<T> const & m);
template <typename T> template <typename T>
typename tmat2x3<T>::col_type operator* ( GLM_FUNC_DECL typename tmat2x3<T>::col_type operator* (
tmat2x3<T> const & m, tmat2x3<T> const & m,
typename tmat2x3<T>::row_type const & v); typename tmat2x3<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat2x3<T>::row_type operator* ( GLM_FUNC_DECL typename tmat2x3<T>::row_type operator* (
typename tmat2x3<T>::col_type const & v, typename tmat2x3<T>::col_type const & v,
tmat2x3<T> const & m); tmat2x3<T> const & m);
template <typename T> template <typename T>
tmat2x3<T> operator* ( GLM_FUNC_DECL tmat2x3<T> operator* (
tmat2x3<T> const & m1, tmat2x3<T> const & m1,
tmat2x2<T> const & m2); tmat2x2<T> const & m2);
template <typename T> template <typename T>
tmat3x3<T> operator* ( GLM_FUNC_DECL tmat3x3<T> operator* (
tmat2x3<T> const & m1, tmat2x3<T> const & m1,
tmat3x2<T> const & m2); tmat3x2<T> const & m2);
template <typename T> template <typename T>
tmat4x3<T> operator* ( GLM_FUNC_DECL tmat4x3<T> operator* (
tmat2x3<T> const & m1, tmat2x3<T> const & m1,
tmat4x2<T> const & m2); tmat4x2<T> const & m2);
template <typename T> template <typename T>
tmat2x3<T> operator/ ( GLM_FUNC_DECL tmat2x3<T> operator/ (
tmat2x3<T> const & m, tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s); typename tmat2x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x3<T> operator/ ( GLM_FUNC_DECL tmat2x3<T> operator/ (
typename tmat2x3<T>::value_type const & s, typename tmat2x3<T>::value_type const & s,
tmat2x3<T> const & m); tmat2x3<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat2x3<T> const operator- ( GLM_FUNC_DECL tmat2x3<T> const operator- (
tmat2x3<T> const & m); tmat2x3<T> const & m);
template <typename T> template <typename T>
tmat2x3<T> const operator-- ( GLM_FUNC_DECL tmat2x3<T> const operator-- (
tmat2x3<T> const & m, tmat2x3<T> const & m,
int); int);
template <typename T> template <typename T>
tmat2x3<T> const operator++ ( GLM_FUNC_DECL tmat2x3<T> const operator++ (
tmat2x3<T> const & m, tmat2x3<T> const & m,
int); int);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -293,10 +293,7 @@ namespace detail ...@@ -293,10 +293,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator+= GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator+= (U s)
(
U const & s
)
{ {
this->value[0] += s; this->value[0] += s;
this->value[1] += s; this->value[1] += s;
...@@ -317,10 +314,7 @@ namespace detail ...@@ -317,10 +314,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator-= GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator-= (U s)
(
U const & s
)
{ {
this->value[0] -= s; this->value[0] -= s;
this->value[1] -= s; this->value[1] -= s;
...@@ -341,10 +335,7 @@ namespace detail ...@@ -341,10 +335,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator*= GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator*= (U s)
(
U const & s
)
{ {
this->value[0] *= s; this->value[0] *= s;
this->value[1] *= s; this->value[1] *= s;
...@@ -363,10 +354,7 @@ namespace detail ...@@ -363,10 +354,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator/= GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator/= (U s)
(
U const & s
)
{ {
this->value[0] /= s; this->value[0] /= s;
this->value[1] /= s; this->value[1] /= s;
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -125,19 +125,19 @@ namespace detail ...@@ -125,19 +125,19 @@ namespace detail
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<U> const & m); GLM_FUNC_DECL tmat2x4<T>& operator= (tmat2x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator+= (U const & s); GLM_FUNC_DECL tmat2x4<T>& operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator+= (tmat2x4<U> const & m); GLM_FUNC_DECL tmat2x4<T>& operator+= (tmat2x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator-= (U const & s); GLM_FUNC_DECL tmat2x4<T>& operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator-= (tmat2x4<U> const & m); GLM_FUNC_DECL tmat2x4<T>& operator-= (tmat2x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator*= (U const & s); GLM_FUNC_DECL tmat2x4<T>& operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator*= (tmat2x4<U> const & m); GLM_FUNC_DECL tmat2x4<T>& operator*= (tmat2x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T>& operator/= (U const & s); GLM_FUNC_DECL tmat2x4<T>& operator/= (U s);
GLM_FUNC_DECL tmat2x4<T>& operator++ (); GLM_FUNC_DECL tmat2x4<T>& operator++ ();
GLM_FUNC_DECL tmat2x4<T>& operator-- (); GLM_FUNC_DECL tmat2x4<T>& operator-- ();
...@@ -145,82 +145,82 @@ namespace detail ...@@ -145,82 +145,82 @@ namespace detail
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat2x4<T> operator+ ( GLM_FUNC_DECL tmat2x4<T> operator+ (
tmat2x4<T> const & m, tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s); typename tmat2x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x4<T> operator+ ( GLM_FUNC_DECL tmat2x4<T> operator+ (
tmat2x4<T> const & m1, tmat2x4<T> const & m1,
tmat2x4<T> const & m2); tmat2x4<T> const & m2);
template <typename T> template <typename T>
tmat2x4<T> operator- ( GLM_FUNC_DECL tmat2x4<T> operator- (
tmat2x4<T> const & m, tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s); typename tmat2x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x4<T> operator- ( GLM_FUNC_DECL tmat2x4<T> operator- (
tmat2x4<T> const & m1, tmat2x4<T> const & m1,
tmat2x4<T> const & m2); tmat2x4<T> const & m2);
template <typename T> template <typename T>
tmat2x4<T> operator* ( GLM_FUNC_DECL tmat2x4<T> operator* (
tmat2x4<T> const & m, tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s); typename tmat2x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x4<T> operator* ( GLM_FUNC_DECL tmat2x4<T> operator* (
typename tmat2x4<T>::value_type const & s, typename tmat2x4<T>::value_type const & s,
tmat2x4<T> const & m); tmat2x4<T> const & m);
template <typename T> template <typename T>
typename tmat2x4<T>::col_type operator* ( GLM_FUNC_DECL typename tmat2x4<T>::col_type operator* (
tmat2x4<T> const & m, tmat2x4<T> const & m,
typename tmat2x4<T>::row_type const & v); typename tmat2x4<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat2x4<T>::row_type operator* ( GLM_FUNC_DECL typename tmat2x4<T>::row_type operator* (
typename tmat2x4<T>::col_type const & v, typename tmat2x4<T>::col_type const & v,
tmat2x4<T> const & m); tmat2x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> operator* ( GLM_FUNC_DECL tmat4x4<T> operator* (
tmat2x4<T> const & m1, tmat2x4<T> const & m1,
tmat4x2<T> const & m2); tmat4x2<T> const & m2);
template <typename T> template <typename T>
tmat2x4<T> operator* ( GLM_FUNC_DECL tmat2x4<T> operator* (
tmat2x4<T> const & m1, tmat2x4<T> const & m1,
tmat2x2<T> const & m2); tmat2x2<T> const & m2);
template <typename T> template <typename T>
tmat3x4<T> operator* ( GLM_FUNC_DECL tmat3x4<T> operator* (
tmat2x4<T> const & m1, tmat2x4<T> const & m1,
tmat3x2<T> const & m2); tmat3x2<T> const & m2);
template <typename T> template <typename T>
tmat2x4<T> operator/ ( GLM_FUNC_DECL tmat2x4<T> operator/ (
tmat2x4<T> const & m, tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s); typename tmat2x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat2x4<T> operator/ ( GLM_FUNC_DECL tmat2x4<T> operator/ (
typename tmat2x4<T>::value_type const & s, typename tmat2x4<T>::value_type const & s,
tmat2x4<T> const & m); tmat2x4<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat2x4<T> const operator- ( GLM_FUNC_DECL tmat2x4<T> const operator- (
tmat2x4<T> const & m); tmat2x4<T> const & m);
template <typename T> template <typename T>
tmat2x4<T> const operator-- ( GLM_FUNC_DECL tmat2x4<T> const operator-- (
tmat2x4<T> const & m, tmat2x4<T> const & m,
int); int);
template <typename T> template <typename T>
tmat2x4<T> const operator++ ( GLM_FUNC_DECL tmat2x4<T> const operator++ (
tmat2x4<T> const & m, tmat2x4<T> const & m,
int); int);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -109,7 +109,7 @@ namespace detail ...@@ -109,7 +109,7 @@ namespace detail
{ {
value_type const Zero(0); value_type const Zero(0);
this->value[0] = col_type(s, Zero, Zero, Zero); this->value[0] = col_type(s, Zero, Zero, Zero);
this->value[1] = col_type(Zero, Zero, Zero, Zero); this->value[1] = col_type(Zero, s, Zero, Zero);
} }
template <typename T> template <typename T>
...@@ -296,10 +296,7 @@ namespace detail ...@@ -296,10 +296,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator+= GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator+= (U s)
(
U const & s
)
{ {
this->value[0] += s; this->value[0] += s;
this->value[1] += s; this->value[1] += s;
...@@ -320,10 +317,7 @@ namespace detail ...@@ -320,10 +317,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator-= GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator-= (U s)
(
U const & s
)
{ {
this->value[0] -= s; this->value[0] -= s;
this->value[1] -= s; this->value[1] -= s;
...@@ -344,10 +338,7 @@ namespace detail ...@@ -344,10 +338,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator*= GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator*= (U s)
(
U const & s
)
{ {
this->value[0] *= s; this->value[0] *= s;
this->value[1] *= s; this->value[1] *= s;
...@@ -366,10 +357,7 @@ namespace detail ...@@ -366,10 +357,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x4<T> & tmat2x4<T>::operator/= GLM_FUNC_QUALIFIER tmat2x4<T> & tmat2x4<T>::operator/= (U s)
(
U const & s
)
{ {
this->value[0] /= s; this->value[0] /= s;
this->value[1] /= s; this->value[1] /= s;
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -131,19 +131,19 @@ namespace detail ...@@ -131,19 +131,19 @@ namespace detail
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<U> const & m); GLM_FUNC_DECL tmat3x2<T> & operator= (tmat3x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator+= (U const & s); GLM_FUNC_DECL tmat3x2<T> & operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator+= (tmat3x2<U> const & m); GLM_FUNC_DECL tmat3x2<T> & operator+= (tmat3x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator-= (U const & s); GLM_FUNC_DECL tmat3x2<T> & operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator-= (tmat3x2<U> const & m); GLM_FUNC_DECL tmat3x2<T> & operator-= (tmat3x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator*= (U const & s); GLM_FUNC_DECL tmat3x2<T> & operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator*= (tmat3x2<U> const & m); GLM_FUNC_DECL tmat3x2<T> & operator*= (tmat3x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T> & operator/= (U const & s); GLM_FUNC_DECL tmat3x2<T> & operator/= (U s);
GLM_FUNC_DECL tmat3x2<T> & operator++ (); GLM_FUNC_DECL tmat3x2<T> & operator++ ();
GLM_FUNC_DECL tmat3x2<T> & operator-- (); GLM_FUNC_DECL tmat3x2<T> & operator-- ();
...@@ -151,82 +151,82 @@ namespace detail ...@@ -151,82 +151,82 @@ namespace detail
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat3x2<T> operator+ ( GLM_FUNC_DECL tmat3x2<T> operator+ (
tmat3x2<T> const & m, tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s); typename tmat3x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x2<T> operator+ ( GLM_FUNC_DECL tmat3x2<T> operator+ (
tmat3x2<T> const & m1, tmat3x2<T> const & m1,
tmat3x2<T> const & m2); tmat3x2<T> const & m2);
template <typename T> template <typename T>
tmat3x2<T> operator- ( GLM_FUNC_DECL tmat3x2<T> operator- (
tmat3x2<T> const & m, tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s); typename tmat3x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x2<T> operator- ( GLM_FUNC_DECL tmat3x2<T> operator- (
tmat3x2<T> const & m1, tmat3x2<T> const & m1,
tmat3x2<T> const & m2); tmat3x2<T> const & m2);
template <typename T> template <typename T>
tmat3x2<T> operator* ( GLM_FUNC_DECL tmat3x2<T> operator* (
tmat3x2<T> const & m, tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s); typename tmat3x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x2<T> operator* ( GLM_FUNC_DECL tmat3x2<T> operator* (
typename tmat3x2<T>::value_type const & s, typename tmat3x2<T>::value_type const & s,
tmat3x2<T> const & m); tmat3x2<T> const & m);
template <typename T> template <typename T>
typename tmat3x2<T>::col_type operator* ( GLM_FUNC_DECL typename tmat3x2<T>::col_type operator* (
tmat3x2<T> const & m, tmat3x2<T> const & m,
typename tmat3x2<T>::row_type const & v); typename tmat3x2<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat3x2<T>::row_type operator* ( GLM_FUNC_DECL typename tmat3x2<T>::row_type operator* (
typename tmat3x2<T>::col_type const & v, typename tmat3x2<T>::col_type const & v,
tmat3x2<T> const & m); tmat3x2<T> const & m);
template <typename T> template <typename T>
tmat2x2<T> operator* ( GLM_FUNC_DECL tmat2x2<T> operator* (
tmat3x2<T> const & m1, tmat3x2<T> const & m1,
tmat2x3<T> const & m2); tmat2x3<T> const & m2);
template <typename T> template <typename T>
tmat3x2<T> operator* ( GLM_FUNC_DECL tmat3x2<T> operator* (
tmat3x2<T> const & m1, tmat3x2<T> const & m1,
tmat3x3<T> const & m2); tmat3x3<T> const & m2);
template <typename T> template <typename T>
tmat4x2<T> operator* ( GLM_FUNC_DECL tmat4x2<T> operator* (
tmat3x2<T> const & m1, tmat3x2<T> const & m1,
tmat4x3<T> const & m2); tmat4x3<T> const & m2);
template <typename T> template <typename T>
tmat3x2<T> operator/ ( GLM_FUNC_DECL tmat3x2<T> operator/ (
tmat3x2<T> const & m, tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s); typename tmat3x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x2<T> operator/ ( GLM_FUNC_DECL tmat3x2<T> operator/ (
typename tmat3x2<T>::value_type const & s, typename tmat3x2<T>::value_type const & s,
tmat3x2<T> const & m); tmat3x2<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat3x2<T> const operator- ( GLM_FUNC_DECL tmat3x2<T> const operator- (
tmat3x2<T> const & m); tmat3x2<T> const & m);
template <typename T> template <typename T>
tmat3x2<T> const operator-- ( GLM_FUNC_DECL tmat3x2<T> const operator-- (
tmat3x2<T> const & m, tmat3x2<T> const & m,
int); int);
template <typename T> template <typename T>
tmat3x2<T> const operator++ ( GLM_FUNC_DECL tmat3x2<T> const operator++ (
tmat3x2<T> const & m, tmat3x2<T> const & m,
int); int);
} //namespace detail } //namespace detail
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -317,10 +317,7 @@ namespace detail ...@@ -317,10 +317,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator+= GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator+= (U s)
(
U const & s
)
{ {
this->value[0] += s; this->value[0] += s;
this->value[1] += s; this->value[1] += s;
...@@ -343,10 +340,7 @@ namespace detail ...@@ -343,10 +340,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator-= GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator-= (U s)
(
U const & s
)
{ {
this->value[0] -= s; this->value[0] -= s;
this->value[1] -= s; this->value[1] -= s;
...@@ -369,10 +363,7 @@ namespace detail ...@@ -369,10 +363,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator*= GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator*= (U s)
(
U const & s
)
{ {
this->value[0] *= s; this->value[0] *= s;
this->value[1] *= s; this->value[1] *= s;
...@@ -392,10 +383,7 @@ namespace detail ...@@ -392,10 +383,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x2<T> & tmat3x2<T>::operator/= GLM_FUNC_QUALIFIER tmat3x2<T> & tmat3x2<T>::operator/= (U s)
(
U const & s
)
{ {
this->value[0] /= s; this->value[0] /= s;
this->value[1] /= s; this->value[1] /= s;
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -137,19 +137,19 @@ namespace detail ...@@ -137,19 +137,19 @@ namespace detail
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<U> const & m); GLM_FUNC_DECL tmat3x3<T>& operator= (tmat3x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator+= (U const & s); GLM_FUNC_DECL tmat3x3<T>& operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator+= (tmat3x3<U> const & m); GLM_FUNC_DECL tmat3x3<T>& operator+= (tmat3x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator-= (U const & s); GLM_FUNC_DECL tmat3x3<T>& operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator-= (tmat3x3<U> const & m); GLM_FUNC_DECL tmat3x3<T>& operator-= (tmat3x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator*= (U const & s); GLM_FUNC_DECL tmat3x3<T>& operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator*= (tmat3x3<U> const & m); GLM_FUNC_DECL tmat3x3<T>& operator*= (tmat3x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator/= (U const & s); GLM_FUNC_DECL tmat3x3<T>& operator/= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T>& operator/= (tmat3x3<U> const & m); GLM_FUNC_DECL tmat3x3<T>& operator/= (tmat3x3<U> const & m);
GLM_FUNC_DECL tmat3x3<T>& operator++ (); GLM_FUNC_DECL tmat3x3<T>& operator++ ();
...@@ -158,107 +158,107 @@ namespace detail ...@@ -158,107 +158,107 @@ namespace detail
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat3x3<T> operator+ ( GLM_FUNC_DECL tmat3x3<T> operator+ (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s); typename tmat3x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x3<T> operator+ ( GLM_FUNC_DECL tmat3x3<T> operator+ (
typename tmat3x3<T>::value_type const & s, typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> operator+ ( GLM_FUNC_DECL tmat3x3<T> operator+ (
tmat3x3<T> const & m1, tmat3x3<T> const & m1,
tmat3x3<T> const & m2); tmat3x3<T> const & m2);
template <typename T> template <typename T>
tmat3x3<T> operator- ( GLM_FUNC_DECL tmat3x3<T> operator- (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s); typename tmat3x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x3<T> operator- ( GLM_FUNC_DECL tmat3x3<T> operator- (
typename tmat3x3<T>::value_type const & s, typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> operator- ( GLM_FUNC_DECL tmat3x3<T> operator- (
tmat3x3<T> const & m1, tmat3x3<T> const & m1,
tmat3x3<T> const & m2); tmat3x3<T> const & m2);
template <typename T> template <typename T>
tmat3x3<T> operator* ( GLM_FUNC_DECL tmat3x3<T> operator* (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s); typename tmat3x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x3<T> operator* ( GLM_FUNC_DECL tmat3x3<T> operator* (
typename tmat3x3<T>::value_type const & s, typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
typename tmat3x3<T>::col_type operator* ( GLM_FUNC_DECL typename tmat3x3<T>::col_type operator* (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::row_type const & v); typename tmat3x3<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat3x3<T>::row_type operator* ( GLM_FUNC_DECL typename tmat3x3<T>::row_type operator* (
typename tmat3x3<T>::col_type const & v, typename tmat3x3<T>::col_type const & v,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> operator* ( GLM_FUNC_DECL tmat3x3<T> operator* (
tmat3x3<T> const & m1, tmat3x3<T> const & m1,
tmat3x3<T> const & m2); tmat3x3<T> const & m2);
template <typename T> template <typename T>
tmat2x3<T> operator* ( GLM_FUNC_DECL tmat2x3<T> operator* (
tmat3x3<T> const & m1, tmat3x3<T> const & m1,
tmat2x3<T> const & m2); tmat2x3<T> const & m2);
template <typename T> template <typename T>
tmat4x3<T> operator* ( GLM_FUNC_DECL tmat4x3<T> operator* (
tmat3x3<T> const & m1, tmat3x3<T> const & m1,
tmat4x3<T> const & m2); tmat4x3<T> const & m2);
template <typename T> template <typename T>
tmat3x3<T> operator/ ( GLM_FUNC_DECL tmat3x3<T> operator/ (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s); typename tmat3x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x3<T> operator/ ( GLM_FUNC_DECL tmat3x3<T> operator/ (
typename tmat3x3<T>::value_type const & s, typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
typename tmat3x3<T>::col_type operator/ ( GLM_FUNC_DECL typename tmat3x3<T>::col_type operator/ (
tmat3x3<T> const & m, tmat3x3<T> const & m,
typename tmat3x3<T>::row_type const & v); typename tmat3x3<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat3x3<T>::row_type operator/ ( GLM_FUNC_DECL typename tmat3x3<T>::row_type operator/ (
typename tmat3x3<T>::col_type const & v, typename tmat3x3<T>::col_type const & v,
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> operator/ ( GLM_FUNC_DECL tmat3x3<T> operator/ (
tmat3x3<T> const & m1, tmat3x3<T> const & m1,
tmat3x3<T> const & m2); tmat3x3<T> const & m2);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat3x3<T> const operator- ( GLM_FUNC_DECL tmat3x3<T> const operator- (
tmat3x3<T> const & m); tmat3x3<T> const & m);
template <typename T> template <typename T>
tmat3x3<T> const operator-- ( GLM_FUNC_DECL tmat3x3<T> const operator-- (
tmat3x3<T> const & m, tmat3x3<T> const & m,
int); int);
template <typename T> template <typename T>
tmat3x3<T> const operator++ ( GLM_FUNC_DECL tmat3x3<T> const operator++ (
tmat3x3<T> const & m, tmat3x3<T> const & m,
int); int);
} //namespace detail } //namespace detail
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -320,10 +320,7 @@ namespace detail ...@@ -320,10 +320,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator+= GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator+= (U s)
(
U const & s
)
{ {
this->value[0] += s; this->value[0] += s;
this->value[1] += s; this->value[1] += s;
...@@ -346,10 +343,7 @@ namespace detail ...@@ -346,10 +343,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator-= GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator-= (U s)
(
U const & s
)
{ {
this->value[0] -= s; this->value[0] -= s;
this->value[1] -= s; this->value[1] -= s;
...@@ -372,10 +366,7 @@ namespace detail ...@@ -372,10 +366,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator*= GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator*= (U s)
(
U const & s
)
{ {
this->value[0] *= s; this->value[0] *= s;
this->value[1] *= s; this->value[1] *= s;
...@@ -395,10 +386,7 @@ namespace detail ...@@ -395,10 +386,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator/= GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator/= (U s)
(
U const & s
)
{ {
this->value[0] /= s; this->value[0] /= s;
this->value[1] /= s; this->value[1] /= s;
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -123,27 +123,27 @@ namespace detail ...@@ -123,27 +123,27 @@ namespace detail
GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T> const & x); GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T> const & x);
// Accesses // Accesses
col_type & operator[](size_type i); GLM_FUNC_DECL col_type & operator[](size_type i);
col_type const & operator[](size_type i) const; GLM_FUNC_DECL col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<T> const & m); GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<U> const & m); GLM_FUNC_DECL tmat3x4<T> & operator= (tmat3x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator+= (U const & s); GLM_FUNC_DECL tmat3x4<T> & operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator+= (tmat3x4<U> const & m); GLM_FUNC_DECL tmat3x4<T> & operator+= (tmat3x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator-= (U const & s); GLM_FUNC_DECL tmat3x4<T> & operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator-= (tmat3x4<U> const & m); GLM_FUNC_DECL tmat3x4<T> & operator-= (tmat3x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator*= (U const & s); GLM_FUNC_DECL tmat3x4<T> & operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator*= (tmat3x4<U> const & m); GLM_FUNC_DECL tmat3x4<T> & operator*= (tmat3x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T> & operator/= (U const & s); GLM_FUNC_DECL tmat3x4<T> & operator/= (U s);
GLM_FUNC_DECL tmat3x4<T> & operator++ (); GLM_FUNC_DECL tmat3x4<T> & operator++ ();
GLM_FUNC_DECL tmat3x4<T> & operator-- (); GLM_FUNC_DECL tmat3x4<T> & operator-- ();
...@@ -151,82 +151,82 @@ namespace detail ...@@ -151,82 +151,82 @@ namespace detail
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat3x4<T> operator+ ( GLM_FUNC_DECL tmat3x4<T> operator+ (
tmat3x4<T> const & m, tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s); typename tmat3x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x4<T> operator+ ( GLM_FUNC_DECL tmat3x4<T> operator+ (
tmat3x4<T> const & m1, tmat3x4<T> const & m1,
tmat3x4<T> const & m2); tmat3x4<T> const & m2);
template <typename T> template <typename T>
tmat3x4<T> operator- ( GLM_FUNC_DECL tmat3x4<T> operator- (
tmat3x4<T> const & m, tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s); typename tmat3x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x4<T> operator- ( GLM_FUNC_DECL tmat3x4<T> operator- (
tmat3x4<T> const & m1, tmat3x4<T> const & m1,
tmat3x4<T> const & m2); tmat3x4<T> const & m2);
template <typename T> template <typename T>
tmat3x4<T> operator* ( GLM_FUNC_DECL tmat3x4<T> operator* (
tmat3x4<T> const & m, tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s); typename tmat3x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x4<T> operator* ( GLM_FUNC_DECL tmat3x4<T> operator* (
typename tmat3x4<T>::value_type const & s, typename tmat3x4<T>::value_type const & s,
tmat3x4<T> const & m); tmat3x4<T> const & m);
template <typename T> template <typename T>
typename tmat3x4<T>::col_type operator* ( GLM_FUNC_DECL typename tmat3x4<T>::col_type operator* (
tmat3x4<T> const & m, tmat3x4<T> const & m,
typename tmat3x4<T>::row_type const & v); typename tmat3x4<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat3x4<T>::row_type operator* ( GLM_FUNC_DECL typename tmat3x4<T>::row_type operator* (
typename tmat3x4<T>::col_type const & v, typename tmat3x4<T>::col_type const & v,
tmat3x4<T> const & m); tmat3x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> operator* ( GLM_FUNC_DECL tmat4x4<T> operator* (
tmat3x4<T> const & m1, tmat3x4<T> const & m1,
tmat4x3<T> const & m2); tmat4x3<T> const & m2);
template <typename T> template <typename T>
tmat2x4<T> operator* ( GLM_FUNC_DECL tmat2x4<T> operator* (
tmat3x4<T> const & m1, tmat3x4<T> const & m1,
tmat2x3<T> const & m2); tmat2x3<T> const & m2);
template <typename T> template <typename T>
tmat3x4<T> operator* ( GLM_FUNC_DECL tmat3x4<T> operator* (
tmat3x4<T> const & m1, tmat3x4<T> const & m1,
tmat3x3<T> const & m2); tmat3x3<T> const & m2);
template <typename T> template <typename T>
tmat3x4<T> operator/ ( GLM_FUNC_DECL tmat3x4<T> operator/ (
tmat3x4<T> const & m, tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s); typename tmat3x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat3x4<T> operator/ ( GLM_FUNC_DECL tmat3x4<T> operator/ (
typename tmat3x4<T>::value_type const & s, typename tmat3x4<T>::value_type const & s,
tmat3x4<T> const & m); tmat3x4<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat3x4<T> const operator- ( GLM_FUNC_DECL tmat3x4<T> const operator- (
tmat3x4<T> const & m); tmat3x4<T> const & m);
template <typename T> template <typename T>
tmat3x4<T> const operator-- ( GLM_FUNC_DECL tmat3x4<T> const operator-- (
tmat3x4<T> const & m, tmat3x4<T> const & m,
int); int);
template <typename T> template <typename T>
tmat3x4<T> const operator++ ( GLM_FUNC_DECL tmat3x4<T> const operator++ (
tmat3x4<T> const & m, tmat3x4<T> const & m,
int); int);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -316,10 +316,7 @@ namespace detail ...@@ -316,10 +316,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator+= GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator+= (U s)
(
U const & s
)
{ {
this->value[0] += s; this->value[0] += s;
this->value[1] += s; this->value[1] += s;
...@@ -342,10 +339,7 @@ namespace detail ...@@ -342,10 +339,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator-= GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator-= (U s)
(
U const & s
)
{ {
this->value[0] -= s; this->value[0] -= s;
this->value[1] -= s; this->value[1] -= s;
...@@ -368,10 +362,7 @@ namespace detail ...@@ -368,10 +362,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator*= GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator*= (U s)
(
U const & s
)
{ {
this->value[0] *= s; this->value[0] *= s;
this->value[1] *= s; this->value[1] *= s;
...@@ -391,10 +382,7 @@ namespace detail ...@@ -391,10 +382,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x4<T> & tmat3x4<T>::operator/= GLM_FUNC_QUALIFIER tmat3x4<T> & tmat3x4<T>::operator/= (U s)
(
U const & s
)
{ {
this->value[0] /= s; this->value[0] /= s;
this->value[1] /= s; this->value[1] /= s;
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -136,19 +136,19 @@ namespace detail ...@@ -136,19 +136,19 @@ namespace detail
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<U> const & m); GLM_FUNC_DECL tmat4x2<T>& operator= (tmat4x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator+= (U const & s); GLM_FUNC_DECL tmat4x2<T>& operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator+= (tmat4x2<U> const & m); GLM_FUNC_DECL tmat4x2<T>& operator+= (tmat4x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator-= (U const & s); GLM_FUNC_DECL tmat4x2<T>& operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator-= (tmat4x2<U> const & m); GLM_FUNC_DECL tmat4x2<T>& operator-= (tmat4x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator*= (U const & s); GLM_FUNC_DECL tmat4x2<T>& operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator*= (tmat4x2<U> const & m); GLM_FUNC_DECL tmat4x2<T>& operator*= (tmat4x2<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T>& operator/= (U const & s); GLM_FUNC_DECL tmat4x2<T>& operator/= (U s);
GLM_FUNC_DECL tmat4x2<T>& operator++ (); GLM_FUNC_DECL tmat4x2<T>& operator++ ();
GLM_FUNC_DECL tmat4x2<T>& operator-- (); GLM_FUNC_DECL tmat4x2<T>& operator-- ();
...@@ -156,82 +156,82 @@ namespace detail ...@@ -156,82 +156,82 @@ namespace detail
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat4x2<T> operator+ ( GLM_FUNC_DECL tmat4x2<T> operator+ (
tmat4x2<T> const & m, tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s); typename tmat4x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x2<T> operator+ ( GLM_FUNC_DECL tmat4x2<T> operator+ (
tmat4x2<T> const & m1, tmat4x2<T> const & m1,
tmat4x2<T> const & m2); tmat4x2<T> const & m2);
template <typename T> template <typename T>
tmat4x2<T> operator- ( GLM_FUNC_DECL tmat4x2<T> operator- (
tmat4x2<T> const & m, tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s); typename tmat4x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x2<T> operator- ( GLM_FUNC_DECL tmat4x2<T> operator- (
tmat4x2<T> const & m1, tmat4x2<T> const & m1,
tmat4x2<T> const & m2); tmat4x2<T> const & m2);
template <typename T> template <typename T>
tmat4x2<T> operator* ( GLM_FUNC_DECL tmat4x2<T> operator* (
tmat4x2<T> const & m, tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s); typename tmat4x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x2<T> operator* ( GLM_FUNC_DECL tmat4x2<T> operator* (
typename tmat4x2<T>::value_type const & s, typename tmat4x2<T>::value_type const & s,
tmat4x2<T> const & m); tmat4x2<T> const & m);
template <typename T> template <typename T>
typename tmat4x2<T>::col_type operator* ( GLM_FUNC_DECL typename tmat4x2<T>::col_type operator* (
tmat4x2<T> const & m, tmat4x2<T> const & m,
typename tmat4x2<T>::row_type const & v); typename tmat4x2<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat4x2<T>::row_type operator* ( GLM_FUNC_DECL typename tmat4x2<T>::row_type operator* (
typename tmat4x2<T>::col_type const & v, typename tmat4x2<T>::col_type const & v,
tmat4x2<T> const & m); tmat4x2<T> const & m);
template <typename T> template <typename T>
tmat3x2<T> operator* ( GLM_FUNC_DECL tmat3x2<T> operator* (
tmat4x2<T> const & m1, tmat4x2<T> const & m1,
tmat3x4<T> const & m2); tmat3x4<T> const & m2);
template <typename T> template <typename T>
tmat4x2<T> operator* ( GLM_FUNC_DECL tmat4x2<T> operator* (
tmat4x2<T> const & m1, tmat4x2<T> const & m1,
tmat4x4<T> const & m2); tmat4x4<T> const & m2);
template <typename T> template <typename T>
tmat2x3<T> operator* ( GLM_FUNC_DECL tmat2x3<T> operator* (
tmat4x3<T> const & m1, tmat4x3<T> const & m1,
tmat2x4<T> const & m2); tmat2x4<T> const & m2);
template <typename T> template <typename T>
tmat4x2<T> operator/ ( GLM_FUNC_DECL tmat4x2<T> operator/ (
tmat4x2<T> const & m, tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s); typename tmat4x2<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x2<T> operator/ ( GLM_FUNC_DECL tmat4x2<T> operator/ (
typename tmat4x2<T>::value_type const & s, typename tmat4x2<T>::value_type const & s,
tmat4x2<T> const & m); tmat4x2<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat4x2<T> const operator- ( GLM_FUNC_DECL tmat4x2<T> const operator- (
tmat4x2<T> const & m); tmat4x2<T> const & m);
template <typename T> template <typename T>
tmat4x2<T> const operator-- ( GLM_FUNC_DECL tmat4x2<T> const operator-- (
tmat4x2<T> const & m, tmat4x2<T> const & m,
int); int);
template <typename T> template <typename T>
tmat4x2<T> const operator++ ( GLM_FUNC_DECL tmat4x2<T> const operator++ (
tmat4x2<T> const & m, tmat4x2<T> const & m,
int); int);
} //namespace detail } //namespace detail
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -342,10 +342,7 @@ namespace detail ...@@ -342,10 +342,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator+= GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator+= (U s)
(
U const & s
)
{ {
this->value[0] += s; this->value[0] += s;
this->value[1] += s; this->value[1] += s;
...@@ -370,10 +367,7 @@ namespace detail ...@@ -370,10 +367,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator-= GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator-= (U s)
(
U const & s
)
{ {
this->value[0] -= s; this->value[0] -= s;
this->value[1] -= s; this->value[1] -= s;
...@@ -398,10 +392,7 @@ namespace detail ...@@ -398,10 +392,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator*= GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator*= (U s)
(
U const & s
)
{ {
this->value[0] *= s; this->value[0] *= s;
this->value[1] *= s; this->value[1] *= s;
...@@ -422,10 +413,7 @@ namespace detail ...@@ -422,10 +413,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator/= GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator/= (U s)
(
U const & s
)
{ {
this->value[0] /= s; this->value[0] /= s;
this->value[1] /= s; this->value[1] /= s;
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -126,27 +126,27 @@ namespace detail ...@@ -126,27 +126,27 @@ namespace detail
GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T> const & x); GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T> const & x);
// Accesses // Accesses
col_type & operator[](size_type i); GLM_FUNC_DECL col_type & operator[](size_type i);
col_type const & operator[](size_type i) const; GLM_FUNC_DECL col_type const & operator[](size_type i) const;
// Unary updatable operators // Unary updatable operators
GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<T> const & m); GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<T> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<U> const & m); GLM_FUNC_DECL tmat4x3<T> & operator= (tmat4x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator+= (U const & s); GLM_FUNC_DECL tmat4x3<T> & operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator+= (tmat4x3<U> const & m); GLM_FUNC_DECL tmat4x3<T> & operator+= (tmat4x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator-= (U const & s); GLM_FUNC_DECL tmat4x3<T> & operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator-= (tmat4x3<U> const & m); GLM_FUNC_DECL tmat4x3<T> & operator-= (tmat4x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator*= (U const & s); GLM_FUNC_DECL tmat4x3<T> & operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator*= (tmat4x3<U> const & m); GLM_FUNC_DECL tmat4x3<T> & operator*= (tmat4x3<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T> & operator/= (U const & s); GLM_FUNC_DECL tmat4x3<T> & operator/= (U s);
GLM_FUNC_DECL tmat4x3<T> & operator++ (); GLM_FUNC_DECL tmat4x3<T> & operator++ ();
GLM_FUNC_DECL tmat4x3<T> & operator-- (); GLM_FUNC_DECL tmat4x3<T> & operator-- ();
...@@ -154,82 +154,82 @@ namespace detail ...@@ -154,82 +154,82 @@ namespace detail
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat4x3<T> operator+ ( GLM_FUNC_DECL tmat4x3<T> operator+ (
tmat4x3<T> const & m, tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s); typename tmat4x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x3<T> operator+ ( GLM_FUNC_DECL tmat4x3<T> operator+ (
tmat4x3<T> const & m1, tmat4x3<T> const & m1,
tmat4x3<T> const & m2); tmat4x3<T> const & m2);
template <typename T> template <typename T>
tmat4x3<T> operator- ( GLM_FUNC_DECL tmat4x3<T> operator- (
tmat4x3<T> const & m, tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s); typename tmat4x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x3<T> operator- ( GLM_FUNC_DECL tmat4x3<T> operator- (
tmat4x3<T> const & m1, tmat4x3<T> const & m1,
tmat4x3<T> const & m2); tmat4x3<T> const & m2);
template <typename T> template <typename T>
tmat4x3<T> operator* ( GLM_FUNC_DECL tmat4x3<T> operator* (
tmat4x3<T> const & m, tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s); typename tmat4x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x3<T> operator* ( GLM_FUNC_DECL tmat4x3<T> operator* (
typename tmat4x3<T>::value_type const & s, typename tmat4x3<T>::value_type const & s,
tmat4x3<T> const & m); tmat4x3<T> const & m);
template <typename T> template <typename T>
typename tmat4x3<T>::col_type operator* ( GLM_FUNC_DECL typename tmat4x3<T>::col_type operator* (
tmat4x3<T> const & m, tmat4x3<T> const & m,
typename tmat4x3<T>::row_type const & v); typename tmat4x3<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat4x3<T>::row_type operator* ( GLM_FUNC_DECL typename tmat4x3<T>::row_type operator* (
typename tmat4x3<T>::col_type const & v, typename tmat4x3<T>::col_type const & v,
tmat4x3<T> const & m); tmat4x3<T> const & m);
template <typename T> template <typename T>
tmat2x3<T> operator* ( GLM_FUNC_DECL tmat2x3<T> operator* (
tmat4x3<T> const & m1, tmat4x3<T> const & m1,
tmat2x4<T> const & m2); tmat2x4<T> const & m2);
template <typename T> template <typename T>
tmat3x3<T> operator* ( GLM_FUNC_DECL tmat3x3<T> operator* (
tmat4x3<T> const & m1, tmat4x3<T> const & m1,
tmat3x4<T> const & m2); tmat3x4<T> const & m2);
template <typename T> template <typename T>
tmat4x3<T> operator* ( GLM_FUNC_DECL tmat4x3<T> operator* (
tmat4x3<T> const & m1, tmat4x3<T> const & m1,
tmat4x4<T> const & m2); tmat4x4<T> const & m2);
template <typename T> template <typename T>
tmat4x3<T> operator/ ( GLM_FUNC_DECL tmat4x3<T> operator/ (
tmat4x3<T> const & m, tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s); typename tmat4x3<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x3<T> operator/ ( GLM_FUNC_DECL tmat4x3<T> operator/ (
typename tmat4x3<T>::value_type const & s, typename tmat4x3<T>::value_type const & s,
tmat4x3<T> const & m); tmat4x3<T> const & m);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat4x3<T> const operator- ( GLM_FUNC_DECL tmat4x3<T> const operator- (
tmat4x3<T> const & m); tmat4x3<T> const & m);
template <typename T> template <typename T>
tmat4x3<T> const operator-- ( GLM_FUNC_DECL tmat4x3<T> const operator-- (
tmat4x3<T> const & m, tmat4x3<T> const & m,
int); int);
template <typename T> template <typename T>
tmat4x3<T> const operator++ ( GLM_FUNC_DECL tmat4x3<T> const operator++ (
tmat4x3<T> const & m, tmat4x3<T> const & m,
int); int);
}//namespace detail }//namespace detail
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -344,10 +344,7 @@ namespace detail ...@@ -344,10 +344,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator+= GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator+= (U s)
(
U const & s
)
{ {
this->value[0] += s; this->value[0] += s;
this->value[1] += s; this->value[1] += s;
...@@ -372,10 +369,7 @@ namespace detail ...@@ -372,10 +369,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator-= GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator-= (U s)
(
U const & s
)
{ {
this->value[0] -= s; this->value[0] -= s;
this->value[1] -= s; this->value[1] -= s;
...@@ -400,10 +394,7 @@ namespace detail ...@@ -400,10 +394,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator*= GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator*= (U s)
(
U const & s
)
{ {
this->value[0] *= s; this->value[0] *= s;
this->value[1] *= s; this->value[1] *= s;
...@@ -424,10 +415,7 @@ namespace detail ...@@ -424,10 +415,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator/= GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator/= (U s)
(
U const & s
)
{ {
this->value[0] /= s; this->value[0] /= s;
this->value[1] /= s; this->value[1] /= s;
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -140,19 +140,19 @@ namespace detail ...@@ -140,19 +140,19 @@ namespace detail
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<U> const & m); GLM_FUNC_DECL tmat4x4<T> & operator= (tmat4x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator+= (U const & s); GLM_FUNC_DECL tmat4x4<T> & operator+= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator+= (tmat4x4<U> const & m); GLM_FUNC_DECL tmat4x4<T> & operator+= (tmat4x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator-= (U const & s); GLM_FUNC_DECL tmat4x4<T> & operator-= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator-= (tmat4x4<U> const & m); GLM_FUNC_DECL tmat4x4<T> & operator-= (tmat4x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator*= (U const & s); GLM_FUNC_DECL tmat4x4<T> & operator*= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator*= (tmat4x4<U> const & m); GLM_FUNC_DECL tmat4x4<T> & operator*= (tmat4x4<U> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator/= (U const & s); GLM_FUNC_DECL tmat4x4<T> & operator/= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T> & operator/= (tmat4x4<U> const & m); GLM_FUNC_DECL tmat4x4<T> & operator/= (tmat4x4<U> const & m);
GLM_FUNC_DECL tmat4x4<T> & operator++ (); GLM_FUNC_DECL tmat4x4<T> & operator++ ();
...@@ -161,106 +161,106 @@ namespace detail ...@@ -161,106 +161,106 @@ namespace detail
// Binary operators // Binary operators
template <typename T> template <typename T>
tmat4x4<T> operator+ ( GLM_FUNC_DECL tmat4x4<T> operator+ (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s); typename tmat4x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x4<T> operator+ ( GLM_FUNC_DECL tmat4x4<T> operator+ (
typename tmat4x4<T>::value_type const & s, typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> operator+ ( GLM_FUNC_DECL tmat4x4<T> operator+ (
tmat4x4<T> const & m1, tmat4x4<T> const & m1,
tmat4x4<T> const & m2); tmat4x4<T> const & m2);
template <typename T> template <typename T>
tmat4x4<T> operator- ( GLM_FUNC_DECL tmat4x4<T> operator- (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s); typename tmat4x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x4<T> operator- ( GLM_FUNC_DECL tmat4x4<T> operator- (
typename tmat4x4<T>::value_type const & s, typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> operator- ( GLM_FUNC_DECL tmat4x4<T> operator- (
tmat4x4<T> const & m1, tmat4x4<T> const & m1,
tmat4x4<T> const & m2); tmat4x4<T> const & m2);
template <typename T> template <typename T>
tmat4x4<T> operator* ( GLM_FUNC_DECL tmat4x4<T> operator* (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s); typename tmat4x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x4<T> operator* ( GLM_FUNC_DECL tmat4x4<T> operator* (
typename tmat4x4<T>::value_type const & s, typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
typename tmat4x4<T>::col_type operator* ( GLM_FUNC_DECL typename tmat4x4<T>::col_type operator* (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::row_type const & v); typename tmat4x4<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat4x4<T>::row_type operator* ( GLM_FUNC_DECL typename tmat4x4<T>::row_type operator* (
typename tmat4x4<T>::col_type const & v, typename tmat4x4<T>::col_type const & v,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
tmat2x4<T> operator* ( GLM_FUNC_DECL tmat2x4<T> operator* (
tmat4x4<T> const & m1, tmat4x4<T> const & m1,
tmat2x4<T> const & m2); tmat2x4<T> const & m2);
template <typename T> template <typename T>
tmat3x4<T> operator* ( GLM_FUNC_DECL tmat3x4<T> operator* (
tmat4x4<T> const & m1, tmat4x4<T> const & m1,
tmat3x4<T> const & m2); tmat3x4<T> const & m2);
template <typename T> template <typename T>
tmat4x4<T> operator* ( GLM_FUNC_DECL tmat4x4<T> operator* (
tmat4x4<T> const & m1, tmat4x4<T> const & m1,
tmat4x4<T> const & m2); tmat4x4<T> const & m2);
template <typename T> template <typename T>
tmat4x4<T> operator/ ( GLM_FUNC_DECL tmat4x4<T> operator/ (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s); typename tmat4x4<T>::value_type const & s);
template <typename T> template <typename T>
tmat4x4<T> operator/ ( GLM_FUNC_DECL tmat4x4<T> operator/ (
typename tmat4x4<T>::value_type const & s, typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
typename tmat4x4<T>::col_type operator/ ( GLM_FUNC_DECL typename tmat4x4<T>::col_type operator/ (
tmat4x4<T> const & m, tmat4x4<T> const & m,
typename tmat4x4<T>::row_type const & v); typename tmat4x4<T>::row_type const & v);
template <typename T> template <typename T>
typename tmat4x4<T>::row_type operator/ ( GLM_FUNC_DECL typename tmat4x4<T>::row_type operator/ (
typename tmat4x4<T>::col_type & v, typename tmat4x4<T>::col_type & v,
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> operator/ ( GLM_FUNC_DECL tmat4x4<T> operator/ (
tmat4x4<T> const & m1, tmat4x4<T> const & m1,
tmat4x4<T> const & m2); tmat4x4<T> const & m2);
// Unary constant operators // Unary constant operators
template <typename T> template <typename T>
tmat4x4<T> const operator- ( GLM_FUNC_DECL tmat4x4<T> const operator- (
tmat4x4<T> const & m); tmat4x4<T> const & m);
template <typename T> template <typename T>
tmat4x4<T> const operator-- ( GLM_FUNC_DECL tmat4x4<T> const operator-- (
tmat4x4<T> const & m, int); tmat4x4<T> const & m, int);
template <typename T> template <typename T>
tmat4x4<T> const operator++ ( GLM_FUNC_DECL tmat4x4<T> const operator++ (
tmat4x4<T> const & m, int); tmat4x4<T> const & m, int);
} //namespace detail } //namespace detail
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -191,7 +191,7 @@ namespace detail ...@@ -191,7 +191,7 @@ namespace detail
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,
X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4 X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4
) )
{ {
GLM_STATIC_ASSERT(detail::type<X1>::is_float || std::numeric_limits<X1>::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); GLM_STATIC_ASSERT(detail::type<X1>::is_float || std::numeric_limits<X1>::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
GLM_STATIC_ASSERT(detail::type<Y1>::is_float || std::numeric_limits<Y1>::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); GLM_STATIC_ASSERT(detail::type<Y1>::is_float || std::numeric_limits<Y1>::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.");
...@@ -374,10 +374,7 @@ namespace detail ...@@ -374,10 +374,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x4<T>& tmat4x4<T>::operator+= GLM_FUNC_QUALIFIER tmat4x4<T>& tmat4x4<T>::operator+= (U s)
(
U const & s
)
{ {
this->value[0] += s; this->value[0] += s;
this->value[1] += s; this->value[1] += s;
...@@ -402,10 +399,7 @@ namespace detail ...@@ -402,10 +399,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator-= GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator-= (U s)
(
U const & s
)
{ {
this->value[0] -= s; this->value[0] -= s;
this->value[1] -= s; this->value[1] -= s;
...@@ -430,10 +424,7 @@ namespace detail ...@@ -430,10 +424,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator*= GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator*= (U s)
(
U const & s
)
{ {
this->value[0] *= s; this->value[0] *= s;
this->value[1] *= s; this->value[1] *= s;
...@@ -454,10 +445,7 @@ namespace detail ...@@ -454,10 +445,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator/= GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator/= (U s)
(
U const & s
)
{ {
this->value[0] /= s; this->value[0] /= s;
this->value[1] /= s; this->value[1] /= s;
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -62,6 +62,10 @@ namespace detail ...@@ -62,6 +62,10 @@ namespace detail
# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) # if(GLM_COMPONENT == GLM_COMPONENT_CXX11)
union union
{ {
struct{value_type x, y;};
struct{value_type r, g;};
struct{value_type s, t;};
# if(defined(GLM_SWIZZLE)) # if(defined(GLM_SWIZZLE))
_GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, x, y) _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, x, y)
_GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, r, g) _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, r, g)
...@@ -73,10 +77,6 @@ namespace detail ...@@ -73,10 +77,6 @@ namespace detail
_GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, r, g) _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, r, g)
_GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, s, t) _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, s, t)
# endif//(defined(GLM_SWIZZLE)) # endif//(defined(GLM_SWIZZLE))
struct{value_type r, g;};
struct{value_type s, t;};
struct{value_type x, y;};
}; };
# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) # elif(GLM_COMPONENT == GLM_COMPONENT_CXX98)
union {value_type x, r, s;}; union {value_type x, r, s;};
...@@ -123,7 +123,7 @@ namespace detail ...@@ -123,7 +123,7 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Swizzle constructors // Swizzle constructors
tvec2(tref2<T> const & r); GLM_FUNC_DECL tvec2(tref2<T> const & r);
template <int E0, int E1> template <int E0, int E1>
GLM_FUNC_DECL tvec2(const glm::detail::swizzle<2,T,tvec2<T>,E0,E1,-1,-2>& that) GLM_FUNC_DECL tvec2(const glm::detail::swizzle<2,T,tvec2<T>,E0,E1,-1,-2>& that)
...@@ -165,19 +165,19 @@ namespace detail ...@@ -165,19 +165,19 @@ namespace detail
GLM_FUNC_DECL tvec2<T> & operator= (tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator= (tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator+=(U const & s); GLM_FUNC_DECL tvec2<T> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator+=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator+=(tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator-=(U const & s); GLM_FUNC_DECL tvec2<T> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator-=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator-=(tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator*=(U const & s); GLM_FUNC_DECL tvec2<T> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator*=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator*=(tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator/=(U const & s); GLM_FUNC_DECL tvec2<T> & operator/=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator/=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator/=(tvec2<U> const & v);
GLM_FUNC_DECL tvec2<T> & operator++(); GLM_FUNC_DECL tvec2<T> & operator++();
...@@ -187,27 +187,27 @@ namespace detail ...@@ -187,27 +187,27 @@ namespace detail
// Unary bit operators // Unary bit operators
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator%= (U const & s); GLM_FUNC_DECL tvec2<T> & operator%= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator%= (tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator%= (tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator&= (U const & s); GLM_FUNC_DECL tvec2<T> & operator&= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator&= (tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator&= (tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator|= (U const & s); GLM_FUNC_DECL tvec2<T> & operator|= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator|= (tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator|= (tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator^= (U const & s); GLM_FUNC_DECL tvec2<T> & operator^= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator^= (tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator^= (tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator<<=(U const & s); GLM_FUNC_DECL tvec2<T> & operator<<=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator<<=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator<<=(tvec2<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator>>=(U const & s); GLM_FUNC_DECL tvec2<T> & operator>>=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T> & operator>>=(tvec2<U> const & v); GLM_FUNC_DECL tvec2<T> & operator>>=(tvec2<U> const & v);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -204,10 +204,7 @@ namespace detail ...@@ -204,10 +204,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator+= GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator+=(U s)
(
U const & s
)
{ {
this->x += T(s); this->x += T(s);
this->y += T(s); this->y += T(s);
...@@ -228,10 +225,7 @@ namespace detail ...@@ -228,10 +225,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator-= GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator-=(U s)
(
U const & s
)
{ {
this->x -= T(s); this->x -= T(s);
this->y -= T(s); this->y -= T(s);
...@@ -252,10 +246,7 @@ namespace detail ...@@ -252,10 +246,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator*= GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator*=(U s)
(
U const & s
)
{ {
this->x *= T(s); this->x *= T(s);
this->y *= T(s); this->y *= T(s);
...@@ -276,10 +267,7 @@ namespace detail ...@@ -276,10 +267,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator/= GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator/=(U s)
(
U const & s
)
{ {
this->x /= T(s); this->x /= T(s);
this->y /= T(s); this->y /= T(s);
...@@ -342,10 +330,7 @@ namespace detail ...@@ -342,10 +330,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator%= GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator%=(U s)
(
U const & s
)
{ {
this->x %= T(s); this->x %= T(s);
this->y %= T(s); this->y %= T(s);
...@@ -366,10 +351,7 @@ namespace detail ...@@ -366,10 +351,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator&= GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator&=(U s)
(
U const & s
)
{ {
this->x &= T(s); this->x &= T(s);
this->y &= T(s); this->y &= T(s);
...@@ -390,10 +372,7 @@ namespace detail ...@@ -390,10 +372,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator|= GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator|=(U s)
(
U const & s
)
{ {
this->x |= T(s); this->x |= T(s);
this->y |= T(s); this->y |= T(s);
...@@ -414,10 +393,7 @@ namespace detail ...@@ -414,10 +393,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator^= GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator^=(U s)
(
U const & s
)
{ {
this->x ^= T(s); this->x ^= T(s);
this->y ^= T(s); this->y ^= T(s);
...@@ -438,10 +414,7 @@ namespace detail ...@@ -438,10 +414,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator<<= GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator<<=(U s)
(
U const & s
)
{ {
this->x <<= T(s); this->x <<= T(s);
this->y <<= T(s); this->y <<= T(s);
...@@ -462,10 +435,7 @@ namespace detail ...@@ -462,10 +435,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator>>= GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator>>=(U s)
(
U const & s
)
{ {
this->x >>= T(s); this->x >>= T(s);
this->y >>= T(s); this->y >>= T(s);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -62,6 +62,10 @@ namespace detail ...@@ -62,6 +62,10 @@ namespace detail
# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) # if(GLM_COMPONENT == GLM_COMPONENT_CXX11)
union union
{ {
struct{value_type x, y, z;};
struct{value_type r, g, b;};
struct{value_type s, t, p;};
# if(defined(GLM_SWIZZLE)) # if(defined(GLM_SWIZZLE))
_GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, x, y, z) _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, x, y, z)
_GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, r, g, b) _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, r, g, b)
...@@ -73,10 +77,6 @@ namespace detail ...@@ -73,10 +77,6 @@ namespace detail
_GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, r, g, b) _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, r, g, b)
_GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, s, t, p) _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, s, t, p)
# endif//(defined(GLM_SWIZZLE)) # endif//(defined(GLM_SWIZZLE))
struct{value_type r, g, b;};
struct{value_type s, t, p;};
struct{value_type x, y, z;};
}; };
# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) # elif(GLM_COMPONENT == GLM_COMPONENT_CXX98)
union {value_type x, r, s;}; union {value_type x, r, s;};
...@@ -189,19 +189,19 @@ namespace detail ...@@ -189,19 +189,19 @@ namespace detail
GLM_FUNC_DECL tvec3<T> & operator= (tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator= (tvec3<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator+=(U const & s); GLM_FUNC_DECL tvec3<T> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator+=(tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator+=(tvec3<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator-=(U const & s); GLM_FUNC_DECL tvec3<T> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator-=(tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator-=(tvec3<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator*=(U const & s); GLM_FUNC_DECL tvec3<T> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator*=(tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator*=(tvec3<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator/=(U const & s); GLM_FUNC_DECL tvec3<T> & operator/=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator/=(tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator/=(tvec3<U> const & v);
GLM_FUNC_DECL tvec3<T> & operator++(); GLM_FUNC_DECL tvec3<T> & operator++();
...@@ -211,27 +211,27 @@ namespace detail ...@@ -211,27 +211,27 @@ namespace detail
// Unary bit operators // Unary bit operators
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator%= (U const & s); GLM_FUNC_DECL tvec3<T> & operator%= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator%= (tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator%= (tvec3<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator&= (U const & s); GLM_FUNC_DECL tvec3<T> & operator&= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator&= (tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator&= (tvec3<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator|= (U const & s); GLM_FUNC_DECL tvec3<T> & operator|= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator|= (tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator|= (tvec3<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator^= (U const & s); GLM_FUNC_DECL tvec3<T> & operator^= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator^= (tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator^= (tvec3<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator<<=(U const & s); GLM_FUNC_DECL tvec3<T> & operator<<=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator<<=(tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator<<=(tvec3<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator>>=(U const & s); GLM_FUNC_DECL tvec3<T> & operator>>=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec3<T> & operator>>=(tvec3<U> const & v); GLM_FUNC_DECL tvec3<T> & operator>>=(tvec3<U> const & v);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -255,10 +255,7 @@ namespace detail ...@@ -255,10 +255,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator+= GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator+=(U s)
(
U const & s
)
{ {
this->x += T(s); this->x += T(s);
this->y += T(s); this->y += T(s);
...@@ -281,10 +278,7 @@ namespace detail ...@@ -281,10 +278,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator-= GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator-=(U s)
(
U const & s
)
{ {
this->x -= T(s); this->x -= T(s);
this->y -= T(s); this->y -= T(s);
...@@ -307,10 +301,7 @@ namespace detail ...@@ -307,10 +301,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator*= GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator*=(U s)
(
U const & s
)
{ {
this->x *= T(s); this->x *= T(s);
this->y *= T(s); this->y *= T(s);
...@@ -333,10 +324,7 @@ namespace detail ...@@ -333,10 +324,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator/= GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator/=(U s)
(
U const & s
)
{ {
this->x /= T(s); this->x /= T(s);
this->y /= T(s); this->y /= T(s);
...@@ -403,10 +391,7 @@ namespace detail ...@@ -403,10 +391,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator%= GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator%=(U s)
(
U const & s
)
{ {
this->x %= s; this->x %= s;
this->y %= s; this->y %= s;
...@@ -429,10 +414,7 @@ namespace detail ...@@ -429,10 +414,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator&= GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator&=(U s)
(
U const & s
)
{ {
this->x &= s; this->x &= s;
this->y &= s; this->y &= s;
...@@ -455,10 +437,7 @@ namespace detail ...@@ -455,10 +437,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator|= GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator|=(U s)
(
U const & s
)
{ {
this->x |= s; this->x |= s;
this->y |= s; this->y |= s;
...@@ -481,10 +460,7 @@ namespace detail ...@@ -481,10 +460,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator^= GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator^=(U s)
(
U const & s
)
{ {
this->x ^= s; this->x ^= s;
this->y ^= s; this->y ^= s;
...@@ -507,10 +483,7 @@ namespace detail ...@@ -507,10 +483,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator<<= GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator<<=(U s)
(
U const & s
)
{ {
this->x <<= s; this->x <<= s;
this->y <<= s; this->y <<= s;
...@@ -533,10 +506,7 @@ namespace detail ...@@ -533,10 +506,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator>>= GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator>>=(U s)
(
U const & s
)
{ {
this->x >>= T(s); this->x >>= T(s);
this->y >>= T(s); this->y >>= T(s);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -62,6 +62,10 @@ namespace detail ...@@ -62,6 +62,10 @@ namespace detail
# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) # if(GLM_COMPONENT == GLM_COMPONENT_CXX11)
union union
{ {
struct{value_type x, y, z, w;};
struct{value_type r, g, b, a;};
struct{value_type s, t, p, q;};
# if(defined(GLM_SWIZZLE)) # if(defined(GLM_SWIZZLE))
_GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, x, y, z, w) _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, x, y, z, w)
_GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, r, g, b, a) _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2<value_type>, r, g, b, a)
...@@ -73,10 +77,6 @@ namespace detail ...@@ -73,10 +77,6 @@ namespace detail
_GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, r, g, b, a) _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, r, g, b, a)
_GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, s, t, p, q) _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4<value_type>, s, t, p, q)
# endif//(defined(GLM_SWIZZLE)) # endif//(defined(GLM_SWIZZLE))
struct{value_type r, g, b, a;};
struct{value_type s, t, p, q;};
struct{value_type x, y, z, w;};
}; };
# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) # elif(GLM_COMPONENT == GLM_COMPONENT_CXX98)
union {value_type x, r, s;}; union {value_type x, r, s;};
...@@ -244,19 +244,19 @@ namespace detail ...@@ -244,19 +244,19 @@ namespace detail
GLM_FUNC_DECL tvec4<T> & operator= (tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator= (tvec4<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator+=(U const & s); GLM_FUNC_DECL tvec4<T> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator+=(tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator+=(tvec4<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator-=(U const & s); GLM_FUNC_DECL tvec4<T> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator-=(tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator-=(tvec4<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator*=(U const & s); GLM_FUNC_DECL tvec4<T> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator*=(tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator*=(tvec4<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator/=(U const & s); GLM_FUNC_DECL tvec4<T> & operator/=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator/=(tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator/=(tvec4<U> const & v);
GLM_FUNC_DECL tvec4<T> & operator++(); GLM_FUNC_DECL tvec4<T> & operator++();
...@@ -266,27 +266,27 @@ namespace detail ...@@ -266,27 +266,27 @@ namespace detail
// Unary bit operators // Unary bit operators
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator%= (U const & s); GLM_FUNC_DECL tvec4<T> & operator%= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator%= (tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator%= (tvec4<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator&= (U const & s); GLM_FUNC_DECL tvec4<T> & operator&= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator&= (tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator&= (tvec4<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator|= (U const & s); GLM_FUNC_DECL tvec4<T> & operator|= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator|= (tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator|= (tvec4<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator^= (U const & s); GLM_FUNC_DECL tvec4<T> & operator^= (U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator^= (tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator^= (tvec4<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator<<=(U const & s); GLM_FUNC_DECL tvec4<T> & operator<<=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator<<=(tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator<<=(tvec4<U> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator>>=(U const & s); GLM_FUNC_DECL tvec4<T> & operator>>=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T> & operator>>=(tvec4<U> const & v); GLM_FUNC_DECL tvec4<T> & operator>>=(tvec4<U> const & v);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -396,10 +396,7 @@ namespace detail ...@@ -396,10 +396,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator+= GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator+= (U s)
(
U const & s
)
{ {
this->x += T(s); this->x += T(s);
this->y += T(s); this->y += T(s);
...@@ -424,10 +421,7 @@ namespace detail ...@@ -424,10 +421,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator-= GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator-= (U s)
(
U const & s
)
{ {
this->x -= T(s); this->x -= T(s);
this->y -= T(s); this->y -= T(s);
...@@ -452,10 +446,7 @@ namespace detail ...@@ -452,10 +446,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator*= GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator*= (U s)
(
U const & s
)
{ {
this->x *= T(s); this->x *= T(s);
this->y *= T(s); this->y *= T(s);
...@@ -480,10 +471,7 @@ namespace detail ...@@ -480,10 +471,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator/= GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator/= (U s)
(
U const & s
)
{ {
this->x /= T(s); this->x /= T(s);
this->y /= T(s); this->y /= T(s);
...@@ -531,10 +519,7 @@ namespace detail ...@@ -531,10 +519,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator%= GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator%= (U s)
(
U const & s
)
{ {
this->x %= T(s); this->x %= T(s);
this->y %= T(s); this->y %= T(s);
...@@ -559,10 +544,7 @@ namespace detail ...@@ -559,10 +544,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator&= GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator&= (U s)
(
U const & s
)
{ {
this->x &= T(s); this->x &= T(s);
this->y &= T(s); this->y &= T(s);
...@@ -587,10 +569,7 @@ namespace detail ...@@ -587,10 +569,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator|= GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator|= (U s)
(
U const & s
)
{ {
this->x |= T(s); this->x |= T(s);
this->y |= T(s); this->y |= T(s);
...@@ -615,10 +594,7 @@ namespace detail ...@@ -615,10 +594,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator^= GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator^= (U s)
(
U const & s
)
{ {
this->x ^= T(s); this->x ^= T(s);
this->y ^= T(s); this->y ^= T(s);
...@@ -643,10 +619,7 @@ namespace detail ...@@ -643,10 +619,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator<<= GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator<<= (U s)
(
U const & s
)
{ {
this->x <<= T(s); this->x <<= T(s);
this->y <<= T(s); this->y <<= T(s);
...@@ -671,10 +644,7 @@ namespace detail ...@@ -671,10 +644,7 @@ namespace detail
template <typename T> template <typename T>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator>>= GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator>>= (U s)
(
U const & s
)
{ {
this->x >>= T(s); this->x >>= T(s);
this->y >>= T(s); this->y >>= T(s);
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -1036,4 +1036,15 @@ namespace detail ...@@ -1036,4 +1036,15 @@ namespace detail
float(v.w) >= float(0) ? v.w : -v.w); float(v.w) >= float(0) ? v.w : -v.w);
} }
template <>
GLM_FUNC_QUALIFIER glm::half mix
(
glm::half const & x,
glm::half const & y,
bool const & a
)
{
return a ? y : x;
}
}//namespace glm }//namespace glm
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment