Added CUDA support

This commit is contained in:
Christophe Riccio 2011-04-09 09:44:32 +01:00
parent 08fe3e049b
commit 201281d06d
92 changed files with 2217 additions and 2209 deletions

View File

@ -43,7 +43,7 @@ namespace detail
struct If
{
template<typename F, typename T>
static inline T apply(F functor, const T& val)
static GLM_FUNC_QUALIFIER T apply(F functor, const T& val)
{
return functor(val);
}
@ -53,7 +53,7 @@ namespace detail
struct If<false>
{
template<typename F, typename T>
static inline T apply(F, const T& val)
static GLM_FUNC_QUALIFIER T apply(F, const T& val)
{
return val;
}

View File

@ -47,14 +47,14 @@ namespace glm
// abs
template <typename genFIType>
inline genFIType abs(
GLM_FUNC_QUALIFIER genFIType abs(
genFIType const & x)
{
return detail::Abs_<genFIType, std::numeric_limits<genFIType>::is_signed>::get(x);
}
//template <typename T>
//inline detail::tvec1<T> abs(
//GLM_FUNC_QUALIFIER detail::tvec1<T> abs(
// detail::tvec1<T> const & v)
//{
// return detail::tvec1<T>(
@ -62,7 +62,7 @@ namespace glm
//}
template <typename T>
inline detail::tvec2<T> abs(
GLM_FUNC_QUALIFIER detail::tvec2<T> abs(
detail::tvec2<T> const & v)
{
return detail::tvec2<T>(
@ -71,7 +71,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> abs(
GLM_FUNC_QUALIFIER detail::tvec3<T> abs(
detail::tvec3<T> const & v)
{
return detail::tvec3<T>(
@ -81,7 +81,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> abs(
GLM_FUNC_QUALIFIER detail::tvec4<T> abs(
detail::tvec4<T> const & v)
{
return detail::tvec4<T>(
@ -95,7 +95,7 @@ namespace glm
//Try something like based on x >> 31 to get the sign bit
template <typename genFIType>
inline genFIType sign(
GLM_FUNC_QUALIFIER genFIType sign(
genFIType const & x)
{
GLM_STATIC_ASSERT(
@ -113,7 +113,7 @@ namespace glm
}
template <typename valFIType>
inline detail::tvec2<valFIType> sign(
GLM_FUNC_QUALIFIER detail::tvec2<valFIType> sign(
detail::tvec2<valFIType> const & x)
{
return detail::tvec2<valFIType>(
@ -122,7 +122,7 @@ namespace glm
}
template <typename valFIType>
inline detail::tvec3<valFIType> sign(
GLM_FUNC_QUALIFIER detail::tvec3<valFIType> sign(
detail::tvec3<valFIType> const & x)
{
return detail::tvec3<valFIType>(
@ -132,7 +132,7 @@ namespace glm
}
template <typename valFIType>
inline detail::tvec4<valFIType> sign(
GLM_FUNC_QUALIFIER detail::tvec4<valFIType> sign(
detail::tvec4<valFIType> const & x)
{
return detail::tvec4<valFIType>(
@ -144,13 +144,13 @@ namespace glm
// floor
template <>
inline detail::thalf floor<detail::thalf>(detail::thalf const& x)
GLM_FUNC_QUALIFIER detail::thalf floor<detail::thalf>(detail::thalf const& x)
{
return detail::thalf(::std::floor(float(x)));
}
template <typename genType>
inline genType floor(genType const& x)
GLM_FUNC_QUALIFIER genType floor(genType const& x)
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'floor' only accept floating-point inputs");
@ -158,7 +158,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec2<valType> floor(detail::tvec2<valType> const& x)
GLM_FUNC_QUALIFIER detail::tvec2<valType> floor(detail::tvec2<valType> const& x)
{
return detail::tvec2<valType>(
floor(x.x),
@ -166,7 +166,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec3<valType> floor(detail::tvec3<valType> const& x)
GLM_FUNC_QUALIFIER detail::tvec3<valType> floor(detail::tvec3<valType> const& x)
{
return detail::tvec3<valType>(
floor(x.x),
@ -175,7 +175,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec4<valType> floor(detail::tvec4<valType> const& x)
GLM_FUNC_QUALIFIER detail::tvec4<valType> floor(detail::tvec4<valType> const& x)
{
return detail::tvec4<valType>(
floor(x.x),
@ -186,14 +186,14 @@ namespace glm
// trunc
template <typename genType>
inline genType trunc(genType const & x)
GLM_FUNC_QUALIFIER genType trunc(genType const & x)
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'trunc' only accept floating-point inputs");
return x < 0 ? -floor(-x) : floor(x);
}
template <typename valType>
inline detail::tvec2<valType> trunc(detail::tvec2<valType> const & x)
GLM_FUNC_QUALIFIER detail::tvec2<valType> trunc(detail::tvec2<valType> const & x)
{
return detail::tvec2<valType>(
trunc(x.x),
@ -201,7 +201,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec3<valType> trunc(detail::tvec3<valType> const & x)
GLM_FUNC_QUALIFIER detail::tvec3<valType> trunc(detail::tvec3<valType> const & x)
{
return detail::tvec3<valType>(
trunc(x.x),
@ -210,7 +210,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec4<valType> trunc(detail::tvec4<valType> const & x)
GLM_FUNC_QUALIFIER detail::tvec4<valType> trunc(detail::tvec4<valType> const & x)
{
return detail::tvec4<valType>(
trunc(x.x),
@ -221,7 +221,7 @@ namespace glm
// round
template <typename genType>
inline genType round(genType const& x)
GLM_FUNC_QUALIFIER genType round(genType const& x)
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'round' only accept floating-point inputs");
@ -229,7 +229,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec2<valType> round(detail::tvec2<valType> const& x)
GLM_FUNC_QUALIFIER detail::tvec2<valType> round(detail::tvec2<valType> const& x)
{
return detail::tvec2<valType>(
round(x.x),
@ -237,7 +237,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec3<valType> round(detail::tvec3<valType> const& x)
GLM_FUNC_QUALIFIER detail::tvec3<valType> round(detail::tvec3<valType> const& x)
{
return detail::tvec3<valType>(
round(x.x),
@ -246,7 +246,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec4<valType> round(detail::tvec4<valType> const& x)
GLM_FUNC_QUALIFIER detail::tvec4<valType> round(detail::tvec4<valType> const& x)
{
return detail::tvec4<valType>(
round(x.x),
@ -257,7 +257,7 @@ namespace glm
// roundEven
template <typename genType>
inline genType roundEven(genType const& x)
GLM_FUNC_QUALIFIER genType roundEven(genType const& x)
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'roundEven' only accept floating-point inputs");
@ -265,7 +265,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec2<valType> roundEven(detail::tvec2<valType> const& x)
GLM_FUNC_QUALIFIER detail::tvec2<valType> roundEven(detail::tvec2<valType> const& x)
{
return detail::tvec2<valType>(
roundEven(x.x),
@ -273,7 +273,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec3<valType> roundEven(detail::tvec3<valType> const& x)
GLM_FUNC_QUALIFIER detail::tvec3<valType> roundEven(detail::tvec3<valType> const& x)
{
return detail::tvec3<valType>(
roundEven(x.x),
@ -282,7 +282,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec4<valType> roundEven(detail::tvec4<valType> const& x)
GLM_FUNC_QUALIFIER detail::tvec4<valType> roundEven(detail::tvec4<valType> const& x)
{
return detail::tvec4<valType>(
roundEven(x.x),
@ -293,7 +293,7 @@ namespace glm
// ceil
template <typename genType>
inline genType ceil(genType const & x)
GLM_FUNC_QUALIFIER genType ceil(genType const & x)
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'ceil' only accept floating-point inputs");
@ -301,7 +301,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec2<valType> ceil(detail::tvec2<valType> const & x)
GLM_FUNC_QUALIFIER detail::tvec2<valType> ceil(detail::tvec2<valType> const & x)
{
return detail::tvec2<valType>(
ceil(x.x),
@ -309,7 +309,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec3<valType> ceil(detail::tvec3<valType> const & x)
GLM_FUNC_QUALIFIER detail::tvec3<valType> ceil(detail::tvec3<valType> const & x)
{
return detail::tvec3<valType>(
ceil(x.x),
@ -318,7 +318,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec4<valType> ceil(detail::tvec4<valType> const & x)
GLM_FUNC_QUALIFIER detail::tvec4<valType> ceil(detail::tvec4<valType> const & x)
{
return detail::tvec4<valType>(
ceil(x.x),
@ -329,7 +329,7 @@ namespace glm
// fract
template <typename genType>
inline genType fract
GLM_FUNC_QUALIFIER genType fract
(
genType const & x
)
@ -340,7 +340,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec2<valType> fract
GLM_FUNC_QUALIFIER detail::tvec2<valType> fract
(
detail::tvec2<valType> const & x
)
@ -351,7 +351,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec3<valType> fract
GLM_FUNC_QUALIFIER detail::tvec3<valType> fract
(
detail::tvec3<valType> const & x
)
@ -363,7 +363,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec4<valType> fract
GLM_FUNC_QUALIFIER detail::tvec4<valType> fract
(
detail::tvec4<valType> const & x
)
@ -377,7 +377,7 @@ namespace glm
// mod
template <typename genType>
inline genType mod
GLM_FUNC_QUALIFIER genType mod
(
genType const & x,
genType const & y
@ -389,7 +389,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> mod
GLM_FUNC_QUALIFIER detail::tvec2<T> mod
(
detail::tvec2<T> const & x,
typename detail::tvec2<T>::value_type const & y
@ -401,7 +401,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> mod
GLM_FUNC_QUALIFIER detail::tvec3<T> mod
(
detail::tvec3<T> const & x,
typename detail::tvec3<T>::value_type const & y
@ -414,7 +414,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> mod
GLM_FUNC_QUALIFIER detail::tvec4<T> mod
(
detail::tvec4<T> const & x,
typename detail::tvec4<T>::value_type const & y
@ -428,7 +428,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> mod
GLM_FUNC_QUALIFIER detail::tvec2<T> mod
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y
@ -440,7 +440,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> mod
GLM_FUNC_QUALIFIER detail::tvec3<T> mod
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y
@ -453,7 +453,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> mod
GLM_FUNC_QUALIFIER detail::tvec4<T> mod
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y
@ -468,7 +468,7 @@ namespace glm
// modf
template <typename genType>
inline genType modf
GLM_FUNC_QUALIFIER genType modf
(
genType const & x,
genType & i
@ -482,7 +482,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec2<valType> modf
GLM_FUNC_QUALIFIER detail::tvec2<valType> modf
(
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y
@ -494,7 +494,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec3<valType> modf
GLM_FUNC_QUALIFIER detail::tvec3<valType> modf
(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y
@ -507,7 +507,7 @@ namespace glm
}
template <typename valType>
inline detail::tvec4<valType> modf
GLM_FUNC_QUALIFIER detail::tvec4<valType> modf
(
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y
@ -530,7 +530,7 @@ namespace glm
// min
template <typename genType>
inline genType min
GLM_FUNC_QUALIFIER genType min
(
genType const & x,
genType const & y
@ -545,7 +545,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> min
GLM_FUNC_QUALIFIER detail::tvec2<T> min
(
detail::tvec2<T> const & x,
typename detail::tvec2<T>::value_type const & y
@ -557,7 +557,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> min
GLM_FUNC_QUALIFIER detail::tvec3<T> min
(
detail::tvec3<T> const & x,
typename detail::tvec3<T>::value_type const & y
@ -570,7 +570,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> min
GLM_FUNC_QUALIFIER detail::tvec4<T> min
(
detail::tvec4<T> const & x,
typename detail::tvec4<T>::value_type const & y
@ -584,7 +584,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> min
GLM_FUNC_QUALIFIER detail::tvec2<T> min
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y
@ -596,7 +596,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> min
GLM_FUNC_QUALIFIER detail::tvec3<T> min
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y
@ -609,7 +609,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> min
GLM_FUNC_QUALIFIER detail::tvec4<T> min
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y
@ -624,7 +624,7 @@ namespace glm
// max
template <typename genType>
inline genType max
GLM_FUNC_QUALIFIER genType max
(
genType const & x,
genType const & y
@ -639,7 +639,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> max
GLM_FUNC_QUALIFIER detail::tvec2<T> max
(
detail::tvec2<T> const & x,
typename detail::tvec2<T>::value_type y
@ -651,7 +651,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> max
GLM_FUNC_QUALIFIER detail::tvec3<T> max
(
detail::tvec3<T> const & x,
typename detail::tvec3<T>::value_type y
@ -664,7 +664,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> max
GLM_FUNC_QUALIFIER detail::tvec4<T> max
(
detail::tvec4<T> const & x,
typename detail::tvec4<T>::value_type y
@ -678,7 +678,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> max
GLM_FUNC_QUALIFIER detail::tvec2<T> max
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y
@ -690,7 +690,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> max
GLM_FUNC_QUALIFIER detail::tvec3<T> max
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y
@ -703,7 +703,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> max
GLM_FUNC_QUALIFIER detail::tvec4<T> max
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y)
@ -717,7 +717,7 @@ namespace glm
// clamp
template <typename valType>
inline valType clamp
GLM_FUNC_QUALIFIER valType clamp
(
valType const & x,
valType const & minVal,
@ -737,7 +737,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> clamp
GLM_FUNC_QUALIFIER detail::tvec2<T> clamp
(
detail::tvec2<T> const & x,
typename detail::tvec2<T>::value_type const & minVal,
@ -750,7 +750,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> clamp
GLM_FUNC_QUALIFIER detail::tvec3<T> clamp
(
detail::tvec3<T> const & x,
typename detail::tvec3<T>::value_type const & minVal,
@ -764,7 +764,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> clamp
GLM_FUNC_QUALIFIER detail::tvec4<T> clamp
(
detail::tvec4<T> const & x,
typename detail::tvec4<T>::value_type const & minVal,
@ -779,7 +779,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> clamp
GLM_FUNC_QUALIFIER detail::tvec2<T> clamp
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & minVal,
@ -792,7 +792,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> clamp
GLM_FUNC_QUALIFIER detail::tvec3<T> clamp
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & minVal,
@ -806,7 +806,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> clamp
GLM_FUNC_QUALIFIER detail::tvec4<T> clamp
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & minVal,
@ -822,7 +822,7 @@ namespace glm
// mix
template <typename genTypeT, typename genTypeU>
inline genTypeT mix
GLM_FUNC_QUALIFIER genTypeT mix
(
genTypeT const & x,
genTypeT const & y,
@ -839,7 +839,7 @@ namespace glm
}
template <typename valTypeA, typename valTypeB>
inline detail::tvec2<valTypeA> mix
GLM_FUNC_QUALIFIER detail::tvec2<valTypeA> mix
(
detail::tvec2<valTypeA> const & x,
detail::tvec2<valTypeA> const & y,
@ -851,7 +851,7 @@ namespace glm
}
template <typename valTypeA, typename valTypeB>
inline detail::tvec3<valTypeA> mix
GLM_FUNC_QUALIFIER detail::tvec3<valTypeA> mix
(
detail::tvec3<valTypeA> const & x,
detail::tvec3<valTypeA> const & y,
@ -863,7 +863,7 @@ namespace glm
}
template <typename valTypeA, typename valTypeB>
inline detail::tvec4<valTypeA> mix
GLM_FUNC_QUALIFIER detail::tvec4<valTypeA> mix
(
detail::tvec4<valTypeA> const & x,
detail::tvec4<valTypeA> const & y,
@ -875,7 +875,7 @@ namespace glm
}
template <typename valTypeA, typename valTypeB>
inline detail::tvec2<valTypeA> mix
GLM_FUNC_QUALIFIER detail::tvec2<valTypeA> mix
(
detail::tvec2<valTypeA> const & x,
detail::tvec2<valTypeA> const & y,
@ -887,7 +887,7 @@ namespace glm
}
template <typename valTypeA, typename valTypeB>
inline detail::tvec3<valTypeA> mix
GLM_FUNC_QUALIFIER detail::tvec3<valTypeA> mix
(
detail::tvec3<valTypeA> const & x,
detail::tvec3<valTypeA> const & y,
@ -899,7 +899,7 @@ namespace glm
}
template <typename valTypeA, typename valTypeB>
inline detail::tvec4<valTypeA> mix
GLM_FUNC_QUALIFIER detail::tvec4<valTypeA> mix
(
detail::tvec4<valTypeA> const & x,
detail::tvec4<valTypeA> const & y,
@ -911,7 +911,7 @@ namespace glm
}
//template <typename genTypeT>
//inline genTypeT mix
//GLM_FUNC_QUALIFIER genTypeT mix
//(
// genTypeT const & x,
// genTypeT const & y,
@ -927,7 +927,7 @@ namespace glm
//}
template <typename genType>
inline genType mix
GLM_FUNC_QUALIFIER genType mix
(
genType const & x,
genType const & y,
@ -940,7 +940,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> mix
GLM_FUNC_QUALIFIER detail::tvec2<T> mix
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y,
@ -963,7 +963,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> mix
GLM_FUNC_QUALIFIER detail::tvec3<T> mix
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y,
@ -986,7 +986,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> mix
GLM_FUNC_QUALIFIER detail::tvec4<T> mix
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y,
@ -1010,7 +1010,7 @@ namespace glm
// step
template <typename genType>
inline genType step
GLM_FUNC_QUALIFIER genType step
(
genType const & edge,
genType const & x
@ -1022,7 +1022,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> step
GLM_FUNC_QUALIFIER detail::tvec2<T> step
(
typename detail::tvec2<T>::value_type const & edge,
detail::tvec2<T> const & x
@ -1034,7 +1034,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> step
GLM_FUNC_QUALIFIER detail::tvec3<T> step
(
typename detail::tvec3<T>::value_type const & edge,
detail::tvec3<T> const & x
@ -1047,7 +1047,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> step
GLM_FUNC_QUALIFIER detail::tvec4<T> step
(
typename detail::tvec4<T>::value_type const & edge,
detail::tvec4<T> const & x
@ -1061,7 +1061,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> step
GLM_FUNC_QUALIFIER detail::tvec2<T> step
(
detail::tvec2<T> const & edge,
detail::tvec2<T> const & x
@ -1073,7 +1073,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> step
GLM_FUNC_QUALIFIER detail::tvec3<T> step
(
detail::tvec3<T> const & edge,
detail::tvec3<T> const & x
@ -1086,7 +1086,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> step
GLM_FUNC_QUALIFIER detail::tvec4<T> step
(
detail::tvec4<T> const & edge,
detail::tvec4<T> const & x
@ -1101,7 +1101,7 @@ namespace glm
// smoothstep
template <typename genType>
inline genType smoothstep
GLM_FUNC_QUALIFIER genType smoothstep
(
genType const & edge0,
genType const & edge1,
@ -1115,7 +1115,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> smoothstep
GLM_FUNC_QUALIFIER detail::tvec2<T> smoothstep
(
typename detail::tvec2<T>::value_type const & edge0,
typename detail::tvec2<T>::value_type const & edge1,
@ -1128,7 +1128,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> smoothstep
GLM_FUNC_QUALIFIER detail::tvec3<T> smoothstep
(
typename detail::tvec3<T>::value_type const & edge0,
typename detail::tvec3<T>::value_type const & edge1,
@ -1142,7 +1142,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> smoothstep
GLM_FUNC_QUALIFIER detail::tvec4<T> smoothstep
(
typename detail::tvec4<T>::value_type const & edge0,
typename detail::tvec4<T>::value_type const & edge1,
@ -1157,7 +1157,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> smoothstep
GLM_FUNC_QUALIFIER detail::tvec2<T> smoothstep
(
detail::tvec2<T> const & edge0,
detail::tvec2<T> const & edge1,
@ -1170,7 +1170,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> smoothstep
GLM_FUNC_QUALIFIER detail::tvec3<T> smoothstep
(
detail::tvec3<T> const & edge0,
detail::tvec3<T> const & edge1,
@ -1184,7 +1184,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> smoothstep
GLM_FUNC_QUALIFIER detail::tvec4<T> smoothstep
(
detail::tvec4<T> const & edge0,
detail::tvec4<T> const & edge1,
@ -1199,7 +1199,7 @@ namespace glm
}
template <typename genType>
inline typename genType::bool_type isnan
GLM_FUNC_QUALIFIER typename genType::bool_type isnan
(
genType const & x
)
@ -1214,7 +1214,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec2<T>::bool_type isnan
GLM_FUNC_QUALIFIER typename detail::tvec2<T>::bool_type isnan
(
detail::tvec2<T> const & x
)
@ -1225,7 +1225,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec3<T>::bool_type isnan
GLM_FUNC_QUALIFIER typename detail::tvec3<T>::bool_type isnan
(
detail::tvec3<T> const & x
)
@ -1237,7 +1237,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec4<T>::bool_type isnan
GLM_FUNC_QUALIFIER typename detail::tvec4<T>::bool_type isnan
(
detail::tvec4<T> const & x
)
@ -1250,7 +1250,7 @@ namespace glm
}
template <typename genType>
inline typename genType::bool_type isinf
GLM_FUNC_QUALIFIER typename genType::bool_type isinf
(
genType const & x
)
@ -1265,7 +1265,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec2<T>::bool_type isinf
GLM_FUNC_QUALIFIER typename detail::tvec2<T>::bool_type isinf
(
detail::tvec2<T> const & x
)
@ -1276,7 +1276,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec3<T>::bool_type isinf
GLM_FUNC_QUALIFIER typename detail::tvec3<T>::bool_type isinf
(
detail::tvec3<T> const & x
)
@ -1288,7 +1288,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec4<T>::bool_type isinf
GLM_FUNC_QUALIFIER typename detail::tvec4<T>::bool_type isinf
(
detail::tvec4<T> const & x
)
@ -1300,7 +1300,7 @@ namespace glm
isnan(x.w));
}
inline int floatBitsToInt(float const & value)
GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value)
{
union
{
@ -1313,7 +1313,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<int> floatBitsToInt
GLM_FUNC_QUALIFIER detail::tvec2<int> floatBitsToInt
(
detail::tvec2<T> const & value
)
@ -1324,7 +1324,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<int> floatBitsToInt
GLM_FUNC_QUALIFIER detail::tvec3<int> floatBitsToInt
(
detail::tvec3<T> const & value
)
@ -1335,7 +1335,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<int> floatBitsToInt
GLM_FUNC_QUALIFIER detail::tvec4<int> floatBitsToInt
(
detail::tvec4<T> const & value
)
@ -1345,7 +1345,7 @@ namespace glm
floatBitsToInt(value.y));
}
inline uint floatBitsToUint(float const & value)
GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value)
{
union
{
@ -1358,7 +1358,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<uint> floatBitsToUint
GLM_FUNC_QUALIFIER detail::tvec2<uint> floatBitsToUint
(
detail::tvec2<T> const & value
)
@ -1369,7 +1369,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<uint> floatBitsToUint
GLM_FUNC_QUALIFIER detail::tvec3<uint> floatBitsToUint
(
detail::tvec3<T> const & value
)
@ -1380,7 +1380,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<uint> floatBitsToUint
GLM_FUNC_QUALIFIER detail::tvec4<uint> floatBitsToUint
(
detail::tvec4<T> const & value
)
@ -1390,7 +1390,7 @@ namespace glm
floatBitsToUint(value.y));
}
inline float intBitsToFloat(int const & value)
GLM_FUNC_QUALIFIER float intBitsToFloat(int const & value)
{
union
{
@ -1402,7 +1402,7 @@ namespace glm
return fi.f;
}
inline float intBitsToFloat(uint const & value)
GLM_FUNC_QUALIFIER float intBitsToFloat(uint const & value)
{
union
{
@ -1415,7 +1415,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<float> intBitsToFloat
GLM_FUNC_QUALIFIER detail::tvec2<float> intBitsToFloat
(
detail::tvec2<T> const & value
)
@ -1426,7 +1426,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<float> intBitsToFloat
GLM_FUNC_QUALIFIER detail::tvec3<float> intBitsToFloat
(
detail::tvec3<T> const & value
)
@ -1437,7 +1437,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<float> intBitsToFloat
GLM_FUNC_QUALIFIER detail::tvec4<float> intBitsToFloat
(
detail::tvec4<T> const & value
)
@ -1448,7 +1448,7 @@ namespace glm
}
template <typename genType>
inline genType fma
GLM_FUNC_QUALIFIER genType fma
(
genType const & a,
genType const & b,

View File

@ -15,7 +15,7 @@ namespace glm
// pow
template <typename genType>
inline genType pow
GLM_FUNC_QUALIFIER genType pow
(
genType const & x,
genType const & y
@ -27,7 +27,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> pow
GLM_FUNC_QUALIFIER detail::tvec2<T> pow
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y
@ -39,7 +39,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> pow
GLM_FUNC_QUALIFIER detail::tvec3<T> pow
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y
@ -52,7 +52,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> pow
GLM_FUNC_QUALIFIER detail::tvec4<T> pow
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y
@ -67,7 +67,7 @@ namespace glm
// exp
template <typename genType>
inline genType exp
GLM_FUNC_QUALIFIER genType exp
(
genType const & x
)
@ -78,7 +78,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> exp
GLM_FUNC_QUALIFIER detail::tvec2<T> exp
(
detail::tvec2<T> const & x
)
@ -89,7 +89,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> exp
GLM_FUNC_QUALIFIER detail::tvec3<T> exp
(
detail::tvec3<T> const & x
)
@ -101,7 +101,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> exp
GLM_FUNC_QUALIFIER detail::tvec4<T> exp
(
detail::tvec4<T> const & x
)
@ -115,7 +115,7 @@ namespace glm
// log
template <typename genType>
inline genType log
GLM_FUNC_QUALIFIER genType log
(
genType const & x
)
@ -126,7 +126,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> log
GLM_FUNC_QUALIFIER detail::tvec2<T> log
(
detail::tvec2<T> const & x
)
@ -137,7 +137,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> log
GLM_FUNC_QUALIFIER detail::tvec3<T> log
(
detail::tvec3<T> const & x
)
@ -149,7 +149,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> log
GLM_FUNC_QUALIFIER detail::tvec4<T> log
(
detail::tvec4<T> const & x
)
@ -163,7 +163,7 @@ namespace glm
//exp2, ln2 = 0.69314718055994530941723212145818f
template <typename genType>
inline genType exp2
GLM_FUNC_QUALIFIER genType exp2
(
genType const & x
)
@ -174,7 +174,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> exp2
GLM_FUNC_QUALIFIER detail::tvec2<T> exp2
(
detail::tvec2<T> const & x
)
@ -185,7 +185,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> exp2
GLM_FUNC_QUALIFIER detail::tvec3<T> exp2
(
detail::tvec3<T> const & x
)
@ -197,7 +197,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> exp2
GLM_FUNC_QUALIFIER detail::tvec4<T> exp2
(
detail::tvec4<T> const & x
)
@ -211,7 +211,7 @@ namespace glm
// log2, ln2 = 0.69314718055994530941723212145818f
template <typename genType>
inline genType log2
GLM_FUNC_QUALIFIER genType log2
(
genType const & x
)
@ -222,7 +222,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> log2
GLM_FUNC_QUALIFIER detail::tvec2<T> log2
(
detail::tvec2<T> const & x
)
@ -233,7 +233,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> log2
GLM_FUNC_QUALIFIER detail::tvec3<T> log2
(
detail::tvec3<T> const & x
)
@ -245,7 +245,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> log2
GLM_FUNC_QUALIFIER detail::tvec4<T> log2
(
detail::tvec4<T> const & x
)
@ -259,7 +259,7 @@ namespace glm
// sqrt
template <typename genType>
inline genType sqrt
GLM_FUNC_QUALIFIER genType sqrt
(
genType const & x
)
@ -270,7 +270,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> sqrt
GLM_FUNC_QUALIFIER detail::tvec2<T> sqrt
(
detail::tvec2<T> const & x
)
@ -281,7 +281,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> sqrt
GLM_FUNC_QUALIFIER detail::tvec3<T> sqrt
(
detail::tvec3<T> const & x
)
@ -293,7 +293,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> sqrt
GLM_FUNC_QUALIFIER detail::tvec4<T> sqrt
(
detail::tvec4<T> const & x
)
@ -306,7 +306,7 @@ namespace glm
}
template <typename genType>
inline genType inversesqrt
GLM_FUNC_QUALIFIER genType inversesqrt
(
genType const & x
)
@ -317,7 +317,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> inversesqrt
GLM_FUNC_QUALIFIER detail::tvec2<T> inversesqrt
(
detail::tvec2<T> const & x
)
@ -328,7 +328,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> inversesqrt
GLM_FUNC_QUALIFIER detail::tvec3<T> inversesqrt
(
detail::tvec3<T> const & x
)
@ -340,7 +340,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> inversesqrt
GLM_FUNC_QUALIFIER detail::tvec4<T> inversesqrt
(
detail::tvec4<T> const & x
)

View File

@ -15,7 +15,7 @@ namespace glm
// length
template <typename genType>
inline genType length
GLM_FUNC_QUALIFIER genType length
(
genType const & x
)
@ -27,7 +27,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec2<T>::value_type length
GLM_FUNC_QUALIFIER typename detail::tvec2<T>::value_type length
(
detail::tvec2<T> const & v
)
@ -39,7 +39,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec3<T>::value_type length
GLM_FUNC_QUALIFIER typename detail::tvec3<T>::value_type length
(
detail::tvec3<T> const & v
)
@ -51,7 +51,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec4<T>::value_type length
GLM_FUNC_QUALIFIER typename detail::tvec4<T>::value_type length
(
detail::tvec4<T> const & v
)
@ -64,7 +64,7 @@ namespace glm
// distance
template <typename genType>
inline genType distance
GLM_FUNC_QUALIFIER genType distance
(
genType const & p0,
genType const & p1
@ -76,7 +76,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec2<T>::value_type distance
GLM_FUNC_QUALIFIER typename detail::tvec2<T>::value_type distance
(
detail::tvec2<T> const & p0,
detail::tvec2<T> const & p1
@ -88,7 +88,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec3<T>::value_type distance
GLM_FUNC_QUALIFIER typename detail::tvec3<T>::value_type distance
(
detail::tvec3<T> const & p0,
detail::tvec3<T> const & p1
@ -100,7 +100,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec4<T>::value_type distance
GLM_FUNC_QUALIFIER typename detail::tvec4<T>::value_type distance
(
detail::tvec4<T> const & p0,
detail::tvec4<T> const & p1
@ -113,7 +113,7 @@ namespace glm
// dot
template <typename genType>
inline genType dot
GLM_FUNC_QUALIFIER genType dot
(
genType const & x,
genType const & y
@ -125,7 +125,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec2<T>::value_type dot
GLM_FUNC_QUALIFIER typename detail::tvec2<T>::value_type dot
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y
@ -137,7 +137,7 @@ namespace glm
}
template <typename T>
inline T dot
GLM_FUNC_QUALIFIER T dot
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y
@ -148,7 +148,7 @@ namespace glm
return x.x * y.x + x.y * y.y + x.z * y.z;
}
/* // SSE3
inline float dot(const tvec4<float>& x, const tvec4<float>& y)
GLM_FUNC_QUALIFIER float dot(const tvec4<float>& x, const tvec4<float>& y)
{
float Result;
__asm
@ -165,7 +165,7 @@ namespace glm
}
*/
template <typename T>
inline T dot
GLM_FUNC_QUALIFIER T dot
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y
@ -178,7 +178,7 @@ namespace glm
// cross
template <typename T>
inline detail::tvec3<T> cross
GLM_FUNC_QUALIFIER detail::tvec3<T> cross
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y
@ -194,7 +194,7 @@ namespace glm
// normalize
template <typename genType>
inline genType normalize
GLM_FUNC_QUALIFIER genType normalize
(
genType const & x
)
@ -206,7 +206,7 @@ namespace glm
// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error
template <typename T>
inline detail::tvec2<T> normalize
GLM_FUNC_QUALIFIER detail::tvec2<T> normalize
(
detail::tvec2<T> const & x
)
@ -218,7 +218,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> normalize
GLM_FUNC_QUALIFIER detail::tvec3<T> normalize
(
detail::tvec3<T> const & x
)
@ -230,7 +230,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> normalize
GLM_FUNC_QUALIFIER detail::tvec4<T> normalize
(
detail::tvec4<T> const & x
)
@ -243,7 +243,7 @@ namespace glm
// faceforward
template <typename genType>
inline genType faceforward
GLM_FUNC_QUALIFIER genType faceforward
(
genType const & N,
genType const & I,
@ -266,7 +266,7 @@ namespace glm
// refract
template <typename genType>
inline genType refract
GLM_FUNC_QUALIFIER genType refract
(
genType const & I,
genType const & N,

View File

@ -20,7 +20,7 @@ namespace glm
{
// uaddCarry
template <typename genUType>
inline genUType uaddCarry
GLM_FUNC_QUALIFIER genUType uaddCarry
(
genUType const & x,
genUType const & y,
@ -34,7 +34,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> uaddCarry
GLM_FUNC_QUALIFIER detail::tvec2<T> uaddCarry
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y,
@ -47,7 +47,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> uaddCarry
GLM_FUNC_QUALIFIER detail::tvec3<T> uaddCarry
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y,
@ -61,7 +61,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> uaddCarry
GLM_FUNC_QUALIFIER detail::tvec4<T> uaddCarry
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y,
@ -77,7 +77,7 @@ namespace glm
// usubBorrow
template <typename genUType>
inline genUType usubBorrow
GLM_FUNC_QUALIFIER genUType usubBorrow
(
genUType const & x,
genUType const & y,
@ -92,7 +92,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> usubBorrow
GLM_FUNC_QUALIFIER detail::tvec2<T> usubBorrow
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y,
@ -105,7 +105,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> usubBorrow
GLM_FUNC_QUALIFIER detail::tvec3<T> usubBorrow
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y,
@ -119,7 +119,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> usubBorrow
GLM_FUNC_QUALIFIER detail::tvec4<T> usubBorrow
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y,
@ -135,7 +135,7 @@ namespace glm
// umulExtended
template <typename genUType>
inline void umulExtended
GLM_FUNC_QUALIFIER void umulExtended
(
genUType const & x,
genUType const & y,
@ -151,7 +151,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> umulExtended
GLM_FUNC_QUALIFIER detail::tvec2<T> umulExtended
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y,
@ -165,7 +165,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> umulExtended
GLM_FUNC_QUALIFIER detail::tvec3<T> umulExtended
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y,
@ -180,7 +180,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> umulExtended
GLM_FUNC_QUALIFIER detail::tvec4<T> umulExtended
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y,
@ -213,7 +213,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> imulExtended
GLM_FUNC_QUALIFIER detail::tvec2<T> imulExtended
(
detail::tvec2<T> const & x,
detail::tvec2<T> const & y,
@ -227,7 +227,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> imulExtended
GLM_FUNC_QUALIFIER detail::tvec3<T> imulExtended
(
detail::tvec3<T> const & x,
detail::tvec3<T> const & y,
@ -242,7 +242,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> imulExtended
GLM_FUNC_QUALIFIER detail::tvec4<T> imulExtended
(
detail::tvec4<T> const & x,
detail::tvec4<T> const & y,
@ -281,7 +281,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> bitfieldExtract
GLM_FUNC_QUALIFIER detail::tvec2<T> bitfieldExtract
(
detail::tvec2<T> const & Value,
int const & Offset,
@ -294,7 +294,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> bitfieldExtract
GLM_FUNC_QUALIFIER detail::tvec3<T> bitfieldExtract
(
detail::tvec3<T> const & Value,
int const & Offset,
@ -308,7 +308,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> bitfieldExtract
GLM_FUNC_QUALIFIER detail::tvec4<T> bitfieldExtract
(
detail::tvec4<T> const & Value,
int const & Offset,
@ -324,7 +324,7 @@ namespace glm
// bitfieldInsert
template <typename genIUType>
inline genIUType bitfieldInsert
GLM_FUNC_QUALIFIER genIUType bitfieldInsert
(
genIUType const & Base,
genIUType const & Insert,
@ -346,7 +346,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> bitfieldInsert
GLM_FUNC_QUALIFIER detail::tvec2<T> bitfieldInsert
(
detail::tvec2<T> const & Base,
detail::tvec2<T> const & Insert,
@ -360,7 +360,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> bitfieldInsert
GLM_FUNC_QUALIFIER detail::tvec3<T> bitfieldInsert
(
detail::tvec3<T> const & Base,
detail::tvec3<T> const & Insert,
@ -375,7 +375,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> bitfieldInsert
GLM_FUNC_QUALIFIER detail::tvec4<T> bitfieldInsert
(
detail::tvec4<T> const & Base,
detail::tvec4<T> const & Insert,
@ -392,7 +392,7 @@ namespace glm
// bitfieldReverse
template <typename genIUType>
inline genIUType bitfieldReverse(genIUType const & Value)
GLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value)
{
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'bitfieldReverse' only accept integer values");
@ -404,7 +404,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> bitfieldReverse
GLM_FUNC_QUALIFIER detail::tvec2<T> bitfieldReverse
(
detail::tvec2<T> const & value
)
@ -415,7 +415,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> bitfieldReverse
GLM_FUNC_QUALIFIER detail::tvec3<T> bitfieldReverse
(
detail::tvec3<T> const & value
)
@ -427,7 +427,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> bitfieldReverse
GLM_FUNC_QUALIFIER detail::tvec4<T> bitfieldReverse
(
detail::tvec4<T> const & value
)
@ -455,7 +455,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<int> bitCount
GLM_FUNC_QUALIFIER detail::tvec2<int> bitCount
(
detail::tvec2<T> const & value
)
@ -466,7 +466,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<int> bitCount
GLM_FUNC_QUALIFIER detail::tvec3<int> bitCount
(
detail::tvec3<T> const & value
)
@ -478,7 +478,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<int> bitCount
GLM_FUNC_QUALIFIER detail::tvec4<int> bitCount
(
detail::tvec4<T> const & value
)
@ -492,7 +492,7 @@ namespace glm
// findLSB
template <typename genIUType>
inline int findLSB
GLM_FUNC_QUALIFIER int findLSB
(
genIUType const & Value
)
@ -507,7 +507,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<int> findLSB
GLM_FUNC_QUALIFIER detail::tvec2<int> findLSB
(
detail::tvec2<T> const & value
)
@ -518,7 +518,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<int> findLSB
GLM_FUNC_QUALIFIER detail::tvec3<int> findLSB
(
detail::tvec3<T> const & value
)
@ -530,7 +530,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<int> findLSB
GLM_FUNC_QUALIFIER detail::tvec4<int> findLSB
(
detail::tvec4<T> const & value
)
@ -544,7 +544,7 @@ namespace glm
// findMSB
template <typename genIUType>
inline int findMSB
GLM_FUNC_QUALIFIER int findMSB
(
genIUType const & Value
)
@ -559,7 +559,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<int> findMSB
GLM_FUNC_QUALIFIER detail::tvec2<int> findMSB
(
detail::tvec2<T> const & value
)
@ -570,7 +570,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<int> findMSB
GLM_FUNC_QUALIFIER detail::tvec3<int> findMSB
(
detail::tvec3<T> const & value
)
@ -582,7 +582,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<int> findMSB
GLM_FUNC_QUALIFIER detail::tvec4<int> findMSB
(
detail::tvec4<T> const & value
)

View File

@ -15,7 +15,7 @@ namespace glm
// matrixCompMult
template <typename matType>
inline matType matrixCompMult
GLM_FUNC_QUALIFIER matType matrixCompMult
(
matType const & x,
matType const & y
@ -31,7 +31,7 @@ namespace glm
// outerProduct
template <typename T>
inline detail::tmat2x2<T> outerProduct
GLM_FUNC_QUALIFIER detail::tmat2x2<T> outerProduct
(
detail::tvec2<T> const & c,
detail::tvec2<T> const & r
@ -48,7 +48,7 @@ namespace glm
}
template <typename T>
inline detail::tmat3x3<T> outerProduct
GLM_FUNC_QUALIFIER detail::tmat3x3<T> outerProduct
(
detail::tvec3<T> const & c,
detail::tvec3<T> const & r
@ -63,7 +63,7 @@ namespace glm
}
template <typename T>
inline detail::tmat4x4<T> outerProduct
GLM_FUNC_QUALIFIER detail::tmat4x4<T> outerProduct
(
detail::tvec4<T> const & c,
detail::tvec4<T> const & r
@ -78,7 +78,7 @@ namespace glm
}
template <typename T>
inline detail::tmat2x3<T> outerProduct
GLM_FUNC_QUALIFIER detail::tmat2x3<T> outerProduct
(
detail::tvec3<T> const & c,
detail::tvec2<T> const & r
@ -97,7 +97,7 @@ namespace glm
}
template <typename T>
inline detail::tmat3x2<T> outerProduct
GLM_FUNC_QUALIFIER detail::tmat3x2<T> outerProduct
(
detail::tvec2<T> const & c,
detail::tvec3<T> const & r
@ -116,7 +116,7 @@ namespace glm
}
template <typename T>
inline detail::tmat2x4<T> outerProduct
GLM_FUNC_QUALIFIER detail::tmat2x4<T> outerProduct
(
detail::tvec2<T> const & c,
detail::tvec4<T> const & r
@ -137,7 +137,7 @@ namespace glm
}
template <typename T>
inline detail::tmat4x2<T> outerProduct
GLM_FUNC_QUALIFIER detail::tmat4x2<T> outerProduct
(
detail::tvec4<T> const & c,
detail::tvec2<T> const & r
@ -158,7 +158,7 @@ namespace glm
}
template <typename T>
inline detail::tmat3x4<T> outerProduct
GLM_FUNC_QUALIFIER detail::tmat3x4<T> outerProduct
(
detail::tvec4<T> const & c,
detail::tvec3<T> const & r
@ -183,7 +183,7 @@ namespace glm
}
template <typename T>
inline detail::tmat4x3<T> outerProduct
GLM_FUNC_QUALIFIER detail::tmat4x3<T> outerProduct
(
detail::tvec3<T> const & c,
detail::tvec4<T> const & r
@ -208,7 +208,7 @@ namespace glm
}
template <typename T>
inline detail::tmat2x2<T> transpose
GLM_FUNC_QUALIFIER detail::tmat2x2<T> transpose
(
detail::tmat2x2<T> const & m
)
@ -224,7 +224,7 @@ namespace glm
}
template <typename T>
inline detail::tmat3x3<T> transpose
GLM_FUNC_QUALIFIER detail::tmat3x3<T> transpose
(
detail::tmat3x3<T> const & m
)
@ -247,7 +247,7 @@ namespace glm
}
template <typename T>
inline detail::tmat4x4<T> transpose
GLM_FUNC_QUALIFIER detail::tmat4x4<T> transpose
(
detail::tmat4x4<T> const & m
)
@ -278,7 +278,7 @@ namespace glm
}
template <typename T>
inline detail::tmat2x3<T> transpose
GLM_FUNC_QUALIFIER detail::tmat2x3<T> transpose
(
detail::tmat3x2<T> const & m
)
@ -296,7 +296,7 @@ namespace glm
}
template <typename T>
inline detail::tmat3x2<T> transpose
GLM_FUNC_QUALIFIER detail::tmat3x2<T> transpose
(
detail::tmat2x3<T> const & m
)
@ -314,7 +314,7 @@ namespace glm
}
template <typename T>
inline detail::tmat2x4<T> transpose
GLM_FUNC_QUALIFIER detail::tmat2x4<T> transpose
(
detail::tmat4x2<T> const & m
)
@ -334,7 +334,7 @@ namespace glm
}
template <typename T>
inline detail::tmat4x2<T> transpose
GLM_FUNC_QUALIFIER detail::tmat4x2<T> transpose
(
detail::tmat2x4<T> const & m
)
@ -354,7 +354,7 @@ namespace glm
}
template <typename T>
inline detail::tmat3x4<T> transpose
GLM_FUNC_QUALIFIER detail::tmat3x4<T> transpose
(
detail::tmat4x3<T> const & m
)
@ -378,7 +378,7 @@ namespace glm
}
template <typename T>
inline detail::tmat4x3<T> transpose
GLM_FUNC_QUALIFIER detail::tmat4x3<T> transpose
(
detail::tmat3x4<T> const & m
)
@ -402,7 +402,7 @@ namespace glm
}
template <typename T>
inline typename detail::tmat2x2<T>::value_type determinant
GLM_FUNC_QUALIFIER typename detail::tmat2x2<T>::value_type determinant
(
detail::tmat2x2<T> const & m
)
@ -413,7 +413,7 @@ namespace glm
}
template <typename T>
inline typename detail::tmat3x3<T>::value_type determinant
GLM_FUNC_QUALIFIER typename detail::tmat3x3<T>::value_type determinant
(
detail::tmat3x3<T> const & m
)
@ -427,7 +427,7 @@ namespace glm
}
template <typename T>
inline typename detail::tmat4x4<T>::value_type determinant
GLM_FUNC_QUALIFIER typename detail::tmat4x4<T>::value_type determinant
(
detail::tmat4x4<T> const & m
)
@ -454,7 +454,7 @@ namespace glm
}
template <typename T>
inline detail::tmat2x2<T> inverse
GLM_FUNC_QUALIFIER detail::tmat2x2<T> inverse
(
detail::tmat2x2<T> const & m
)
@ -474,7 +474,7 @@ namespace glm
}
template <typename T>
inline detail::tmat3x3<T> inverse
GLM_FUNC_QUALIFIER detail::tmat3x3<T> inverse
(
detail::tmat3x3<T> const & m
)
@ -503,7 +503,7 @@ namespace glm
}
template <typename T>
inline detail::tmat4x4<T> inverse
GLM_FUNC_QUALIFIER detail::tmat4x4<T> inverse
(
detail::tmat4x4<T> const & m
)

View File

@ -15,7 +15,7 @@ namespace glm
// noise1
template <typename genType>
inline genType noise1
GLM_FUNC_QUALIFIER genType noise1
(
genType const & x
)
@ -27,7 +27,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec2<T>::value_type noise1
GLM_FUNC_QUALIFIER typename detail::tvec2<T>::value_type noise1
(
detail::tvec2<T> const & x
)
@ -39,7 +39,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec3<T>::value_type noise1
GLM_FUNC_QUALIFIER typename detail::tvec3<T>::value_type noise1
(
detail::tvec3<T> const & x
)
@ -51,7 +51,7 @@ namespace glm
}
template <typename T>
inline typename detail::tvec4<T>::value_type noise1
GLM_FUNC_QUALIFIER typename detail::tvec4<T>::value_type noise1
(
detail::tvec4<T> const & x
)
@ -64,7 +64,7 @@ namespace glm
// noise2
template <typename genType>
inline detail::tvec2<genType> noise2
GLM_FUNC_QUALIFIER detail::tvec2<genType> noise2
(
genType const & x
)
@ -79,7 +79,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> noise2
GLM_FUNC_QUALIFIER detail::tvec2<T> noise2
(
detail::tvec2<T> const & x
)
@ -98,7 +98,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> noise2
GLM_FUNC_QUALIFIER detail::tvec2<T> noise2
(
detail::tvec3<T> const & x
)
@ -117,7 +117,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> noise2
GLM_FUNC_QUALIFIER detail::tvec2<T> noise2
(
detail::tvec4<T> const & x
)
@ -137,7 +137,7 @@ namespace glm
// noise3
template <typename genType>
inline detail::tvec3<genType> noise3
GLM_FUNC_QUALIFIER detail::tvec3<genType> noise3
(
genType const & x
)
@ -154,7 +154,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> noise3
GLM_FUNC_QUALIFIER detail::tvec3<T> noise3
(
detail::tvec2<T> const & x
)
@ -174,7 +174,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> noise3
GLM_FUNC_QUALIFIER detail::tvec3<T> noise3
(
detail::tvec3<T> const & x
)
@ -194,7 +194,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> noise3
GLM_FUNC_QUALIFIER detail::tvec3<T> noise3
(
detail::tvec4<T> const & x
)
@ -215,7 +215,7 @@ namespace glm
// noise4
template <typename genType>
inline detail::tvec4<genType> noise4
GLM_FUNC_QUALIFIER detail::tvec4<genType> noise4
(
genType const & x
)
@ -234,7 +234,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> noise4
GLM_FUNC_QUALIFIER detail::tvec4<T> noise4
(
detail::tvec2<T> const & x
)
@ -256,7 +256,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> noise4
GLM_FUNC_QUALIFIER detail::tvec4<T> noise4
(
detail::tvec3<T> const & x
)
@ -278,7 +278,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> noise4
GLM_FUNC_QUALIFIER detail::tvec4<T> noise4
(
detail::tvec4<T> const & x
)

View File

@ -18,14 +18,14 @@ namespace glm
namespace function{
namespace packing
{
inline detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> const & v)
GLM_FUNC_QUALIFIER detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> const & v)
{
detail::uint16 A((detail::uint16)round(clamp(v.x, 0.0f, 1.0f) * 65535.0f));
detail::uint16 B((detail::uint16)round(clamp(v.y, 0.0f, 1.0f) * 65535.0f));
return detail::uint32((B << 16) | A);
}
inline detail::uint32 packUnorm4x8(detail::tvec4<detail::float32> const & v)
GLM_FUNC_QUALIFIER detail::uint32 packUnorm4x8(detail::tvec4<detail::float32> const & v)
{
detail::uint8 A((detail::uint8)round(clamp(v.x, 0.0f, 1.0f) * 255.0f));
detail::uint8 B((detail::uint8)round(clamp(v.y, 0.0f, 1.0f) * 255.0f));
@ -34,7 +34,7 @@ namespace glm
return detail::uint32((D << 24) | (C << 16) | (B << 8) | A);
}
inline detail::uint32 packSnorm4x8(detail::tvec4<detail::float32> const & v)
GLM_FUNC_QUALIFIER detail::uint32 packSnorm4x8(detail::tvec4<detail::float32> const & v)
{
detail::uint8 A((detail::uint8)round(clamp(v.x,-1.0f, 1.0f) * 255.0f));
detail::uint8 B((detail::uint8)round(clamp(v.y,-1.0f, 1.0f) * 255.0f));
@ -43,7 +43,7 @@ namespace glm
return detail::uint32((D << 24) | (C << 16) | (B << 8) | A);
}
inline detail::tvec2<detail::float32> unpackUnorm2x16(detail::uint32 const & p)
GLM_FUNC_QUALIFIER detail::tvec2<detail::float32> unpackUnorm2x16(detail::uint32 const & p)
{
detail::uint16 A(detail::uint16(p >> 0));
detail::uint16 B(detail::uint16(p >> 16));
@ -52,7 +52,7 @@ namespace glm
B * 1.0f / 65535.0f);
}
inline detail::tvec4<detail::float32> unpackUnorm4x8(detail::uint32 const & p)
GLM_FUNC_QUALIFIER detail::tvec4<detail::float32> unpackUnorm4x8(detail::uint32 const & p)
{
detail::uint8 A(detail::uint8(p >> 0));
detail::uint8 B(detail::uint8(p >> 8));
@ -65,7 +65,7 @@ namespace glm
D * 1.0f / 255.0f);
}
inline detail::tvec4<detail::float32> unpackSnorm4x8(detail::uint32 const & p)
GLM_FUNC_QUALIFIER detail::tvec4<detail::float32> unpackSnorm4x8(detail::uint32 const & p)
{
detail::uint8 A(detail::uint8(p >> 0));
detail::uint8 B(detail::uint8(p >> 8));
@ -78,12 +78,12 @@ namespace glm
D * 1.0f / 127.0f), -1.0f, 1.0f);
}
inline double packDouble2x32(detail::tvec2<detail::uint32> const & v)
GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2<detail::uint32> const & v)
{
return *(double*)&v;
}
inline detail::tvec2<detail::uint32> unpackDouble2x32(double const & v)
GLM_FUNC_QUALIFIER detail::tvec2<detail::uint32> unpackDouble2x32(double const & v)
{
return *(detail::tvec2<detail::uint32>*)&v;
}

View File

@ -15,7 +15,7 @@ namespace glm
// radians
template <typename genType>
inline genType radians
GLM_FUNC_QUALIFIER genType radians
(
genType const & degrees
)
@ -27,7 +27,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> radians
GLM_FUNC_QUALIFIER detail::tvec2<T> radians
(
detail::tvec2<T> const & degrees
)
@ -38,7 +38,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> radians
GLM_FUNC_QUALIFIER detail::tvec3<T> radians
(
detail::tvec3<T> const & degrees
)
@ -50,7 +50,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> radians
GLM_FUNC_QUALIFIER detail::tvec4<T> radians
(
detail::tvec4<T> const & degrees
)
@ -64,7 +64,7 @@ namespace glm
// degrees
template <typename genType>
inline genType degrees
GLM_FUNC_QUALIFIER genType degrees
(
genType const & radians
)
@ -76,7 +76,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> degrees
GLM_FUNC_QUALIFIER detail::tvec2<T> degrees
(
detail::tvec2<T> const & radians
)
@ -87,7 +87,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> degrees
GLM_FUNC_QUALIFIER detail::tvec3<T> degrees
(
detail::tvec3<T> const & radians
)
@ -99,7 +99,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> degrees
GLM_FUNC_QUALIFIER detail::tvec4<T> degrees
(
detail::tvec4<T> const & radians
)
@ -113,7 +113,7 @@ namespace glm
// sin
template <typename genType>
inline genType sin
GLM_FUNC_QUALIFIER genType sin
(
genType const & angle
)
@ -124,7 +124,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> sin
GLM_FUNC_QUALIFIER detail::tvec2<T> sin
(
detail::tvec2<T> const & angle
)
@ -135,7 +135,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> sin
GLM_FUNC_QUALIFIER detail::tvec3<T> sin
(
detail::tvec3<T> const & angle
)
@ -147,7 +147,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> sin
GLM_FUNC_QUALIFIER detail::tvec4<T> sin
(
detail::tvec4<T> const & angle
)
@ -161,7 +161,7 @@ namespace glm
// cos
template <typename genType>
inline genType cos(genType const & angle)
GLM_FUNC_QUALIFIER genType cos(genType const & angle)
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'cos' only accept floating-point input");
@ -169,7 +169,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> cos
GLM_FUNC_QUALIFIER detail::tvec2<T> cos
(
detail::tvec2<T> const & angle
)
@ -180,7 +180,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> cos
GLM_FUNC_QUALIFIER detail::tvec3<T> cos
(
detail::tvec3<T> const & angle
)
@ -192,7 +192,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> cos
GLM_FUNC_QUALIFIER detail::tvec4<T> cos
(
detail::tvec4<T> const & angle
)
@ -206,7 +206,7 @@ namespace glm
// tan
template <typename genType>
inline genType tan
GLM_FUNC_QUALIFIER genType tan
(
genType const & angle
)
@ -217,7 +217,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> tan
GLM_FUNC_QUALIFIER detail::tvec2<T> tan
(
detail::tvec2<T> const & angle
)
@ -228,7 +228,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> tan
GLM_FUNC_QUALIFIER detail::tvec3<T> tan
(
detail::tvec3<T> const & angle
)
@ -240,7 +240,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> tan
GLM_FUNC_QUALIFIER detail::tvec4<T> tan
(
detail::tvec4<T> const & angle
)
@ -254,7 +254,7 @@ namespace glm
// asin
template <typename genType>
inline genType asin
GLM_FUNC_QUALIFIER genType asin
(
genType const & x
)
@ -265,7 +265,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> asin
GLM_FUNC_QUALIFIER detail::tvec2<T> asin
(
detail::tvec2<T> const & x
)
@ -276,7 +276,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> asin
GLM_FUNC_QUALIFIER detail::tvec3<T> asin
(
detail::tvec3<T> const & x
)
@ -288,7 +288,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> asin
GLM_FUNC_QUALIFIER detail::tvec4<T> asin
(
detail::tvec4<T> const & x
)
@ -302,7 +302,7 @@ namespace glm
// acos
template <typename genType>
inline genType acos
GLM_FUNC_QUALIFIER genType acos
(
genType const & x
)
@ -313,7 +313,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> acos
GLM_FUNC_QUALIFIER detail::tvec2<T> acos
(
detail::tvec2<T> const & x
)
@ -324,7 +324,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> acos
GLM_FUNC_QUALIFIER detail::tvec3<T> acos
(
detail::tvec3<T> const & x
)
@ -336,7 +336,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> acos
GLM_FUNC_QUALIFIER detail::tvec4<T> acos
(
detail::tvec4<T> const & x
)
@ -350,7 +350,7 @@ namespace glm
// atan
template <typename genType>
inline genType atan
GLM_FUNC_QUALIFIER genType atan
(
genType const & y,
genType const & x
@ -362,7 +362,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> atan
GLM_FUNC_QUALIFIER detail::tvec2<T> atan
(
detail::tvec2<T> const & y,
detail::tvec2<T> const & x
@ -374,7 +374,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> atan
GLM_FUNC_QUALIFIER detail::tvec3<T> atan
(
detail::tvec3<T> const & y,
detail::tvec3<T> const & x
@ -387,7 +387,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> atan
GLM_FUNC_QUALIFIER detail::tvec4<T> atan
(
detail::tvec4<T> const & y,
detail::tvec4<T> const & x
@ -401,7 +401,7 @@ namespace glm
}
template <typename genType>
inline genType atan
GLM_FUNC_QUALIFIER genType atan
(
genType const & x
)
@ -412,7 +412,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> atan
GLM_FUNC_QUALIFIER detail::tvec2<T> atan
(
detail::tvec2<T> const & x
)
@ -423,7 +423,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> atan
GLM_FUNC_QUALIFIER detail::tvec3<T> atan
(
detail::tvec3<T> const & x
)
@ -435,7 +435,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> atan
GLM_FUNC_QUALIFIER detail::tvec4<T> atan
(
detail::tvec4<T> const & x
)
@ -449,7 +449,7 @@ namespace glm
// sinh
template <typename genType>
inline genType sinh
GLM_FUNC_QUALIFIER genType sinh
(
genType const & angle
)
@ -460,7 +460,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> sinh
GLM_FUNC_QUALIFIER detail::tvec2<T> sinh
(
detail::tvec2<T> const & angle
)
@ -471,7 +471,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> sinh
GLM_FUNC_QUALIFIER detail::tvec3<T> sinh
(
detail::tvec3<T> const & angle
)
@ -483,7 +483,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> sinh
GLM_FUNC_QUALIFIER detail::tvec4<T> sinh
(
detail::tvec4<T> const & angle
)
@ -497,7 +497,7 @@ namespace glm
// cosh
template <typename genType>
inline genType cosh
GLM_FUNC_QUALIFIER genType cosh
(
genType const & angle
)
@ -508,7 +508,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> cosh
GLM_FUNC_QUALIFIER detail::tvec2<T> cosh
(
detail::tvec2<T> const & angle
)
@ -519,7 +519,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> cosh
GLM_FUNC_QUALIFIER detail::tvec3<T> cosh
(
detail::tvec3<T> const & angle
)
@ -531,7 +531,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> cosh
GLM_FUNC_QUALIFIER detail::tvec4<T> cosh
(
detail::tvec4<T> const & angle
)
@ -545,7 +545,7 @@ namespace glm
// tanh
template <typename genType>
inline genType tanh
GLM_FUNC_QUALIFIER genType tanh
(
genType const & angle
)
@ -556,7 +556,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> tanh
GLM_FUNC_QUALIFIER detail::tvec2<T> tanh
(
detail::tvec2<T> const & angle
)
@ -567,7 +567,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> tanh
GLM_FUNC_QUALIFIER detail::tvec3<T> tanh
(
detail::tvec3<T> const & angle
)
@ -579,7 +579,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> tanh
GLM_FUNC_QUALIFIER detail::tvec4<T> tanh
(
detail::tvec4<T> const & angle
)
@ -593,7 +593,7 @@ namespace glm
// asinh
template <typename genType>
inline genType asinh
GLM_FUNC_QUALIFIER genType asinh
(
genType const & x
)
@ -604,7 +604,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> asinh
GLM_FUNC_QUALIFIER detail::tvec2<T> asinh
(
detail::tvec2<T> const & x
)
@ -615,7 +615,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> asinh
GLM_FUNC_QUALIFIER detail::tvec3<T> asinh
(
detail::tvec3<T> const & x
)
@ -627,7 +627,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> asinh
GLM_FUNC_QUALIFIER detail::tvec4<T> asinh
(
detail::tvec4<T> const & x
)
@ -641,7 +641,7 @@ namespace glm
// acosh
template <typename genType>
inline genType acosh
GLM_FUNC_QUALIFIER genType acosh
(
genType const & x
)
@ -654,7 +654,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> acosh
GLM_FUNC_QUALIFIER detail::tvec2<T> acosh
(
detail::tvec2<T> const & x
)
@ -665,7 +665,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> acosh
GLM_FUNC_QUALIFIER detail::tvec3<T> acosh
(
detail::tvec3<T> const & x
)
@ -677,7 +677,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> acosh
GLM_FUNC_QUALIFIER detail::tvec4<T> acosh
(
detail::tvec4<T> const & x
)
@ -691,7 +691,7 @@ namespace glm
// atanh
template <typename genType>
inline genType atanh
GLM_FUNC_QUALIFIER genType atanh
(
genType const & x
)
@ -704,7 +704,7 @@ namespace glm
}
template <typename T>
inline detail::tvec2<T> atanh
GLM_FUNC_QUALIFIER detail::tvec2<T> atanh
(
detail::tvec2<T> const & x
)
@ -715,7 +715,7 @@ namespace glm
}
template <typename T>
inline detail::tvec3<T> atanh
GLM_FUNC_QUALIFIER detail::tvec3<T> atanh
(
detail::tvec3<T> const & x
)
@ -727,7 +727,7 @@ namespace glm
}
template <typename T>
inline detail::tvec4<T> atanh
GLM_FUNC_QUALIFIER detail::tvec4<T> atanh
(
detail::tvec4<T> const & x
)

View File

@ -30,7 +30,7 @@ namespace glm
//! Returns the component-wise comparison result of x < y.
//! (From GLSL 1.30.08 specification, section 8.6)
template <typename T, template <typename> class vecType>
inline typename vecType<T>::bool_type lessThan
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type lessThan
(
vecType<T> const & x,
vecType<T> const & y
@ -51,7 +51,7 @@ namespace glm
//! Returns the component-wise comparison of result x <= y.
//! (From GLSL 1.30.08 specification, section 8.6)
template <typename T, template <typename> class vecType>
inline typename vecType<T>::bool_type lessThanEqual
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type lessThanEqual
(
vecType<T> const & x,
vecType<T> const & y
@ -71,7 +71,7 @@ namespace glm
//! Returns the component-wise comparison of result x > y.
//! (From GLSL 1.30.08 specification, section 8.6)
template <typename T, template <typename> class vecType>
inline typename vecType<T>::bool_type greaterThan
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type greaterThan
(
vecType<T> const & x,
vecType<T> const & y
@ -91,7 +91,7 @@ namespace glm
//! Returns the component-wise comparison of result x >= y.
//! (From GLSL 1.30.08 specification, section 8.6)
template <typename T, template <typename> class vecType>
inline typename vecType<T>::bool_type greaterThanEqual
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type greaterThanEqual
(
vecType<T> const & x,
vecType<T> const & y
@ -111,7 +111,7 @@ namespace glm
//! Returns the component-wise comparison of result x == y.
//! (From GLSL 1.30.08 specification, section 8.6)
template <typename T, template <typename> class vecType>
inline typename vecType<T>::bool_type equal
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type equal
(
vecType<T> const & x,
vecType<T> const & y
@ -129,7 +129,7 @@ namespace glm
//! Returns the component-wise comparison of result x != y.
//! (From GLSL 1.30.08 specification, section 8.6)
template <typename T, template <typename> class vecType>
inline typename vecType<T>::bool_type notEqual
GLM_FUNC_QUALIFIER typename vecType<T>::bool_type notEqual
(
vecType<T> const & x,
vecType<T> const & y
@ -147,7 +147,7 @@ namespace glm
//! Returns true if any component of x is true.
//! (From GLSL 1.30.08 specification, section 8.6)
template <template <typename> class vecType>
inline bool any(vecType<bool> const & v)
GLM_FUNC_QUALIFIER bool any(vecType<bool> const & v)
{
GLM_STATIC_ASSERT(detail::is_vector<vecType<bool> >::_YES,
"Invalid template instantiation of 'any', GLM boolean vector types required");
@ -161,7 +161,7 @@ namespace glm
//! Returns true if all components of x are true.
//! (From GLSL 1.30.08 specification, section 8.6)
template <template <typename> class vecType>
inline bool all(vecType<bool> const & v)
GLM_FUNC_QUALIFIER bool all(vecType<bool> const & v)
{
GLM_STATIC_ASSERT(detail::is_vector<vecType<bool> >::_YES,
"Invalid template instantiation of 'all', GLM boolean vector types required");
@ -175,7 +175,7 @@ namespace glm
//! Returns the component-wise logical complement of x.
//! (From GLSL 1.30.08 specification, section 8.6)
template <template <typename> class vecType>
inline vecType<bool> not_(vecType<bool> const & v)
GLM_FUNC_QUALIFIER vecType<bool> not_(vecType<bool> const & v)
{
GLM_STATIC_ASSERT(detail::is_vector<vecType<bool> >::_YES,
"Invalid template instantiation of 'not_', GLM vector types required");

View File

@ -45,9 +45,9 @@ namespace detail
__m128 sse_modf_ps(__m128 x, __m128i & i);
//inline __m128 sse_min_ps(__m128 x, __m128 y)
//GLM_FUNC_QUALIFIER __m128 sse_min_ps(__m128 x, __m128 y)
//inline __m128 sse_max_ps(__m128 x, __m128 y)
//GLM_FUNC_QUALIFIER __m128 sse_max_ps(__m128 x, __m128 y)
__m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal);

View File

@ -123,12 +123,12 @@ namespace detail{
static const __m128 _ps_log_c0 = _mm_set_ps1(0.693147180559945f);
static const __m128 _ps_log2_c0 = _mm_set_ps1(1.44269504088896340735992f);
inline __m128 sse_abs_ps(__m128 x)
GLM_FUNC_QUALIFIER __m128 sse_abs_ps(__m128 x)
{
return _mm_and_ps(glm::detail::abs4Mask, x);
}
inline __m128 sse_sgn_ps(__m128 x)
GLM_FUNC_QUALIFIER __m128 sse_sgn_ps(__m128 x)
{
__m128 Neg = _mm_set1_ps(-1.0f);
__m128 Pos = _mm_set1_ps(1.0f);
@ -143,7 +143,7 @@ inline __m128 sse_sgn_ps(__m128 x)
}
//floor
inline __m128 sse_flr_ps(__m128 x)
GLM_FUNC_QUALIFIER __m128 sse_flr_ps(__m128 x)
{
__m128 rnd0 = sse_rnd_ps(x);
__m128 cmp0 = _mm_cmplt_ps(x, rnd0);
@ -154,13 +154,13 @@ inline __m128 sse_flr_ps(__m128 x)
//trunc
/*
inline __m128 _mm_trc_ps(__m128 v)
GLM_FUNC_QUALIFIER __m128 _mm_trc_ps(__m128 v)
{
return __m128();
}
*/
//round
inline __m128 sse_rnd_ps(__m128 x)
GLM_FUNC_QUALIFIER __m128 sse_rnd_ps(__m128 x)
{
__m128 and0 = _mm_and_ps(glm::detail::_epi32_sign_mask, x);
__m128 or0 = _mm_or_ps(and0, glm::detail::_ps_2pow23);
@ -170,12 +170,12 @@ inline __m128 sse_rnd_ps(__m128 x)
}
//roundEven
inline __m128 sse_rde_ps(__m128 v)
GLM_FUNC_QUALIFIER __m128 sse_rde_ps(__m128 v)
{
}
inline __m128 sse_ceil_ps(__m128 x)
GLM_FUNC_QUALIFIER __m128 sse_ceil_ps(__m128 x)
{
__m128 rnd0 = sse_rnd_ps(x);
__m128 cmp0 = _mm_cmpgt_ps(x, rnd0);
@ -184,14 +184,14 @@ inline __m128 sse_ceil_ps(__m128 x)
return add0;
}
inline __m128 sse_frc_ps(__m128 x)
GLM_FUNC_QUALIFIER __m128 sse_frc_ps(__m128 x)
{
__m128 flr0 = sse_flr_ps(x);
__m128 sub0 = _mm_sub_ps(x, flr0);
return sub0;
}
inline __m128 sse_mod_ps(__m128 x, __m128 y)
GLM_FUNC_QUALIFIER __m128 sse_mod_ps(__m128 x, __m128 y)
{
__m128 div0 = _mm_div_ps(x, y);
__m128 flr0 = sse_flr_ps(div0);
@ -200,23 +200,23 @@ inline __m128 sse_mod_ps(__m128 x, __m128 y)
return sub0;
}
inline __m128 sse_modf_ps(__m128 x, __m128i & i)
GLM_FUNC_QUALIFIER __m128 sse_modf_ps(__m128 x, __m128i & i)
{
}
//inline __m128 _mm_min_ps(__m128 x, __m128 y)
//GLM_FUNC_QUALIFIER __m128 _mm_min_ps(__m128 x, __m128 y)
//inline __m128 _mm_max_ps(__m128 x, __m128 y)
//GLM_FUNC_QUALIFIER __m128 _mm_max_ps(__m128 x, __m128 y)
inline __m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal)
GLM_FUNC_QUALIFIER __m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal)
{
__m128 min0 = _mm_min_ps(v, maxVal);
__m128 max0 = _mm_max_ps(min0, minVal);
return max0;
}
inline __m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a)
GLM_FUNC_QUALIFIER __m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a)
{
__m128 sub0 = _mm_sub_ps(glm::detail::one, a);
__m128 mul0 = _mm_mul_ps(v1, sub0);
@ -225,7 +225,7 @@ inline __m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a)
return add0;
}
inline __m128 sse_stp_ps(__m128 edge, __m128 x)
GLM_FUNC_QUALIFIER __m128 sse_stp_ps(__m128 edge, __m128 x)
{
__m128 cmp = _mm_cmple_ps(x, edge);
if(_mm_movemask_ps(cmp) == 0)
@ -234,7 +234,7 @@ inline __m128 sse_stp_ps(__m128 edge, __m128 x)
return glm::detail::zero;
}
inline __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)
GLM_FUNC_QUALIFIER __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)
{
__m128 sub0 = _mm_sub_ps(x, edge0);
__m128 sub1 = _mm_sub_ps(edge1, edge0);
@ -247,19 +247,19 @@ inline __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)
return mul2;
}
inline __m128 sse_nan_ps(__m128 x)
GLM_FUNC_QUALIFIER __m128 sse_nan_ps(__m128 x)
{
}
inline __m128 sse_inf_ps(__m128 x)
GLM_FUNC_QUALIFIER __m128 sse_inf_ps(__m128 x)
{
}
// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration
// By Elan Ruskin, http://assemblyrequired.crashworks.org/
inline __m128 sse_sqrt_wip_ss(__m128 const & x)
GLM_FUNC_QUALIFIER __m128 sse_sqrt_wip_ss(__m128 const & x)
{
__m128 recip = _mm_rsqrt_ss(x); // "estimate" opcode
const static __m128 three = {3, 3, 3, 3}; // aligned consts for fast load

View File

@ -20,7 +20,7 @@ namespace glm{
namespace detail
{
/*
inline __m128 sse_rsqrt_nr_ss(__m128 const x)
GLM_FUNC_QUALIFIER __m128 sse_rsqrt_nr_ss(__m128 const x)
{
__m128 recip = _mm_rsqrt_ss( x ); // "estimate" opcode
const static __m128 three = { 3, 3, 3, 3 }; // aligned consts for fast load
@ -30,7 +30,7 @@ inline __m128 sse_rsqrt_nr_ss(__m128 const x)
return _mm_mul_ss( halfrecip, threeminus_xrr );
}
inline __m128 sse_normalize_fast_ps( float * RESTRICT vOut, float * RESTRICT vIn )
GLM_FUNC_QUALIFIER __m128 sse_normalize_fast_ps( float * RESTRICT vOut, float * RESTRICT vIn )
{
__m128 x = _mm_load_ss(&vIn[0]);
__m128 y = _mm_load_ss(&vIn[1]);

View File

@ -11,7 +11,7 @@ namespace glm{
namespace detail{
//length
inline __m128 sse_len_ps(__m128 x)
GLM_FUNC_QUALIFIER __m128 sse_len_ps(__m128 x)
{
__m128 dot0 = sse_dot_ps(x, x);
__m128 sqt0 = _mm_sqrt_ps(dot0);
@ -19,7 +19,7 @@ inline __m128 sse_len_ps(__m128 x)
}
//distance
inline __m128 sse_dst_ps(__m128 p0, __m128 p1)
GLM_FUNC_QUALIFIER __m128 sse_dst_ps(__m128 p0, __m128 p1)
{
__m128 sub0 = _mm_sub_ps(p0, p1);
__m128 len0 = sse_len_ps(sub0);
@ -27,7 +27,7 @@ inline __m128 sse_dst_ps(__m128 p0, __m128 p1)
}
//dot
inline __m128 sse_dot_ps(__m128 v1, __m128 v2)
GLM_FUNC_QUALIFIER __m128 sse_dot_ps(__m128 v1, __m128 v2)
{
__m128 mul0 = _mm_mul_ps(v1, v2);
__m128 swp0 = _mm_shuffle_ps(mul0, mul0, _MM_SHUFFLE(2, 3, 0, 1));
@ -38,7 +38,7 @@ inline __m128 sse_dot_ps(__m128 v1, __m128 v2)
}
// SSE1
inline __m128 sse_dot_ss(__m128 v1, __m128 v2)
GLM_FUNC_QUALIFIER __m128 sse_dot_ss(__m128 v1, __m128 v2)
{
__m128 mul0 = _mm_mul_ps(v1, v2);
__m128 mov0 = _mm_movehl_ps(mul0, mul0);
@ -49,7 +49,7 @@ inline __m128 sse_dot_ss(__m128 v1, __m128 v2)
}
//cross
inline __m128 sse_xpd_ps(__m128 v1, __m128 v2)
GLM_FUNC_QUALIFIER __m128 sse_xpd_ps(__m128 v1, __m128 v2)
{
__m128 swp0 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 0, 2, 1));
__m128 swp1 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 1, 0, 2));
@ -62,7 +62,7 @@ inline __m128 sse_xpd_ps(__m128 v1, __m128 v2)
}
//normalize
inline __m128 sse_nrm_ps(__m128 v)
GLM_FUNC_QUALIFIER __m128 sse_nrm_ps(__m128 v)
{
__m128 dot0 = sse_dot_ps(v, v);
__m128 isr0 = _mm_rsqrt_ps(dot0);
@ -71,7 +71,7 @@ inline __m128 sse_nrm_ps(__m128 v)
}
//faceforward
inline __m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref)
GLM_FUNC_QUALIFIER __m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref)
{
//__m128 dot0 = _mm_dot_ps(v, v);
//__m128 neg0 = _mm_neg_ps(N);
@ -87,7 +87,7 @@ inline __m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref)
}
//reflect
inline __m128 sse_rfe_ps(__m128 I, __m128 N)
GLM_FUNC_QUALIFIER __m128 sse_rfe_ps(__m128 I, __m128 N)
{
__m128 dot0 = sse_dot_ps(N, I);
__m128 mul0 = _mm_mul_ps(N, dot0);
@ -97,7 +97,7 @@ inline __m128 sse_rfe_ps(__m128 I, __m128 N)
}
//refract
inline __m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta)
GLM_FUNC_QUALIFIER __m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta)
{
__m128 dot0 = sse_dot_ps(N, I);
__m128 mul0 = _mm_mul_ps(eta, eta);

View File

@ -14,7 +14,7 @@ static const __m128 _m128_rad_ps = _mm_set_ps1(3.141592653589793238462643383279f
static const __m128 _m128_deg_ps = _mm_set_ps1(180.f / 3.141592653589793238462643383279f);
template <typename matType>
inline matType sse_comp_mul_ps
GLM_FUNC_QUALIFIER matType sse_comp_mul_ps
(
__m128 const in1[4],
__m128 const in2[4],
@ -27,7 +27,7 @@ inline matType sse_comp_mul_ps
out[3] = _mm_mul_ps(in1[3], in2[3]);
}
inline void sse_add_ps(__m128 in1[4], __m128 in2[4], __m128 out[4])
GLM_FUNC_QUALIFIER void sse_add_ps(__m128 in1[4], __m128 in2[4], __m128 out[4])
{
{
out[0] = _mm_add_ps(in1[0], in2[0]);
@ -37,7 +37,7 @@ inline void sse_add_ps(__m128 in1[4], __m128 in2[4], __m128 out[4])
}
}
inline void sse_sub_ps(__m128 in1[4], __m128 in2[4], __m128 out[4])
GLM_FUNC_QUALIFIER void sse_sub_ps(__m128 in1[4], __m128 in2[4], __m128 out[4])
{
{
out[0] = _mm_sub_ps(in1[0], in2[0]);
@ -47,7 +47,7 @@ inline void sse_sub_ps(__m128 in1[4], __m128 in2[4], __m128 out[4])
}
}
inline __m128 sse_mul_ps(__m128 m[4], __m128 v)
GLM_FUNC_QUALIFIER __m128 sse_mul_ps(__m128 m[4], __m128 v)
{
__m128 v0 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(0, 0, 0, 0));
__m128 v1 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(1, 1, 1, 1));
@ -66,7 +66,7 @@ inline __m128 sse_mul_ps(__m128 m[4], __m128 v)
return a2;
}
inline __m128 sse_mul_ps(__m128 v, __m128 m[4])
GLM_FUNC_QUALIFIER __m128 sse_mul_ps(__m128 v, __m128 m[4])
{
__m128 i0 = m[0];
__m128 i1 = m[1];
@ -93,7 +93,7 @@ inline __m128 sse_mul_ps(__m128 v, __m128 m[4])
return f2;
}
inline void sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])
GLM_FUNC_QUALIFIER void sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])
{
{
__m128 e0 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(0, 0, 0, 0));
@ -169,7 +169,7 @@ inline void sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])
}
}
inline void sse_transpose_ps(__m128 const in[4], __m128 out[4])
GLM_FUNC_QUALIFIER void sse_transpose_ps(__m128 const in[4], __m128 out[4])
{
__m128 tmp0 = _mm_shuffle_ps(in[0], in[1], 0x44);
__m128 tmp2 = _mm_shuffle_ps(in[0], in[1], 0xEE);
@ -182,7 +182,7 @@ inline void sse_transpose_ps(__m128 const in[4], __m128 out[4])
out[3] = _mm_shuffle_ps(tmp2, tmp3, 0xDD);
}
inline __m128 sse_slow_det_ps(__m128 const in[4])
GLM_FUNC_QUALIFIER __m128 sse_slow_det_ps(__m128 const in[4])
{
__m128 Fac0;
{
@ -408,7 +408,7 @@ inline __m128 sse_slow_det_ps(__m128 const in[4])
return Det0;
}
inline __m128 sse_detd_ps
GLM_FUNC_QUALIFIER __m128 sse_detd_ps
(
__m128 const m[4]
)
@ -474,7 +474,7 @@ inline __m128 sse_detd_ps
return sse_dot_ps(m[0], DetCof);
}
inline __m128 sse_det_ps
GLM_FUNC_QUALIFIER __m128 sse_det_ps
(
__m128 const m[4]
)
@ -540,7 +540,7 @@ inline __m128 sse_det_ps
return sse_dot_ps(m[0], DetCof);
}
inline void sse_inverse_ps(__m128 const in[4], __m128 out[4])
GLM_FUNC_QUALIFIER void sse_inverse_ps(__m128 const in[4], __m128 out[4])
{
__m128 Fac0;
{
@ -773,7 +773,7 @@ inline void sse_inverse_ps(__m128 const in[4], __m128 out[4])
out[3] = _mm_mul_ps(Inv3, Rcp0);
}
inline void sse_inverse_fast_ps(__m128 const in[4], __m128 out[4])
GLM_FUNC_QUALIFIER void sse_inverse_fast_ps(__m128 const in[4], __m128 out[4])
{
__m128 Fac0;
{
@ -1005,7 +1005,7 @@ inline void sse_inverse_fast_ps(__m128 const in[4], __m128 out[4])
out[3] = _mm_mul_ps(Inv3, Rcp0);
}
inline void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4])
GLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4])
{
float a = glm::radians(Angle);
float c = cos(a);
@ -1075,7 +1075,7 @@ inline void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m
sse_mul_ps(in, Result, out);
}
inline void sse_outer_ps(__m128 const & c, __m128 const & r, __m128 out[4])
GLM_FUNC_QUALIFIER void sse_outer_ps(__m128 const & c, __m128 const & r, __m128 out[4])
{
out[0] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(0, 0, 0, 0)));
out[1] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(1, 1, 1, 1)));

View File

@ -9,7 +9,7 @@
//
//// lessThan
//template <typename valType>
//inline typename detail::tvec2<valType>::bool_type lessThan
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type lessThan
//(
// detail::tvec2<valType> const & x,
// detail::tvec2<valType> const & y
@ -24,7 +24,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec3<valType>::bool_type lessThan
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type lessThan
//(
// detail::tvec3<valType> const & x,
// detail::tvec3<valType> const & y
@ -39,7 +39,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec4<valType>::bool_type lessThan
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type lessThan
//(
// detail::tvec4<valType> const & x,
// detail::tvec4<valType> const & y
@ -55,7 +55,7 @@
//
//// lessThanEqual
//template <typename valType>
//inline typename detail::tvec2<valType>::bool_type lessThanEqual
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type lessThanEqual
//(
// detail::tvec2<valType> const & x,
// detail::tvec2<valType> const & y
@ -70,7 +70,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec3<valType>::bool_type lessThanEqual
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type lessThanEqual
//(
// detail::tvec3<valType> const & x,
// detail::tvec3<valType> const & y
@ -85,7 +85,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec4<valType>::bool_type lessThanEqual
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type lessThanEqual
//(
// detail::tvec4<valType> const & x,
// detail::tvec4<valType> const & y
@ -101,7 +101,7 @@
//
//// greaterThan
//template <typename valType>
//inline typename detail::tvec2<valType>::bool_type greaterThan
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type greaterThan
//(
// detail::tvec2<valType> const & x,
// detail::tvec2<valType> const & y
@ -116,7 +116,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec3<valType>::bool_type greaterThan
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type greaterThan
//(
// detail::tvec3<valType> const & x,
// detail::tvec3<valType> const & y
@ -131,7 +131,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec4<valType>::bool_type greaterThan
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type greaterThan
//(
// detail::tvec4<valType> const & x,
// detail::tvec4<valType> const & y
@ -147,7 +147,7 @@
//
//// greaterThanEqual
//template <typename valType>
//inline typename detail::tvec2<valType>::bool_type greaterThanEqual
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type greaterThanEqual
//(
// detail::tvec2<valType> const & x,
// detail::tvec2<valType> const & y
@ -162,7 +162,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec3<valType>::bool_type greaterThanEqual
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type greaterThanEqual
//(
// detail::tvec3<valType> const & x,
// detail::tvec3<valType> const & y
@ -177,7 +177,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec4<valType>::bool_type greaterThanEqual
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type greaterThanEqual
//(
// detail::tvec4<valType> const & x,
// detail::tvec4<valType> const & y
@ -193,7 +193,7 @@
//
//// equal
//template <typename valType>
//inline typename detail::tvec2<valType>::bool_type equal
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type equal
//(
// detail::tvec2<valType> const & x,
// detail::tvec2<valType> const & y
@ -209,7 +209,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec3<valType>::bool_type equal
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type equal
//(
// detail::tvec3<valType> const & x,
// detail::tvec3<valType> const & y
@ -225,7 +225,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec4<valType>::bool_type equal
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type equal
//(
// detail::tvec4<valType> const & x,
// detail::tvec4<valType> const & y
@ -242,7 +242,7 @@
//
//// notEqual
//template <typename valType>
//inline typename detail::tvec2<valType>::bool_type notEqual
//GLM_FUNC_QUALIFIER typename detail::tvec2<valType>::bool_type notEqual
//(
// detail::tvec2<valType> const & x,
// detail::tvec2<valType> const & y
@ -258,7 +258,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec3<valType>::bool_type notEqual
//GLM_FUNC_QUALIFIER typename detail::tvec3<valType>::bool_type notEqual
//(
// detail::tvec3<valType> const & x,
// detail::tvec3<valType> const & y
@ -274,7 +274,7 @@
//}
//
//template <typename valType>
//inline typename detail::tvec4<valType>::bool_type notEqual
//GLM_FUNC_QUALIFIER typename detail::tvec4<valType>::bool_type notEqual
//(
// detail::tvec4<valType> const & x,
// detail::tvec4<valType> const & y
@ -290,39 +290,39 @@
//}
//
//// any
//inline bool any(detail::tvec2<bool> const & x)
//GLM_FUNC_QUALIFIER bool any(detail::tvec2<bool> const & x)
//{
// return x.x || x.y;
//}
//
//inline bool any(detail::tvec3<bool> const & x)
//GLM_FUNC_QUALIFIER bool any(detail::tvec3<bool> const & x)
//{
// return x.x || x.y || x.z;
//}
//
//inline bool any(detail::tvec4<bool> const & x)
//GLM_FUNC_QUALIFIER bool any(detail::tvec4<bool> const & x)
//{
// return x.x || x.y || x.z || x.w;
//}
//
//// all
//inline bool all(const detail::tvec2<bool>& x)
//GLM_FUNC_QUALIFIER bool all(const detail::tvec2<bool>& x)
//{
// return x.x && x.y;
//}
//
//inline bool all(const detail::tvec3<bool>& x)
//GLM_FUNC_QUALIFIER bool all(const detail::tvec3<bool>& x)
//{
// return x.x && x.y && x.z;
//}
//
//inline bool all(const detail::tvec4<bool>& x)
//GLM_FUNC_QUALIFIER bool all(const detail::tvec4<bool>& x)
//{
// return x.x && x.y && x.z && x.w;
//}
//
//// not
//inline detail::tvec2<bool>::bool_type not_
//GLM_FUNC_QUALIFIER detail::tvec2<bool>::bool_type not_
//(
// detail::tvec2<bool> const & v
//)
@ -330,7 +330,7 @@
// return detail::tvec2<bool>::bool_type(!v.x, !v.y);
//}
//
//inline detail::tvec3<bool>::bool_type not_
//GLM_FUNC_QUALIFIER detail::tvec3<bool>::bool_type not_
//(
// detail::tvec3<bool> const & v
//)
@ -338,7 +338,7 @@
// return detail::tvec3<bool>::bool_type(!v.x, !v.y, !v.z);
//}
//
//inline detail::tvec4<bool>::bool_type not_
//GLM_FUNC_QUALIFIER detail::tvec4<bool>::bool_type not_
//(
// detail::tvec4<bool> const & v
//)

View File

@ -369,22 +369,30 @@
#endif//GLM_LANG
///////////////////////////////////////////////////////////////////////////////////////////////////
// inline
// Qualifiers
// User defines: GLM_FORCE_INLINE
// User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA
#if(defined(GLM_FORCE_CUDA) || (defined(CUDA_VERSION) && (CUDA_VERSION >= 4000)))
# define GLM_CUDA_QUALIFIER __device__ __host__
#else
# define GLM_CUDA_QUALIFIER
#endif
#if(defined(GLM_FORCE_INLINE))
# if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
# define GLM_INLINE __forceinline
# elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
# define GLM_INLINE __attribute__((always_inline))
# else
# define GLM_INLINE inline
# endif//GLM_COMPILER
# if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
# define GLM_INLINE __forceinline
# elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
# define GLM_INLINE __attribute__((always_inline))
# else
# define GLM_INLINE inline
# endif//GLM_COMPILER
#else
# define GLM_INLINE inline
# define GLM_INLINE inline
#endif//defined(GLM_FORCE_INLINE)
#define GLM_FUNC_QUALIFIER GLM_CUDA_QUALIFIER GLM_INLINE
///////////////////////////////////////////////////////////////////////////////////////////////////
// Swizzle operators

View File

@ -16,7 +16,7 @@
namespace glm{
namespace detail
{
inline float overflow()
GLM_FUNC_QUALIFIER float overflow()
{
volatile float f = 1e10;
@ -26,7 +26,7 @@ namespace detail
return f;
}
inline float toFloat32(hdata value)
GLM_FUNC_QUALIFIER float toFloat32(hdata value)
{
int s = (value >> 15) & 0x00000001;
int e = (value >> 10) & 0x0000001f;
@ -100,7 +100,7 @@ namespace detail
return Result.f;
}
inline hdata toFloat16(float const & f)
GLM_FUNC_QUALIFIER hdata toFloat16(float const & f)
{
uif Entry;
Entry.f = f;
@ -235,79 +235,79 @@ namespace detail
}
}
inline thalf::thalf() :
GLM_FUNC_QUALIFIER thalf::thalf() :
data(0)
{}
inline thalf::thalf(thalf const & s) :
GLM_FUNC_QUALIFIER thalf::thalf(thalf const & s) :
data(s.data)
{}
template <typename U>
inline thalf::thalf(U const & s) :
GLM_FUNC_QUALIFIER thalf::thalf(U const & s) :
data(toFloat16(float(s)))
{}
// Cast
//inline half::operator float()
//GLM_FUNC_QUALIFIER half::operator float()
//{
// return toFloat();
//}
inline thalf::operator float() const
GLM_FUNC_QUALIFIER thalf::operator float() const
{
return toFloat();
}
//inline half::operator double()
//GLM_FUNC_QUALIFIER half::operator double()
//{
// return double(toFloat());
//}
//inline half::operator double() const
//GLM_FUNC_QUALIFIER half::operator double() const
//{
// return double(toFloat());
//}
// Unary updatable operators
inline thalf& thalf::operator= (thalf const & s)
GLM_FUNC_QUALIFIER thalf& thalf::operator= (thalf const & s)
{
data = s.data;
return *this;
}
inline thalf& thalf::operator+=(thalf const & s)
GLM_FUNC_QUALIFIER thalf& thalf::operator+=(thalf const & s)
{
data = toFloat16(toFloat32(data) + toFloat32(s.data));
return *this;
}
inline thalf& thalf::operator-=(thalf const & s)
GLM_FUNC_QUALIFIER thalf& thalf::operator-=(thalf const & s)
{
data = toFloat16(toFloat32(data) - toFloat32(s.data));
return *this;
}
inline thalf& thalf::operator*=(thalf const & s)
GLM_FUNC_QUALIFIER thalf& thalf::operator*=(thalf const & s)
{
data = toFloat16(toFloat32(data) * toFloat32(s.data));
return *this;
}
inline thalf& thalf::operator/=(thalf const & s)
GLM_FUNC_QUALIFIER thalf& thalf::operator/=(thalf const & s)
{
data = toFloat16(toFloat32(data) / toFloat32(s.data));
return *this;
}
inline thalf& thalf::operator++()
GLM_FUNC_QUALIFIER thalf& thalf::operator++()
{
float Casted = toFloat32(data);
data = toFloat16(++Casted);
return *this;
}
inline thalf& thalf::operator--()
GLM_FUNC_QUALIFIER thalf& thalf::operator--()
{
float Casted = toFloat32(data);
data = toFloat16(--Casted);
@ -317,38 +317,38 @@ namespace detail
//////////////////////////////////////
// Binary arithmetic operators
inline detail::thalf operator+ (detail::thalf const & s1, detail::thalf const & s2)
GLM_FUNC_QUALIFIER detail::thalf operator+ (detail::thalf const & s1, detail::thalf const & s2)
{
return detail::thalf(float(s1) + float(s2));
}
inline detail::thalf operator- (detail::thalf const & s1, detail::thalf const & s2)
GLM_FUNC_QUALIFIER detail::thalf operator- (detail::thalf const & s1, detail::thalf const & s2)
{
return detail::thalf(float(s1) - float(s2));
}
inline detail::thalf operator* (detail::thalf const & s1, detail::thalf const & s2)
GLM_FUNC_QUALIFIER detail::thalf operator* (detail::thalf const & s1, detail::thalf const & s2)
{
return detail::thalf(float(s1) * float(s2));
}
inline detail::thalf operator/ (detail::thalf const & s1, detail::thalf const & s2)
GLM_FUNC_QUALIFIER detail::thalf operator/ (detail::thalf const & s1, detail::thalf const & s2)
{
return detail::thalf(float(s1) / float(s2));
}
// Unary constant operators
inline detail::thalf operator- (detail::thalf const & s)
GLM_FUNC_QUALIFIER detail::thalf operator- (detail::thalf const & s)
{
return detail::thalf(-float(s));
}
inline detail::thalf operator-- (detail::thalf const & s, int)
GLM_FUNC_QUALIFIER detail::thalf operator-- (detail::thalf const & s, int)
{
return detail::thalf(float(s) - 1.0f);
}
inline detail::thalf operator++ (detail::thalf const & s, int)
GLM_FUNC_QUALIFIER detail::thalf operator++ (detail::thalf const & s, int)
{
return detail::thalf(float(s) + 1.0f);
}

View File

@ -11,13 +11,13 @@ namespace glm{
namespace detail
{
template <typename T>
inline typename tmat2x2<T>::size_type tmat2x2<T>::col_size()
GLM_FUNC_QUALIFIER typename tmat2x2<T>::size_type tmat2x2<T>::col_size()
{
return 2;
}
template <typename T>
inline typename tmat2x2<T>::size_type tmat2x2<T>::row_size()
GLM_FUNC_QUALIFIER typename tmat2x2<T>::size_type tmat2x2<T>::row_size()
{
return 2;
}
@ -26,7 +26,7 @@ namespace detail
// Accesses
template <typename T>
inline typename tmat2x2<T>::col_type &
GLM_FUNC_QUALIFIER typename tmat2x2<T>::col_type &
tmat2x2<T>::operator[]
(
size_type i
@ -37,7 +37,7 @@ namespace detail
}
template <typename T>
inline typename tmat2x2<T>::col_type const &
GLM_FUNC_QUALIFIER typename tmat2x2<T>::col_type const &
tmat2x2<T>::operator[]
(
size_type i
@ -51,14 +51,14 @@ namespace detail
// Constructors
template <typename T>
inline tmat2x2<T>::tmat2x2()
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2()
{
this->value[0] = col_type(1, 0);
this->value[1] = col_type(0, 1);
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
tmat2x2<T> const & m
)
@ -68,14 +68,14 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
ctor
)
{}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
value_type const & s
)
@ -86,7 +86,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1
@ -97,7 +97,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
col_type const & v0,
col_type const & v1
@ -112,7 +112,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
tmat2x2<U> const & m
)
@ -122,7 +122,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
tmat3x3<T> const & m
)
@ -132,7 +132,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
tmat4x4<T> const & m
)
@ -142,7 +142,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
tmat2x3<T> const & m
)
@ -152,7 +152,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
tmat3x2<T> const & m
)
@ -162,7 +162,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
tmat2x4<T> const & m
)
@ -172,7 +172,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
tmat4x2<T> const & m
)
@ -182,7 +182,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
tmat3x4<T> const & m
)
@ -192,7 +192,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>::tmat2x2
GLM_FUNC_QUALIFIER tmat2x2<T>::tmat2x2
(
tmat4x3<T> const & m
)
@ -202,7 +202,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> tmat2x2<T>::_inverse() const
GLM_FUNC_QUALIFIER tmat2x2<T> tmat2x2<T>::_inverse() const
{
typename tmat2x2<T>::value_type Determinant = this->value[0][0] * this->value[1][1] - this->value[1][0] * this->value[0][1];
@ -219,7 +219,7 @@ namespace detail
// This function shouldn't required but it seems that VC7.1 have an optimisation bug if this operator wasn't declared
template <typename T>
inline tmat2x2<T>& tmat2x2<T>::operator=
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator=
(
tmat2x2<T> const & m
)
@ -231,7 +231,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x2<T>& tmat2x2<T>::operator=
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator=
(
tmat2x2<U> const & m
)
@ -243,7 +243,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x2<T>& tmat2x2<T>::operator+=
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator+=
(
U const & s
)
@ -255,7 +255,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x2<T>& tmat2x2<T>::operator+=
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator+=
(
tmat2x2<U> const & m
)
@ -267,7 +267,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x2<T>& tmat2x2<T>::operator-=
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator-=
(
U const & s
)
@ -279,7 +279,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x2<T>& tmat2x2<T>::operator-=
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator-=
(
tmat2x2<U> const & m
)
@ -291,7 +291,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x2<T>& tmat2x2<T>::operator*=
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator*=
(
U const & s
)
@ -303,7 +303,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x2<T>& tmat2x2<T>::operator*=
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator*=
(
tmat2x2<U> const & m
)
@ -313,7 +313,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x2<T>& tmat2x2<T>::operator/=
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator/=
(
U const & s
)
@ -325,7 +325,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x2<T>& tmat2x2<T>::operator/=
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator/=
(
tmat2x2<U> const & m
)
@ -334,7 +334,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>& tmat2x2<T>::operator++ ()
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator++ ()
{
++this->value[0];
++this->value[1];
@ -342,7 +342,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T>& tmat2x2<T>::operator-- ()
GLM_FUNC_QUALIFIER tmat2x2<T>& tmat2x2<T>::operator-- ()
{
--this->value[0];
--this->value[1];
@ -353,7 +353,7 @@ namespace detail
// Binary operators
template <typename T>
inline tmat2x2<T> operator+
GLM_FUNC_QUALIFIER tmat2x2<T> operator+
(
tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s
@ -365,7 +365,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator+
GLM_FUNC_QUALIFIER tmat2x2<T> operator+
(
typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m
@ -377,7 +377,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator+
GLM_FUNC_QUALIFIER tmat2x2<T> operator+
(
tmat2x2<T> const & m1,
tmat2x2<T> const & m2
@ -389,7 +389,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator-
GLM_FUNC_QUALIFIER tmat2x2<T> operator-
(
tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s
@ -401,7 +401,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator-
GLM_FUNC_QUALIFIER tmat2x2<T> operator-
(
typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m
@ -413,7 +413,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator-
GLM_FUNC_QUALIFIER tmat2x2<T> operator-
(
tmat2x2<T> const & m1,
tmat2x2<T> const & m2
@ -425,7 +425,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator*
GLM_FUNC_QUALIFIER tmat2x2<T> operator*
(
tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s
@ -441,7 +441,7 @@ namespace detail
// X X
// X X
template <typename T>
inline tmat2x2<T> operator*
GLM_FUNC_QUALIFIER tmat2x2<T> operator*
(
typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m
@ -453,7 +453,7 @@ namespace detail
}
template <typename T>
inline typename tmat2x2<T>::col_type operator*
GLM_FUNC_QUALIFIER typename tmat2x2<T>::col_type operator*
(
tmat2x2<T> const & m,
typename tmat2x2<T>::row_type const & v
@ -468,7 +468,7 @@ namespace detail
// X X
// X X
template <typename T>
inline typename tmat2x2<T>::row_type operator*
GLM_FUNC_QUALIFIER typename tmat2x2<T>::row_type operator*
(
typename tmat2x2<T>::col_type const & v,
tmat2x2<T> const & m
@ -480,7 +480,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator*
GLM_FUNC_QUALIFIER tmat2x2<T> operator*
(
tmat2x2<T> const & m1,
tmat2x2<T> const & m2
@ -494,7 +494,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator/
GLM_FUNC_QUALIFIER tmat2x2<T> operator/
(
tmat2x2<T> const & m,
typename tmat2x2<T>::value_type const & s
@ -506,7 +506,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator/
GLM_FUNC_QUALIFIER tmat2x2<T> operator/
(
typename tmat2x2<T>::value_type const & s,
tmat2x2<T> const & m
@ -518,7 +518,7 @@ namespace detail
}
template <typename T>
inline typename tmat2x2<T>::col_type operator/
GLM_FUNC_QUALIFIER typename tmat2x2<T>::col_type operator/
(
tmat2x2<T> const & m,
typename tmat2x2<T>::row_type & v
@ -528,7 +528,7 @@ namespace detail
}
template <typename T>
inline typename tmat2x2<T>::row_type operator/
GLM_FUNC_QUALIFIER typename tmat2x2<T>::row_type operator/
(
typename tmat2x2<T>::col_type const & v,
tmat2x2<T> const & m
@ -538,7 +538,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator/
GLM_FUNC_QUALIFIER tmat2x2<T> operator/
(
tmat2x2<T> const & m1,
tmat2x2<T> const & m2
@ -549,7 +549,7 @@ namespace detail
// Unary constant operators
template <typename T>
inline tmat2x2<T> const operator-
GLM_FUNC_QUALIFIER tmat2x2<T> const operator-
(
tmat2x2<T> const & m
)
@ -560,7 +560,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> const operator++
GLM_FUNC_QUALIFIER tmat2x2<T> const operator++
(
tmat2x2<T> const & m,
int
@ -572,7 +572,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> const operator--
GLM_FUNC_QUALIFIER tmat2x2<T> const operator--
(
tmat2x2<T> const & m,
int
@ -587,7 +587,7 @@ namespace detail
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tmat2x2<T> const & m1,
tmat2x2<T> const & m2
@ -597,7 +597,7 @@ namespace detail
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tmat2x2<T> const & m1,
tmat2x2<T> const & m2

View File

@ -11,13 +11,13 @@ namespace glm{
namespace detail
{
template <typename T>
inline typename tmat2x3<T>::size_type tmat2x3<T>::col_size()
GLM_FUNC_QUALIFIER typename tmat2x3<T>::size_type tmat2x3<T>::col_size()
{
return 3;
}
template <typename T>
inline typename tmat2x3<T>::size_type tmat2x3<T>::row_size()
GLM_FUNC_QUALIFIER typename tmat2x3<T>::size_type tmat2x3<T>::row_size()
{
return 2;
}
@ -26,7 +26,7 @@ namespace detail
// Accesses
template <typename T>
inline typename tmat2x3<T>::col_type &
GLM_FUNC_QUALIFIER typename tmat2x3<T>::col_type &
tmat2x3<T>::operator[]
(
size_type i
@ -37,7 +37,7 @@ namespace detail
}
template <typename T>
inline typename tmat2x3<T>::col_type const &
GLM_FUNC_QUALIFIER typename tmat2x3<T>::col_type const &
tmat2x3<T>::operator[]
(
size_type i
@ -51,14 +51,14 @@ namespace detail
// Constructors
template <typename T>
inline tmat2x3<T>::tmat2x3()
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3()
{
this->value[0] = col_type(T(1), T(0), T(0));
this->value[1] = col_type(T(0), T(1), T(0));
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
tmat2x3<T> const & m
)
@ -68,14 +68,14 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
ctor
)
{}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
value_type const & s
)
@ -85,7 +85,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1
@ -96,7 +96,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
col_type const & v0,
col_type const & v1
@ -109,7 +109,7 @@ namespace detail
// Conversion
template <typename T>
template <typename U>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
tmat2x3<U> const & m
)
@ -119,7 +119,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
tmat2x2<T> const & m
)
@ -129,7 +129,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
tmat3x3<T> const & m
)
@ -139,7 +139,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
tmat4x4<T> const & m
)
@ -149,7 +149,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
tmat2x4<T> const & m
)
@ -159,7 +159,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
tmat3x2<T> const & m
)
@ -169,7 +169,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
tmat3x4<T> const & m
)
@ -179,7 +179,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
tmat4x2<T> const & m
)
@ -189,7 +189,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T>::tmat2x3
GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
(
tmat4x3<T> const & m
)
@ -202,7 +202,7 @@ namespace detail
// Unary updatable operators
template <typename T>
inline tmat2x3<T>& tmat2x3<T>::operator=
GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator=
(
tmat2x3<T> const & m
)
@ -214,7 +214,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x3<T>& tmat2x3<T>::operator=
GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator=
(
tmat2x3<U> const & m
)
@ -226,7 +226,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x3<T> & tmat2x3<T>::operator+=
GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator+=
(
U const & s
)
@ -238,7 +238,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x3<T>& tmat2x3<T>::operator+=
GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator+=
(
tmat2x3<U> const & m
)
@ -250,7 +250,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x3<T>& tmat2x3<T>::operator-=
GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator-=
(
U const & s
)
@ -262,7 +262,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x3<T>& tmat2x3<T>::operator-=
GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator-=
(
tmat2x3<U> const & m
)
@ -274,7 +274,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x3<T>& tmat2x3<T>::operator*=
GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator*=
(
U const & s
)
@ -286,7 +286,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x3<T> & tmat2x3<T>::operator*=
GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator*=
(
tmat2x3<U> const & m
)
@ -296,7 +296,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x3<T> & tmat2x3<T>::operator/=
GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator/=
(
U const & s
)
@ -307,7 +307,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> & tmat2x3<T>::operator++ ()
GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator++ ()
{
++this->value[0];
++this->value[1];
@ -315,7 +315,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> & tmat2x3<T>::operator-- ()
GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator-- ()
{
--this->value[0];
--this->value[1];
@ -326,7 +326,7 @@ namespace detail
// Binary operators
template <typename T>
inline tmat2x3<T> operator+
GLM_FUNC_QUALIFIER tmat2x3<T> operator+
(
tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s
@ -338,7 +338,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> operator+
GLM_FUNC_QUALIFIER tmat2x3<T> operator+
(
tmat2x3<T> const & m1,
tmat2x3<T> const & m2
@ -350,7 +350,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> operator-
GLM_FUNC_QUALIFIER tmat2x3<T> operator-
(
tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s
@ -362,7 +362,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> operator-
GLM_FUNC_QUALIFIER tmat2x3<T> operator-
(
tmat2x3<T> const & m1,
tmat2x3<T> const & m2
@ -374,7 +374,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> operator*
GLM_FUNC_QUALIFIER tmat2x3<T> operator*
(
tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s
@ -386,7 +386,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> operator*
GLM_FUNC_QUALIFIER tmat2x3<T> operator*
(
typename tmat2x3<T>::value_type const & s,
tmat2x3<T> const & m
@ -398,7 +398,7 @@ namespace detail
}
template <typename T>
inline typename tmat2x3<T>::col_type operator*
GLM_FUNC_QUALIFIER typename tmat2x3<T>::col_type operator*
(
tmat2x3<T> const & m,
typename tmat2x3<T>::row_type const & v)
@ -410,7 +410,7 @@ namespace detail
}
template <typename T>
inline typename tmat2x3<T>::row_type operator*
GLM_FUNC_QUALIFIER typename tmat2x3<T>::row_type operator*
(
typename tmat2x3<T>::col_type const & v,
tmat2x3<T> const & m)
@ -421,7 +421,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator*
GLM_FUNC_QUALIFIER tmat3x3<T> operator*
(
tmat2x3<T> const & m1,
tmat3x2<T> const & m2
@ -455,7 +455,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> operator/
GLM_FUNC_QUALIFIER tmat2x3<T> operator/
(
tmat2x3<T> const & m,
typename tmat2x3<T>::value_type const & s
@ -467,7 +467,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> operator/
GLM_FUNC_QUALIFIER tmat2x3<T> operator/
(
typename tmat2x3<T>::value_type const & s,
tmat2x3<T> const & m
@ -480,7 +480,7 @@ namespace detail
// Unary constant operators
template <typename T>
inline tmat2x3<T> const operator-
GLM_FUNC_QUALIFIER tmat2x3<T> const operator-
(
tmat2x3<T> const & m
)
@ -491,7 +491,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> const operator++
GLM_FUNC_QUALIFIER tmat2x3<T> const operator++
(
tmat2x3<T> const & m,
int
@ -503,7 +503,7 @@ namespace detail
}
template <typename T>
inline tmat2x3<T> const operator--
GLM_FUNC_QUALIFIER tmat2x3<T> const operator--
(
tmat2x3<T> const & m,
int
@ -518,7 +518,7 @@ namespace detail
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tmat2x3<T> const & m1,
tmat2x3<T> const & m2
@ -528,7 +528,7 @@ namespace detail
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tmat2x3<T> const & m1,
tmat2x3<T> const & m2

View File

@ -11,13 +11,13 @@ namespace glm{
namespace detail
{
template <typename T>
inline typename tmat2x4<T>::size_type tmat2x4<T>::col_size()
GLM_FUNC_QUALIFIER typename tmat2x4<T>::size_type tmat2x4<T>::col_size()
{
return 4;
}
template <typename T>
inline typename tmat2x4<T>::size_type tmat2x4<T>::row_size()
GLM_FUNC_QUALIFIER typename tmat2x4<T>::size_type tmat2x4<T>::row_size()
{
return 2;
}
@ -26,7 +26,7 @@ namespace detail
// Accesses
template <typename T>
inline typename tmat2x4<T>::col_type &
GLM_FUNC_QUALIFIER typename tmat2x4<T>::col_type &
tmat2x4<T>::operator[]
(
size_type i
@ -37,7 +37,7 @@ namespace detail
}
template <typename T>
inline typename tmat2x4<T>::col_type const &
GLM_FUNC_QUALIFIER typename tmat2x4<T>::col_type const &
tmat2x4<T>::operator[]
(
size_type i
@ -51,7 +51,7 @@ namespace detail
// Constructors
template <typename T>
inline tmat2x4<T>::tmat2x4()
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4()
{
value_type const Zero(0);
value_type const One(1);
@ -60,7 +60,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
tmat2x4<T> const & m
)
@ -70,14 +70,14 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
ctor
)
{}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
value_type const & s
)
@ -88,7 +88,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1
@ -99,7 +99,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
col_type const & v0,
col_type const & v1
@ -112,7 +112,7 @@ namespace detail
// Conversion
template <typename T>
template <typename U>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
tmat2x4<U> const & m
)
@ -122,7 +122,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
tmat2x2<T> const & m
)
@ -132,7 +132,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
tmat3x3<T> const & m
)
@ -142,7 +142,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
tmat4x4<T> const & m
)
@ -152,7 +152,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
tmat2x3<T> const & m
)
@ -162,7 +162,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
tmat3x2<T> const & m
)
@ -172,7 +172,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
tmat3x4<T> const & m
)
@ -182,7 +182,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
tmat4x2<T> const & m
)
@ -192,7 +192,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>::tmat2x4
GLM_FUNC_QUALIFIER tmat2x4<T>::tmat2x4
(
tmat4x3<T> const & m
)
@ -205,7 +205,7 @@ namespace detail
// Unary updatable operators
template <typename T>
inline tmat2x4<T>& tmat2x4<T>::operator=
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator=
(
tmat2x4<T> const & m
)
@ -217,7 +217,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x4<T>& tmat2x4<T>::operator=
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator=
(
tmat2x4<U> const & m
)
@ -229,7 +229,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x4<T>& tmat2x4<T>::operator+=
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator+=
(
U const & s
)
@ -241,7 +241,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x4<T>& tmat2x4<T>::operator+=
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator+=
(
tmat2x4<U> const & m
)
@ -253,7 +253,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x4<T>& tmat2x4<T>::operator-=
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator-=
(
U const & s
)
@ -265,7 +265,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x4<T>& tmat2x4<T>::operator-=
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator-=
(
tmat2x4<U> const & m
)
@ -277,7 +277,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x4<T>& tmat2x4<T>::operator*=
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator*=
(
U const & s
)
@ -289,7 +289,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x4<T>& tmat2x4<T>::operator*=
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator*=
(
tmat2x4<U> const & m
)
@ -299,7 +299,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat2x4<T> & tmat2x4<T>::operator/=
GLM_FUNC_QUALIFIER tmat2x4<T> & tmat2x4<T>::operator/=
(
U const & s
)
@ -310,7 +310,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>& tmat2x4<T>::operator++ ()
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator++ ()
{
++this->value[0];
++this->value[1];
@ -318,7 +318,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T>& tmat2x4<T>::operator-- ()
GLM_FUNC_QUALIFIER tmat2x4<T>& tmat2x4<T>::operator-- ()
{
--this->value[0];
--this->value[1];
@ -329,7 +329,7 @@ namespace detail
// Binary operators
template <typename T>
inline tmat2x4<T> operator+
GLM_FUNC_QUALIFIER tmat2x4<T> operator+
(
tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s
@ -341,7 +341,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T> operator+
GLM_FUNC_QUALIFIER tmat2x4<T> operator+
(
tmat2x4<T> const & m1,
tmat2x4<T> const & m2
@ -353,7 +353,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T> operator-
GLM_FUNC_QUALIFIER tmat2x4<T> operator-
(
tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s
@ -365,7 +365,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T> operator-
GLM_FUNC_QUALIFIER tmat2x4<T> operator-
(
tmat2x4<T> const & m1,
tmat2x4<T> const & m2
@ -377,7 +377,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T> operator*
GLM_FUNC_QUALIFIER tmat2x4<T> operator*
(
tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s
@ -389,7 +389,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T> operator*
GLM_FUNC_QUALIFIER tmat2x4<T> operator*
(
typename tmat2x4<T>::value_type const & s,
tmat2x4<T> const & m
@ -407,7 +407,7 @@ namespace detail
// X X
// X X
template <typename T>
inline typename tmat2x4<T>::col_type operator*
GLM_FUNC_QUALIFIER typename tmat2x4<T>::col_type operator*
(
tmat2x4<T> const & m,
typename tmat2x4<T>::row_type const & v
@ -426,7 +426,7 @@ namespace detail
// X X
// X X X X
template <typename T>
inline typename tmat2x4<T>::row_type operator*
GLM_FUNC_QUALIFIER typename tmat2x4<T>::row_type operator*
(
typename tmat2x4<T>::col_type const & v,
tmat2x4<T> const & m
@ -438,7 +438,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator*
GLM_FUNC_QUALIFIER tmat4x4<T> operator*
(
tmat2x4<T> const & m1,
tmat4x2<T> const & m2
@ -483,7 +483,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T> operator/
GLM_FUNC_QUALIFIER tmat2x4<T> operator/
(
tmat2x4<T> const & m,
typename tmat2x4<T>::value_type const & s
@ -495,7 +495,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T> operator/
GLM_FUNC_QUALIFIER tmat2x4<T> operator/
(
typename tmat2x4<T>::value_type const & s,
tmat2x4<T> const & m
@ -508,7 +508,7 @@ namespace detail
// Unary constant operators
template <typename T>
inline tmat2x4<T> const operator-
GLM_FUNC_QUALIFIER tmat2x4<T> const operator-
(
tmat2x4<T> const & m
)
@ -519,7 +519,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T> const operator++
GLM_FUNC_QUALIFIER tmat2x4<T> const operator++
(
tmat2x4<T> const & m,
int
@ -531,7 +531,7 @@ namespace detail
}
template <typename T>
inline tmat2x4<T> const operator--
GLM_FUNC_QUALIFIER tmat2x4<T> const operator--
(
tmat2x4<T> const & m,
int
@ -546,7 +546,7 @@ namespace detail
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tmat2x4<T> const & m1,
tmat2x4<T> const & m2
@ -556,7 +556,7 @@ namespace detail
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tmat2x4<T> const & m1,
tmat2x4<T> const & m2

View File

@ -11,13 +11,13 @@ namespace glm{
namespace detail
{
template <typename T>
inline typename tmat3x2<T>::size_type tmat3x2<T>::col_size()
GLM_FUNC_QUALIFIER typename tmat3x2<T>::size_type tmat3x2<T>::col_size()
{
return 2;
}
template <typename T>
inline typename tmat3x2<T>::size_type tmat3x2<T>::row_size()
GLM_FUNC_QUALIFIER typename tmat3x2<T>::size_type tmat3x2<T>::row_size()
{
return 3;
}
@ -26,7 +26,7 @@ namespace detail
// Accesses
template <typename T>
inline typename tmat3x2<T>::col_type &
GLM_FUNC_QUALIFIER typename tmat3x2<T>::col_type &
tmat3x2<T>::operator[]
(
size_type i
@ -37,7 +37,7 @@ namespace detail
}
template <typename T>
inline typename tmat3x2<T>::col_type const &
GLM_FUNC_QUALIFIER typename tmat3x2<T>::col_type const &
tmat3x2<T>::operator[]
(
size_type i
@ -51,7 +51,7 @@ namespace detail
// Constructors
template <typename T>
inline tmat3x2<T>::tmat3x2()
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2()
{
this->value[0] = col_type(1, 0);
this->value[1] = col_type(0, 1);
@ -59,7 +59,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
tmat3x2<T> const & m
)
@ -70,14 +70,14 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
ctor
)
{}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
value_type const & s
)
@ -88,7 +88,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1,
@ -101,7 +101,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
col_type const & v0,
col_type const & v1,
@ -116,7 +116,7 @@ namespace detail
// Conversion
template <typename T>
template <typename U>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
tmat3x2<U> const & m
)
@ -127,7 +127,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
tmat2x2<T> const & m
)
@ -138,7 +138,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
tmat3x3<T> const & m
)
@ -149,7 +149,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
tmat4x4<T> const & m
)
@ -160,7 +160,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
tmat2x3<T> const & m
)
@ -171,7 +171,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
tmat2x4<T> const & m
)
@ -182,7 +182,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
tmat3x4<T> const & m
)
@ -193,7 +193,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
tmat4x2<T> const & m
)
@ -204,7 +204,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>::tmat3x2
GLM_FUNC_QUALIFIER tmat3x2<T>::tmat3x2
(
tmat4x3<T> const & m
)
@ -218,7 +218,7 @@ namespace detail
// Unary updatable operators
template <typename T>
inline tmat3x2<T>& tmat3x2<T>::operator=
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator=
(
tmat3x2<T> const & m
)
@ -231,7 +231,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x2<T>& tmat3x2<T>::operator=
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator=
(
tmat3x2<U> const & m
)
@ -244,7 +244,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x2<T>& tmat3x2<T>::operator+=
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator+=
(
U const & s
)
@ -257,7 +257,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x2<T>& tmat3x2<T>::operator+=
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator+=
(
tmat3x2<U> const & m
)
@ -270,7 +270,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x2<T>& tmat3x2<T>::operator-=
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator-=
(
U const & s
)
@ -283,7 +283,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x2<T>& tmat3x2<T>::operator-=
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator-=
(
tmat3x2<U> const & m
)
@ -296,7 +296,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x2<T>& tmat3x2<T>::operator*=
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator*=
(
U const & s
)
@ -309,7 +309,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x2<T>& tmat3x2<T>::operator*=
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator*=
(
tmat3x2<U> const & m
)
@ -319,7 +319,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x2<T> & tmat3x2<T>::operator/=
GLM_FUNC_QUALIFIER tmat3x2<T> & tmat3x2<T>::operator/=
(
U const & s
)
@ -331,7 +331,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>& tmat3x2<T>::operator++ ()
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator++ ()
{
++this->value[0];
++this->value[1];
@ -340,7 +340,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T>& tmat3x2<T>::operator-- ()
GLM_FUNC_QUALIFIER tmat3x2<T>& tmat3x2<T>::operator-- ()
{
--this->value[0];
--this->value[1];
@ -352,7 +352,7 @@ namespace detail
// Binary operators
template <typename T>
inline tmat3x2<T> operator+
GLM_FUNC_QUALIFIER tmat3x2<T> operator+
(
tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s
@ -365,7 +365,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T> operator+
GLM_FUNC_QUALIFIER tmat3x2<T> operator+
(
tmat3x2<T> const & m1,
tmat3x2<T> const & m2
@ -378,7 +378,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T> operator-
GLM_FUNC_QUALIFIER tmat3x2<T> operator-
(
tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s
@ -391,7 +391,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T> operator-
GLM_FUNC_QUALIFIER tmat3x2<T> operator-
(
tmat3x2<T> const & m1,
tmat3x2<T> const & m2
@ -404,7 +404,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T> operator*
GLM_FUNC_QUALIFIER tmat3x2<T> operator*
(
tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s
@ -417,7 +417,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T> operator*
GLM_FUNC_QUALIFIER tmat3x2<T> operator*
(
typename tmat3x2<T>::value_type const & s,
tmat3x2<T> const & m
@ -430,7 +430,7 @@ namespace detail
}
template <typename T>
inline typename tmat3x2<T>::col_type operator*
GLM_FUNC_QUALIFIER typename tmat3x2<T>::col_type operator*
(
tmat3x2<T> const & m,
typename tmat3x2<T>::row_type const & v)
@ -441,7 +441,7 @@ namespace detail
}
template <typename T>
inline typename tmat3x2<T>::row_type operator*
GLM_FUNC_QUALIFIER typename tmat3x2<T>::row_type operator*
(
typename tmat3x2<T>::col_type const & v,
tmat3x2<T> const & m)
@ -453,7 +453,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator*
GLM_FUNC_QUALIFIER tmat2x2<T> operator*
(
tmat3x2<T> const & m1,
tmat2x3<T> const & m2
@ -482,7 +482,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T> operator/
GLM_FUNC_QUALIFIER tmat3x2<T> operator/
(
tmat3x2<T> const & m,
typename tmat3x2<T>::value_type const & s
@ -495,7 +495,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T> operator/
GLM_FUNC_QUALIFIER tmat3x2<T> operator/
(
typename tmat3x2<T>::value_type const & s,
tmat3x2<T> const & m
@ -509,7 +509,7 @@ namespace detail
// Unary constant operators
template <typename T>
inline tmat3x2<T> const operator-
GLM_FUNC_QUALIFIER tmat3x2<T> const operator-
(
tmat3x2<T> const & m
)
@ -521,7 +521,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T> const operator++
GLM_FUNC_QUALIFIER tmat3x2<T> const operator++
(
tmat3x2<T> const & m,
int
@ -535,7 +535,7 @@ namespace detail
}
template <typename T>
inline tmat3x2<T> const operator--
GLM_FUNC_QUALIFIER tmat3x2<T> const operator--
(
tmat3x2<T> const & m,
int
@ -552,7 +552,7 @@ namespace detail
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tmat3x2<T> const & m1,
tmat3x2<T> const & m2
@ -562,7 +562,7 @@ namespace detail
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tmat3x2<T> const & m1,
tmat3x2<T> const & m2

View File

@ -11,13 +11,13 @@ namespace glm{
namespace detail
{
template <typename T>
inline typename tmat3x3<T>::size_type tmat3x3<T>::col_size()
GLM_FUNC_QUALIFIER typename tmat3x3<T>::size_type tmat3x3<T>::col_size()
{
return 3;
}
template <typename T>
inline typename tmat3x3<T>::size_type tmat3x3<T>::row_size()
GLM_FUNC_QUALIFIER typename tmat3x3<T>::size_type tmat3x3<T>::row_size()
{
return 3;
}
@ -26,7 +26,7 @@ namespace detail
// Accesses
template <typename T>
inline typename tmat3x3<T>::col_type &
GLM_FUNC_QUALIFIER typename tmat3x3<T>::col_type &
tmat3x3<T>::operator[]
(
size_type i
@ -37,7 +37,7 @@ namespace detail
}
template <typename T>
inline typename tmat3x3<T>::col_type const &
GLM_FUNC_QUALIFIER typename tmat3x3<T>::col_type const &
tmat3x3<T>::operator[]
(
size_type i
@ -51,7 +51,7 @@ namespace detail
// Constructors
template <typename T>
inline tmat3x3<T>::tmat3x3()
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3()
{
value_type const Zero(0);
value_type const One(1);
@ -61,7 +61,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
tmat3x3<T> const & m
)
@ -72,14 +72,14 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
ctor
)
{}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
value_type const & s
)
@ -91,7 +91,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1,
@ -104,7 +104,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
col_type const & v0,
col_type const & v1,
@ -121,7 +121,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
tmat3x3<U> const & m
)
@ -132,7 +132,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
tmat2x2<T> const & m
)
@ -143,7 +143,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
tmat4x4<T> const & m
)
@ -154,7 +154,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
tmat2x3<T> const & m
)
@ -165,7 +165,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
tmat3x2<T> const & m
)
@ -176,7 +176,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
tmat2x4<T> const & m
)
@ -187,7 +187,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
tmat4x2<T> const & m
)
@ -198,7 +198,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
tmat3x4<T> const & m
)
@ -209,7 +209,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T>::tmat3x3
GLM_FUNC_QUALIFIER tmat3x3<T>::tmat3x3
(
tmat4x3<T> const & m
)
@ -223,7 +223,7 @@ namespace detail
// Operators
template <typename T>
inline tmat3x3<T> & tmat3x3<T>::operator=
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator=
(
tmat3x3<T> const & m
)
@ -236,7 +236,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x3<T> & tmat3x3<T>::operator=
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator=
(
tmat3x3<U> const & m
)
@ -249,7 +249,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x3<T> & tmat3x3<T>::operator+=
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator+=
(
U const & s
)
@ -262,7 +262,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x3<T> & tmat3x3<T>::operator+=
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator+=
(
tmat3x3<U> const & m
)
@ -275,7 +275,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x3<T> & tmat3x3<T>::operator-=
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator-=
(
U const & s
)
@ -288,7 +288,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x3<T> & tmat3x3<T>::operator-=
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator-=
(
tmat3x3<U> const & m
)
@ -301,7 +301,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x3<T> & tmat3x3<T>::operator*=
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator*=
(
U const & s
)
@ -314,7 +314,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x3<T> & tmat3x3<T>::operator*=
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator*=
(
tmat3x3<U> const & m
)
@ -324,7 +324,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x3<T> & tmat3x3<T>::operator/=
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator/=
(
U const & s
)
@ -337,7 +337,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x3<T> & tmat3x3<T>::operator/=
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator/=
(
tmat3x3<U> const & m
)
@ -346,7 +346,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> & tmat3x3<T>::operator++ ()
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator++ ()
{
++this->value[0];
++this->value[1];
@ -355,7 +355,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> & tmat3x3<T>::operator-- ()
GLM_FUNC_QUALIFIER tmat3x3<T> & tmat3x3<T>::operator-- ()
{
--this->value[0];
--this->value[1];
@ -364,7 +364,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> tmat3x3<T>::_inverse() const
GLM_FUNC_QUALIFIER tmat3x3<T> tmat3x3<T>::_inverse() const
{
T S00 = value[0][0];
T S01 = value[0][1];
@ -412,7 +412,7 @@ namespace detail
// Binary operators
template <typename T>
inline tmat3x3<T> operator+
GLM_FUNC_QUALIFIER tmat3x3<T> operator+
(
tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s
@ -425,7 +425,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator+
GLM_FUNC_QUALIFIER tmat3x3<T> operator+
(
typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m
@ -438,7 +438,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator+
GLM_FUNC_QUALIFIER tmat3x3<T> operator+
(
tmat3x3<T> const & m1,
tmat3x3<T> const & m2
@ -451,7 +451,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator-
GLM_FUNC_QUALIFIER tmat3x3<T> operator-
(
tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s
@ -464,7 +464,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator-
GLM_FUNC_QUALIFIER tmat3x3<T> operator-
(
typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m
@ -477,7 +477,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator-
GLM_FUNC_QUALIFIER tmat3x3<T> operator-
(
tmat3x3<T> const & m1,
tmat3x3<T> const & m2
@ -490,7 +490,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator*
GLM_FUNC_QUALIFIER tmat3x3<T> operator*
(
tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s
@ -503,7 +503,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator*
GLM_FUNC_QUALIFIER tmat3x3<T> operator*
(
typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m
@ -516,7 +516,7 @@ namespace detail
}
template <typename T>
inline typename tmat3x3<T>::col_type operator*
GLM_FUNC_QUALIFIER typename tmat3x3<T>::col_type operator*
(
tmat3x3<T> const & m,
typename tmat3x3<T>::row_type const & v
@ -529,7 +529,7 @@ namespace detail
}
template <typename T>
inline typename tmat3x3<T>::row_type operator*
GLM_FUNC_QUALIFIER typename tmat3x3<T>::row_type operator*
(
typename tmat3x3<T>::col_type const & v,
tmat3x3<T> const & m
@ -542,7 +542,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator*
GLM_FUNC_QUALIFIER tmat3x3<T> operator*
(
tmat3x3<T> const & m1,
tmat3x3<T> const & m2
@ -583,7 +583,7 @@ namespace detail
template <typename T>
inline tmat3x3<T> operator/
GLM_FUNC_QUALIFIER tmat3x3<T> operator/
(
tmat3x3<T> const & m,
typename tmat3x3<T>::value_type const & s
@ -596,7 +596,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator/
GLM_FUNC_QUALIFIER tmat3x3<T> operator/
(
typename tmat3x3<T>::value_type const & s,
tmat3x3<T> const & m
@ -609,7 +609,7 @@ namespace detail
}
template <typename T>
inline typename tmat3x3<T>::col_type operator/
GLM_FUNC_QUALIFIER typename tmat3x3<T>::col_type operator/
(
tmat3x3<T> const & m,
typename tmat3x3<T>::row_type const & v
@ -619,7 +619,7 @@ namespace detail
}
template <typename T>
inline typename tmat3x3<T>::row_type operator/
GLM_FUNC_QUALIFIER typename tmat3x3<T>::row_type operator/
(
typename tmat3x3<T>::col_type const & v,
tmat3x3<T> const & m
@ -629,7 +629,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator/
GLM_FUNC_QUALIFIER tmat3x3<T> operator/
(
tmat3x3<T> const & m1,
tmat3x3<T> const & m2
@ -640,7 +640,7 @@ namespace detail
// Unary constant operators
template <typename T>
inline tmat3x3<T> const operator-
GLM_FUNC_QUALIFIER tmat3x3<T> const operator-
(
tmat3x3<T> const & m
)
@ -652,7 +652,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> const operator++
GLM_FUNC_QUALIFIER tmat3x3<T> const operator++
(
tmat3x3<T> const & m,
int
@ -665,7 +665,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> const operator--
GLM_FUNC_QUALIFIER tmat3x3<T> const operator--
(
tmat3x3<T> const & m,
int
@ -681,7 +681,7 @@ namespace detail
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tmat3x3<T> const & m1,
tmat3x3<T> const & m2
@ -691,7 +691,7 @@ namespace detail
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tmat3x3<T> const & m1,
tmat3x3<T> const & m2

View File

@ -11,13 +11,13 @@ namespace glm{
namespace detail
{
template <typename T>
inline typename tmat3x4<T>::size_type tmat3x4<T>::col_size()
GLM_FUNC_QUALIFIER typename tmat3x4<T>::size_type tmat3x4<T>::col_size()
{
return 4;
}
template <typename T>
inline typename tmat3x4<T>::size_type tmat3x4<T>::row_size()
GLM_FUNC_QUALIFIER typename tmat3x4<T>::size_type tmat3x4<T>::row_size()
{
return 3;
}
@ -26,7 +26,7 @@ namespace detail
// Accesses
template <typename T>
inline typename tmat3x4<T>::col_type &
GLM_FUNC_QUALIFIER typename tmat3x4<T>::col_type &
tmat3x4<T>::operator[]
(
size_type i
@ -37,7 +37,7 @@ namespace detail
}
template <typename T>
inline typename tmat3x4<T>::col_type const &
GLM_FUNC_QUALIFIER typename tmat3x4<T>::col_type const &
tmat3x4<T>::operator[]
(
size_type i
@ -51,7 +51,7 @@ namespace detail
// Constructors
template <typename T>
inline tmat3x4<T>::tmat3x4()
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4()
{
value_type const Zero(0);
value_type const One(1);
@ -61,7 +61,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
tmat3x4<T> const & m
)
@ -72,14 +72,14 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
ctor
)
{}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
value_type const & s
)
@ -91,7 +91,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
@ -104,7 +104,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
col_type const & v0,
col_type const & v1,
@ -119,7 +119,7 @@ namespace detail
// Conversion
template <typename T>
template <typename U>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
tmat3x4<U> const & m
)
@ -130,7 +130,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
tmat2x2<T> const & m
)
@ -141,7 +141,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
tmat3x3<T> const & m
)
@ -152,7 +152,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
tmat4x4<T> const & m
)
@ -163,7 +163,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
tmat2x3<T> const & m
)
@ -174,7 +174,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
tmat3x2<T> const & m
)
@ -185,7 +185,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
tmat2x4<T> const & m
)
@ -196,7 +196,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
tmat4x2<T> const & m
)
@ -207,7 +207,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>::tmat3x4
GLM_FUNC_QUALIFIER tmat3x4<T>::tmat3x4
(
tmat4x3<T> const & m
)
@ -221,7 +221,7 @@ namespace detail
// Unary updatable operators
template <typename T>
inline tmat3x4<T>& tmat3x4<T>::operator=
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator=
(
tmat3x4<T> const & m
)
@ -234,7 +234,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x4<T>& tmat3x4<T>::operator=
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator=
(
tmat3x4<U> const & m
)
@ -247,7 +247,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x4<T>& tmat3x4<T>::operator+=
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator+=
(
U const & s
)
@ -260,7 +260,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x4<T>& tmat3x4<T>::operator+=
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator+=
(
tmat3x4<U> const & m
)
@ -273,7 +273,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x4<T>& tmat3x4<T>::operator-=
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator-=
(
U const & s
)
@ -286,7 +286,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x4<T>& tmat3x4<T>::operator-=
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator-=
(
tmat3x4<U> const & m
)
@ -299,7 +299,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x4<T>& tmat3x4<T>::operator*=
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator*=
(
U const & s
)
@ -312,7 +312,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x4<T>& tmat3x4<T>::operator*=
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator*=
(
tmat3x4<U> const & m
)
@ -322,7 +322,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat3x4<T> & tmat3x4<T>::operator/=
GLM_FUNC_QUALIFIER tmat3x4<T> & tmat3x4<T>::operator/=
(
U const & s
)
@ -334,7 +334,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>& tmat3x4<T>::operator++ ()
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator++ ()
{
++this->value[0];
++this->value[1];
@ -343,7 +343,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T>& tmat3x4<T>::operator-- ()
GLM_FUNC_QUALIFIER tmat3x4<T>& tmat3x4<T>::operator-- ()
{
--this->value[0];
--this->value[1];
@ -355,7 +355,7 @@ namespace detail
// Binary operators
template <typename T>
inline tmat3x4<T> operator+
GLM_FUNC_QUALIFIER tmat3x4<T> operator+
(
tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s
@ -368,7 +368,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T> operator+
GLM_FUNC_QUALIFIER tmat3x4<T> operator+
(
tmat3x4<T> const & m1,
tmat3x4<T> const & m2
@ -381,7 +381,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T> operator-
GLM_FUNC_QUALIFIER tmat3x4<T> operator-
(
tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s
@ -394,7 +394,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T> operator-
GLM_FUNC_QUALIFIER tmat3x4<T> operator-
(
tmat3x4<T> const & m1,
tmat3x4<T> const & m2
@ -407,7 +407,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T> operator*
GLM_FUNC_QUALIFIER tmat3x4<T> operator*
(
tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s
@ -420,7 +420,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T> operator*
GLM_FUNC_QUALIFIER tmat3x4<T> operator*
(
typename tmat3x4<T>::value_type const & s,
tmat3x4<T> const & m
@ -433,7 +433,7 @@ namespace detail
}
template <typename T>
inline typename tmat3x4<T>::col_type operator*
GLM_FUNC_QUALIFIER typename tmat3x4<T>::col_type operator*
(
tmat3x4<T> const & m,
typename tmat3x4<T>::row_type const & v
@ -452,7 +452,7 @@ namespace detail
// X X X
// X X X X
template <typename T>
inline typename tmat3x4<T>::row_type operator*
GLM_FUNC_QUALIFIER typename tmat3x4<T>::row_type operator*
(
typename tmat3x4<T>::col_type const & v,
tmat3x4<T> const & m
@ -465,7 +465,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator*
GLM_FUNC_QUALIFIER tmat4x4<T> operator*
(
tmat3x4<T> const & m1,
tmat4x3<T> const & m2
@ -518,7 +518,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T> operator/
GLM_FUNC_QUALIFIER tmat3x4<T> operator/
(
tmat3x4<T> const & m,
typename tmat3x4<T>::value_type const & s
@ -531,7 +531,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T> operator/
GLM_FUNC_QUALIFIER tmat3x4<T> operator/
(
typename tmat3x4<T>::value_type const & s,
tmat3x4<T> const & m
@ -545,7 +545,7 @@ namespace detail
// Unary constant operators
template <typename T>
inline tmat3x4<T> const operator-
GLM_FUNC_QUALIFIER tmat3x4<T> const operator-
(
tmat3x4<T> const & m
)
@ -557,7 +557,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T> const operator++
GLM_FUNC_QUALIFIER tmat3x4<T> const operator++
(
tmat3x4<T> const & m,
int
@ -570,7 +570,7 @@ namespace detail
}
template <typename T>
inline tmat3x4<T> const operator--
GLM_FUNC_QUALIFIER tmat3x4<T> const operator--
(
tmat3x4<T> const & m,
int
@ -586,7 +586,7 @@ namespace detail
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tmat3x4<T> const & m1,
tmat3x4<T> const & m2
@ -596,7 +596,7 @@ namespace detail
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tmat3x4<T> const & m1,
tmat3x4<T> const & m2

View File

@ -11,13 +11,13 @@ namespace glm{
namespace detail
{
template <typename T>
inline typename tmat4x2<T>::size_type tmat4x2<T>::col_size()
GLM_FUNC_QUALIFIER typename tmat4x2<T>::size_type tmat4x2<T>::col_size()
{
return 2;
}
template <typename T>
inline typename tmat4x2<T>::size_type tmat4x2<T>::row_size()
GLM_FUNC_QUALIFIER typename tmat4x2<T>::size_type tmat4x2<T>::row_size()
{
return 4;
}
@ -26,7 +26,7 @@ namespace detail
// Accesses
template <typename T>
inline typename tmat4x2<T>::col_type &
GLM_FUNC_QUALIFIER typename tmat4x2<T>::col_type &
tmat4x2<T>::operator[]
(
size_type i
@ -37,7 +37,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x2<T>::col_type const &
GLM_FUNC_QUALIFIER typename tmat4x2<T>::col_type const &
tmat4x2<T>::operator[]
(
size_type i
@ -51,7 +51,7 @@ namespace detail
// Constructors
template <typename T>
inline tmat4x2<T>::tmat4x2()
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2()
{
value_type const Zero(0);
value_type const One(1);
@ -62,7 +62,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
tmat4x2<T> const & m
)
@ -74,14 +74,14 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
ctor
)
{}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
value_type const & s
)
@ -94,7 +94,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1,
@ -109,7 +109,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
col_type const & v0,
col_type const & v1,
@ -126,7 +126,7 @@ namespace detail
// Conversion
template <typename T>
template <typename U>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
tmat4x2<U> const & m
)
@ -138,7 +138,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
tmat2x2<T> const & m
)
@ -150,7 +150,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
tmat3x3<T> const & m
)
@ -162,7 +162,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
tmat4x4<T> const & m
)
@ -174,7 +174,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
tmat2x3<T> const & m
)
@ -186,7 +186,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
tmat3x2<T> const & m
)
@ -198,7 +198,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
tmat2x4<T> const & m
)
@ -210,7 +210,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
tmat4x3<T> const & m
)
@ -222,7 +222,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T>::tmat4x2
GLM_FUNC_QUALIFIER tmat4x2<T>::tmat4x2
(
tmat3x4<T> const & m
)
@ -237,7 +237,7 @@ namespace detail
// Unary updatable operators
template <typename T>
inline tmat4x2<T>& tmat4x2<T>::operator=
GLM_FUNC_QUALIFIER tmat4x2<T>& tmat4x2<T>::operator=
(
tmat4x2<T> const & m
)
@ -251,7 +251,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x2<T>& tmat4x2<T>::operator=
GLM_FUNC_QUALIFIER tmat4x2<T>& tmat4x2<T>::operator=
(
tmat4x2<U> const & m
)
@ -265,7 +265,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x2<T> & tmat4x2<T>::operator+=
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator+=
(
U const & s
)
@ -279,7 +279,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x2<T> & tmat4x2<T>::operator+=
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator+=
(
tmat4x2<U> const & m
)
@ -293,7 +293,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x2<T> & tmat4x2<T>::operator-=
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator-=
(
U const & s
)
@ -307,7 +307,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x2<T> & tmat4x2<T>::operator-=
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator-=
(
tmat4x2<U> const & m
)
@ -321,7 +321,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x2<T> & tmat4x2<T>::operator*=
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator*=
(
U const & s
)
@ -335,7 +335,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x2<T> & tmat4x2<T>::operator*=
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator*=
(
tmat4x2<U> const & m
)
@ -345,7 +345,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x2<T> & tmat4x2<T>::operator/=
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator/=
(
U const & s
)
@ -358,7 +358,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> & tmat4x2<T>::operator++ ()
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator++ ()
{
++this->value[0];
++this->value[1];
@ -368,7 +368,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> & tmat4x2<T>::operator-- ()
GLM_FUNC_QUALIFIER tmat4x2<T> & tmat4x2<T>::operator-- ()
{
--this->value[0];
--this->value[1];
@ -381,7 +381,7 @@ namespace detail
// Binary operators
template <typename T>
inline tmat4x2<T> operator+
GLM_FUNC_QUALIFIER tmat4x2<T> operator+
(
tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s
@ -395,7 +395,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> operator+
GLM_FUNC_QUALIFIER tmat4x2<T> operator+
(
tmat4x2<T> const & m1,
tmat4x2<T> const & m2
@ -409,7 +409,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> operator-
GLM_FUNC_QUALIFIER tmat4x2<T> operator-
(
tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s
@ -423,7 +423,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> operator-
GLM_FUNC_QUALIFIER tmat4x2<T> operator-
(
tmat4x2<T> const & m1,
tmat4x2<T> const & m2
@ -437,7 +437,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> operator*
GLM_FUNC_QUALIFIER tmat4x2<T> operator*
(
tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s
@ -451,7 +451,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> operator*
GLM_FUNC_QUALIFIER tmat4x2<T> operator*
(
typename tmat4x2<T>::value_type const & s,
tmat4x2<T> const & m
@ -465,7 +465,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x2<T>::col_type operator*
GLM_FUNC_QUALIFIER typename tmat4x2<T>::col_type operator*
(
tmat4x2<T> const & m,
typename tmat4x2<T>::row_type const & v)
@ -476,7 +476,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x2<T>::row_type operator*
GLM_FUNC_QUALIFIER typename tmat4x2<T>::row_type operator*
(
typename tmat4x2<T>::col_type const & v,
tmat4x2<T> const & m)
@ -489,7 +489,7 @@ namespace detail
}
template <typename T>
inline tmat2x2<T> operator*
GLM_FUNC_QUALIFIER tmat2x2<T> operator*
(
tmat4x2<T> const & m1,
tmat2x4<T> const & m2
@ -522,7 +522,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> operator/
GLM_FUNC_QUALIFIER tmat4x2<T> operator/
(
tmat4x2<T> const & m,
typename tmat4x2<T>::value_type const & s
@ -536,7 +536,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> operator/
GLM_FUNC_QUALIFIER tmat4x2<T> operator/
(
typename tmat4x2<T>::value_type const & s,
tmat4x2<T> const & m
@ -551,7 +551,7 @@ namespace detail
// Unary constant operators
template <typename T>
inline tmat4x2<T> const operator-
GLM_FUNC_QUALIFIER tmat4x2<T> const operator-
(
tmat4x2<T> const & m
)
@ -564,7 +564,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> const operator++
GLM_FUNC_QUALIFIER tmat4x2<T> const operator++
(
tmat4x2<T> const & m,
int
@ -578,7 +578,7 @@ namespace detail
}
template <typename T>
inline tmat4x2<T> const operator--
GLM_FUNC_QUALIFIER tmat4x2<T> const operator--
(
tmat4x2<T> const & m,
int
@ -595,7 +595,7 @@ namespace detail
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tmat4x2<T> const & m1,
tmat4x2<T> const & m2
@ -605,7 +605,7 @@ namespace detail
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tmat4x2<T> const & m1,
tmat4x2<T> const & m2

View File

@ -11,13 +11,13 @@ namespace glm{
namespace detail
{
template <typename T>
inline typename tmat4x3<T>::size_type tmat4x3<T>::col_size()
GLM_FUNC_QUALIFIER typename tmat4x3<T>::size_type tmat4x3<T>::col_size()
{
return 3;
}
template <typename T>
inline typename tmat4x3<T>::size_type tmat4x3<T>::row_size()
GLM_FUNC_QUALIFIER typename tmat4x3<T>::size_type tmat4x3<T>::row_size()
{
return 4;
}
@ -26,7 +26,7 @@ namespace detail
// Accesses
template <typename T>
inline typename tmat4x3<T>::col_type &
GLM_FUNC_QUALIFIER typename tmat4x3<T>::col_type &
tmat4x3<T>::operator[]
(
size_type i
@ -37,7 +37,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x3<T>::col_type const &
GLM_FUNC_QUALIFIER typename tmat4x3<T>::col_type const &
tmat4x3<T>::operator[]
(
size_type i
@ -51,7 +51,7 @@ namespace detail
// Constructors
template <typename T>
inline tmat4x3<T>::tmat4x3()
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3()
{
value_type const Zero(0);
value_type const One(1);
@ -62,7 +62,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
tmat4x3<T> const & m
)
@ -74,14 +74,14 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
ctor
)
{}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
value_type const & s
)
@ -94,7 +94,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1,
@ -109,7 +109,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
col_type const & v0,
col_type const & v1,
@ -128,7 +128,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
tmat4x3<U> const & m
)
@ -140,7 +140,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
tmat2x2<T> const & m
)
@ -152,7 +152,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
tmat3x3<T> const & m
)
@ -164,7 +164,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
tmat4x4<T> const & m
)
@ -176,7 +176,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
tmat2x3<T> const & m
)
@ -188,7 +188,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
tmat3x2<T> const & m
)
@ -200,7 +200,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
tmat2x4<T> const & m
)
@ -212,7 +212,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
tmat4x2<T> const & m
)
@ -224,7 +224,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T>::tmat4x3
GLM_FUNC_QUALIFIER tmat4x3<T>::tmat4x3
(
tmat3x4<T> const & m
)
@ -239,7 +239,7 @@ namespace detail
// Unary updatable operators
template <typename T>
inline tmat4x3<T>& tmat4x3<T>::operator=
GLM_FUNC_QUALIFIER tmat4x3<T>& tmat4x3<T>::operator=
(
tmat4x3<T> const & m
)
@ -253,7 +253,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x3<T>& tmat4x3<T>::operator=
GLM_FUNC_QUALIFIER tmat4x3<T>& tmat4x3<T>::operator=
(
tmat4x3<U> const & m
)
@ -267,7 +267,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x3<T> & tmat4x3<T>::operator+=
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator+=
(
U const & s
)
@ -281,7 +281,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x3<T> & tmat4x3<T>::operator+=
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator+=
(
tmat4x3<U> const & m
)
@ -295,7 +295,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x3<T> & tmat4x3<T>::operator-=
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator-=
(
U const & s
)
@ -309,7 +309,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x3<T> & tmat4x3<T>::operator-=
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator-=
(
tmat4x3<U> const & m
)
@ -323,7 +323,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x3<T> & tmat4x3<T>::operator*=
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator*=
(
U const & s
)
@ -337,7 +337,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x3<T> & tmat4x3<T>::operator*=
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator*=
(
tmat4x3<U> const & m
)
@ -347,7 +347,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x3<T> & tmat4x3<T>::operator/=
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator/=
(
U const & s
)
@ -360,7 +360,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> & tmat4x3<T>::operator++ ()
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator++ ()
{
++this->value[0];
++this->value[1];
@ -370,7 +370,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> & tmat4x3<T>::operator-- ()
GLM_FUNC_QUALIFIER tmat4x3<T> & tmat4x3<T>::operator-- ()
{
--this->value[0];
--this->value[1];
@ -383,7 +383,7 @@ namespace detail
// Binary operators
template <typename T>
inline tmat4x3<T> operator+ (
GLM_FUNC_QUALIFIER tmat4x3<T> operator+ (
tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s)
{
@ -395,7 +395,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> operator+ (
GLM_FUNC_QUALIFIER tmat4x3<T> operator+ (
tmat4x3<T> const & m1,
tmat4x3<T> const & m2)
{
@ -407,7 +407,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> operator- (
GLM_FUNC_QUALIFIER tmat4x3<T> operator- (
tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s)
{
@ -419,7 +419,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> operator- (
GLM_FUNC_QUALIFIER tmat4x3<T> operator- (
tmat4x3<T> const & m1,
tmat4x3<T> const & m2)
{
@ -431,7 +431,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> operator* (
GLM_FUNC_QUALIFIER tmat4x3<T> operator* (
tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s)
{
@ -443,7 +443,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> operator* (
GLM_FUNC_QUALIFIER tmat4x3<T> operator* (
typename tmat4x3<T>::value_type const & s,
tmat4x3<T> const & m)
{
@ -455,7 +455,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x3<T>::col_type operator*
GLM_FUNC_QUALIFIER typename tmat4x3<T>::col_type operator*
(
tmat4x3<T> const & m,
typename tmat4x3<T>::row_type const & v)
@ -467,7 +467,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x3<T>::row_type operator*
GLM_FUNC_QUALIFIER typename tmat4x3<T>::row_type operator*
(
typename tmat4x3<T>::col_type const & v,
tmat4x3<T> const & m)
@ -480,7 +480,7 @@ namespace detail
}
template <typename T>
inline tmat3x3<T> operator*
GLM_FUNC_QUALIFIER tmat3x3<T> operator*
(
tmat4x3<T> const & m1,
tmat3x4<T> const & m2
@ -526,7 +526,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> operator/
GLM_FUNC_QUALIFIER tmat4x3<T> operator/
(
tmat4x3<T> const & m,
typename tmat4x3<T>::value_type const & s
@ -540,7 +540,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> operator/
GLM_FUNC_QUALIFIER tmat4x3<T> operator/
(
typename tmat4x3<T>::value_type const & s,
tmat4x3<T> const & m
@ -555,7 +555,7 @@ namespace detail
// Unary constant operators
template <typename T>
inline tmat4x3<T> const operator-
GLM_FUNC_QUALIFIER tmat4x3<T> const operator-
(
tmat4x3<T> const & m
)
@ -568,7 +568,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> const operator++
GLM_FUNC_QUALIFIER tmat4x3<T> const operator++
(
tmat4x3<T> const & m,
int
@ -582,7 +582,7 @@ namespace detail
}
template <typename T>
inline tmat4x3<T> const operator--
GLM_FUNC_QUALIFIER tmat4x3<T> const operator--
(
tmat4x3<T> const & m,
int
@ -599,7 +599,7 @@ namespace detail
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tmat4x3<T> const & m1,
tmat4x3<T> const & m2
@ -609,7 +609,7 @@ namespace detail
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tmat4x3<T> const & m1,
tmat4x3<T> const & m2

View File

@ -11,13 +11,13 @@ namespace glm{
namespace detail
{
template <typename T>
inline typename tmat4x4<T>::size_type tmat4x4<T>::col_size()
GLM_FUNC_QUALIFIER typename tmat4x4<T>::size_type tmat4x4<T>::col_size()
{
return 4;
}
template <typename T>
inline typename tmat4x4<T>::size_type tmat4x4<T>::row_size()
GLM_FUNC_QUALIFIER typename tmat4x4<T>::size_type tmat4x4<T>::row_size()
{
return 4;
}
@ -26,7 +26,7 @@ namespace detail
// Accesses
template <typename T>
inline typename tmat4x4<T>::col_type &
GLM_FUNC_QUALIFIER typename tmat4x4<T>::col_type &
tmat4x4<T>::operator[]
(
size_type i
@ -37,7 +37,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x4<T>::col_type const &
GLM_FUNC_QUALIFIER typename tmat4x4<T>::col_type const &
tmat4x4<T>::operator[]
(
size_type i
@ -51,7 +51,7 @@ namespace detail
// Constructors
template <typename T>
inline tmat4x4<T>::tmat4x4()
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4()
{
value_type Zero(0);
value_type One(1);
@ -62,7 +62,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
tmat4x4<T> const & m
)
@ -74,14 +74,14 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
ctor
)
{}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
value_type const & s
)
@ -94,7 +94,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
@ -109,7 +109,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
col_type const & v0,
col_type const & v1,
@ -125,7 +125,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
tmat4x4<U> const & m
)
@ -137,7 +137,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
tmat2x2<T> const & m
)
@ -149,7 +149,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
tmat3x3<T> const & m
)
@ -161,7 +161,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
tmat2x3<T> const & m
)
@ -173,7 +173,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
tmat3x2<T> const & m
)
@ -185,7 +185,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
tmat2x4<T> const & m
)
@ -197,7 +197,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
tmat4x2<T> const & m
)
@ -209,7 +209,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
tmat3x4<T> const & m
)
@ -221,7 +221,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T>::tmat4x4
GLM_FUNC_QUALIFIER tmat4x4<T>::tmat4x4
(
tmat4x3<T> const & m
)
@ -236,7 +236,7 @@ namespace detail
// Operators
template <typename T>
inline tmat4x4<T>& tmat4x4<T>::operator=
GLM_FUNC_QUALIFIER tmat4x4<T>& tmat4x4<T>::operator=
(
tmat4x4<T> const & m
)
@ -252,7 +252,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x4<T>& tmat4x4<T>::operator=
GLM_FUNC_QUALIFIER tmat4x4<T>& tmat4x4<T>::operator=
(
tmat4x4<U> const & m
)
@ -268,7 +268,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x4<T>& tmat4x4<T>::operator+=
GLM_FUNC_QUALIFIER tmat4x4<T>& tmat4x4<T>::operator+=
(
U const & s
)
@ -282,7 +282,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x4<T>& tmat4x4<T>::operator+=
GLM_FUNC_QUALIFIER tmat4x4<T>& tmat4x4<T>::operator+=
(
tmat4x4<U> const & m
)
@ -296,7 +296,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x4<T> & tmat4x4<T>::operator-=
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator-=
(
U const & s
)
@ -310,7 +310,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x4<T> & tmat4x4<T>::operator-=
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator-=
(
tmat4x4<U> const & m
)
@ -324,7 +324,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x4<T> & tmat4x4<T>::operator*=
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator*=
(
U const & s
)
@ -338,7 +338,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x4<T> & tmat4x4<T>::operator*=
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator*=
(
tmat4x4<U> const & m
)
@ -348,7 +348,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x4<T> & tmat4x4<T>::operator/=
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator/=
(
U const & s
)
@ -362,7 +362,7 @@ namespace detail
template <typename T>
template <typename U>
inline tmat4x4<T> & tmat4x4<T>::operator/=
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator/=
(
tmat4x4<U> const & m
)
@ -371,7 +371,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> & tmat4x4<T>::operator++ ()
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator++ ()
{
++this->value[0];
++this->value[1];
@ -381,7 +381,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> & tmat4x4<T>::operator-- ()
GLM_FUNC_QUALIFIER tmat4x4<T> & tmat4x4<T>::operator-- ()
{
--this->value[0];
--this->value[1];
@ -391,7 +391,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> tmat4x4<T>::_inverse() const
GLM_FUNC_QUALIFIER tmat4x4<T> tmat4x4<T>::_inverse() const
{
// Calculate all mat2 determinants
value_type SubFactor00 = this->value[2][2] * this->value[3][3] - this->value[3][2] * this->value[2][3];
@ -468,7 +468,7 @@ namespace detail
// Binary operators
template <typename T>
inline tmat4x4<T> operator+
GLM_FUNC_QUALIFIER tmat4x4<T> operator+
(
tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s
@ -482,7 +482,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator+
GLM_FUNC_QUALIFIER tmat4x4<T> operator+
(
typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m
@ -496,7 +496,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator+
GLM_FUNC_QUALIFIER tmat4x4<T> operator+
(
tmat4x4<T> const & m1,
tmat4x4<T> const & m2
@ -510,7 +510,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator-
GLM_FUNC_QUALIFIER tmat4x4<T> operator-
(
tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s
@ -524,7 +524,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator-
GLM_FUNC_QUALIFIER tmat4x4<T> operator-
(
typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m
@ -538,7 +538,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator-
GLM_FUNC_QUALIFIER tmat4x4<T> operator-
(
tmat4x4<T> const & m1,
tmat4x4<T> const & m2
@ -552,7 +552,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator*
GLM_FUNC_QUALIFIER tmat4x4<T> operator*
(
tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s
@ -566,7 +566,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator*
GLM_FUNC_QUALIFIER tmat4x4<T> operator*
(
typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m
@ -580,7 +580,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x4<T>::col_type operator*
GLM_FUNC_QUALIFIER typename tmat4x4<T>::col_type operator*
(
tmat4x4<T> const & m,
typename tmat4x4<T>::row_type const & v
@ -594,7 +594,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x4<T>::row_type operator*
GLM_FUNC_QUALIFIER typename tmat4x4<T>::row_type operator*
(
typename tmat4x4<T>::col_type const & v,
tmat4x4<T> const & m
@ -608,7 +608,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator*
GLM_FUNC_QUALIFIER tmat4x4<T> operator*
(
tmat4x4<T> const & m1,
tmat4x4<T> const & m2
@ -633,7 +633,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator/
GLM_FUNC_QUALIFIER tmat4x4<T> operator/
(
tmat4x4<T> const & m,
typename tmat4x4<T>::value_type const & s
@ -647,7 +647,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator/
GLM_FUNC_QUALIFIER tmat4x4<T> operator/
(
typename tmat4x4<T>::value_type const & s,
tmat4x4<T> const & m
@ -661,7 +661,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x4<T>::col_type operator/
GLM_FUNC_QUALIFIER typename tmat4x4<T>::col_type operator/
(
tmat4x4<T> const & m,
typename tmat4x4<T>::row_type const & v
@ -671,7 +671,7 @@ namespace detail
}
template <typename T>
inline typename tmat4x4<T>::row_type operator/
GLM_FUNC_QUALIFIER typename tmat4x4<T>::row_type operator/
(
typename tmat4x4<T>::col_type const & v,
tmat4x4<T> const & m
@ -681,7 +681,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> operator/
GLM_FUNC_QUALIFIER tmat4x4<T> operator/
(
tmat4x4<T> const & m1,
tmat4x4<T> const & m2
@ -692,7 +692,7 @@ namespace detail
// Unary constant operators
template <typename T>
inline tmat4x4<T> const operator-
GLM_FUNC_QUALIFIER tmat4x4<T> const operator-
(
tmat4x4<T> const & m
)
@ -705,7 +705,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> const operator++
GLM_FUNC_QUALIFIER tmat4x4<T> const operator++
(
tmat4x4<T> const & m,
int
@ -719,7 +719,7 @@ namespace detail
}
template <typename T>
inline tmat4x4<T> const operator--
GLM_FUNC_QUALIFIER tmat4x4<T> const operator--
(
tmat4x4<T> const & m,
int
@ -736,7 +736,7 @@ namespace detail
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tmat4x4<T> const & m1,
tmat4x4<T> const & m2
@ -746,7 +746,7 @@ namespace detail
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tmat4x4<T> const & m1,
tmat4x4<T> const & m2

View File

@ -12,7 +12,7 @@ namespace glm
namespace detail
{
template <typename T>
inline typename tvec1<T>::size_type tvec1<T>::value_size()
GLM_FUNC_QUALIFIER typename tvec1<T>::size_type tvec1<T>::value_size()
{
return 1;
}
@ -21,7 +21,7 @@ namespace glm
// Accesses
template <typename T>
inline typename tvec1<T>::value_type & tvec1<T>::operator[]
GLM_FUNC_QUALIFIER typename tvec1<T>::value_type & tvec1<T>::operator[]
(
size_type i
)
@ -31,7 +31,7 @@ namespace glm
}
template <typename T>
inline typename tvec1<T>::value_type const & tvec1<T>::operator[]
GLM_FUNC_QUALIFIER typename tvec1<T>::value_type const & tvec1<T>::operator[]
(
size_type i
) const
@ -44,19 +44,19 @@ namespace glm
// Implicit basic constructors
template <typename T>
inline tvec1<T>::tvec1() :
GLM_FUNC_QUALIFIER tvec1<T>::tvec1() :
x(value_type(0))
{}
template <typename T>
inline tvec1<T>::tvec1
GLM_FUNC_QUALIFIER tvec1<T>::tvec1
(
ctor
)
{}
template <typename T>
inline tvec1<T>::tvec1
GLM_FUNC_QUALIFIER tvec1<T>::tvec1
(
tvec1<T> const & v
) :
@ -67,7 +67,7 @@ namespace glm
// Explicit basic constructors
template <typename T>
inline tvec1<T>::tvec1
GLM_FUNC_QUALIFIER tvec1<T>::tvec1
(
value_type const & s
) :
@ -78,7 +78,7 @@ namespace glm
// Swizzle constructors
template <typename T>
inline tvec1<T>::tvec1
GLM_FUNC_QUALIFIER tvec1<T>::tvec1
(
tref1<T> const & r
) :
@ -90,7 +90,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec1<T>::tvec1
GLM_FUNC_QUALIFIER tvec1<T>::tvec1
(
U const & s
) :
@ -102,7 +102,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec1<T>::tvec1
GLM_FUNC_QUALIFIER tvec1<T>::tvec1
(
tvec2<U> const & v
) :
@ -111,7 +111,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec1<T>::tvec1
GLM_FUNC_QUALIFIER tvec1<T>::tvec1
(
tvec3<U> const & v
) :
@ -120,7 +120,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec1<T>::tvec1
GLM_FUNC_QUALIFIER tvec1<T>::tvec1
(
tvec4<U> const & v
) :
@ -131,7 +131,7 @@ namespace glm
// Unary arithmetic operators
template <typename T>
inline tvec1<T> & tvec1<T>::operator=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator=
(
tvec1<T> const & v
)
@ -141,7 +141,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator+=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator+=
(
value_type const & s
)
@ -151,7 +151,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator+=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator+=
(
tvec1<T> const & v
)
@ -161,7 +161,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator-=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator-=
(
value_type const & s
)
@ -171,7 +171,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator-=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator-=
(
tvec1<T> const & v
)
@ -181,7 +181,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator*=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator*=
(
value_type const & s
)
@ -191,7 +191,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator*=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator*=
(
tvec1<T> const & v
)
@ -201,7 +201,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator/=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator/=
(
value_type const & s
)
@ -211,7 +211,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator/=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator/=
(
tvec1<T> const & v
)
@ -221,14 +221,14 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator++()
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator++()
{
++this->x;
return *this;
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator--()
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator--()
{
--this->x;
return *this;
@ -238,7 +238,7 @@ namespace glm
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -248,7 +248,7 @@ namespace glm
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -261,7 +261,7 @@ namespace glm
// Unary bit operators
template <typename T>
inline tvec1<T> & tvec1<T>::operator%=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator%=
(
value_type const & s
)
@ -271,7 +271,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator%=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator%=
(
tvec1<T> const & v
)
@ -281,7 +281,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator&=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator&=
(
value_type const & s
)
@ -291,7 +291,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator&=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator&=
(
tvec1<T> const & v
)
@ -301,7 +301,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator|=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator|=
(
value_type const & s
)
@ -311,7 +311,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator|=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator|=
(
tvec1<T> const & v
)
@ -321,7 +321,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator^=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator^=
(
value_type const & s
)
@ -331,7 +331,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator^=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator^=
(
tvec1<T> const & v
)
@ -341,7 +341,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator<<=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator<<=
(
value_type const & s
)
@ -351,7 +351,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator<<=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator<<=
(
tvec1<T> const & v
)
@ -361,7 +361,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator>>=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator>>=
(
value_type const & s
)
@ -371,7 +371,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> & tvec1<T>::operator>>=
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator>>=
(
tvec1<T> const & v
)
@ -384,14 +384,14 @@ namespace glm
// Swizzle operators
template <typename T>
inline T
GLM_FUNC_QUALIFIER T
tvec1<T>::swizzle(comp x) const
{
return (*this)[x];
}
template <typename T>
inline tvec2<T>
GLM_FUNC_QUALIFIER tvec2<T>
tvec1<T>::swizzle
(
comp x,
@ -404,7 +404,7 @@ namespace glm
}
template <typename T>
inline tvec3<T>
GLM_FUNC_QUALIFIER tvec3<T>
tvec1<T>::swizzle
(
comp x,
@ -419,7 +419,7 @@ namespace glm
}
template <typename T>
inline tvec4<T>
GLM_FUNC_QUALIFIER tvec4<T>
tvec1<T>::swizzle
(
comp x,
@ -436,7 +436,7 @@ namespace glm
}
template <typename T>
inline tref1<T>
GLM_FUNC_QUALIFIER tref1<T>
tvec1<T>::swizzle
(
comp x
@ -450,7 +450,7 @@ namespace glm
// Binary arithmetic operators
template <typename T>
inline tvec1<T> operator+
GLM_FUNC_QUALIFIER tvec1<T> operator+
(
tvec1<T> const & v,
typename tvec1<T>::value_type const & s
@ -461,7 +461,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator+
GLM_FUNC_QUALIFIER tvec1<T> operator+
(
typename tvec1<T>::value_type const & s,
tvec1<T> const & v
@ -472,7 +472,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator+
GLM_FUNC_QUALIFIER tvec1<T> operator+
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -484,7 +484,7 @@ namespace glm
//operator-
template <typename T>
inline tvec1<T> operator-
GLM_FUNC_QUALIFIER tvec1<T> operator-
(
tvec1<T> const & v,
typename tvec1<T>::value_type const & s
@ -495,7 +495,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator-
GLM_FUNC_QUALIFIER tvec1<T> operator-
(
typename tvec1<T>::value_type const & s,
tvec1<T> const & v
@ -506,7 +506,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator-
GLM_FUNC_QUALIFIER tvec1<T> operator-
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -518,7 +518,7 @@ namespace glm
//operator*
template <typename T>
inline tvec1<T> operator*
GLM_FUNC_QUALIFIER tvec1<T> operator*
(
tvec1<T> const & v,
typename tvec1<T>::value_type const & s
@ -529,7 +529,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator*
GLM_FUNC_QUALIFIER tvec1<T> operator*
(
typename tvec1<T>::value_type const & s,
tvec1<T> const & v
@ -540,7 +540,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator*
GLM_FUNC_QUALIFIER tvec1<T> operator*
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -552,7 +552,7 @@ namespace glm
//operator/
template <typename T>
inline tvec1<T> operator/
GLM_FUNC_QUALIFIER tvec1<T> operator/
(
tvec1<T> const & v,
typename tvec1<T>::value_type const & s
@ -563,7 +563,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator/
GLM_FUNC_QUALIFIER tvec1<T> operator/
(
typename tvec1<T>::value_type const & s,
tvec1<T> const & v
@ -574,7 +574,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator/
GLM_FUNC_QUALIFIER tvec1<T> operator/
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -586,7 +586,7 @@ namespace glm
// Unary constant operators
template <typename T>
inline tvec1<T> operator-
GLM_FUNC_QUALIFIER tvec1<T> operator-
(
tvec1<T> const & v
)
@ -596,7 +596,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator++
GLM_FUNC_QUALIFIER tvec1<T> operator++
(
tvec1<T> const & v,
int
@ -607,7 +607,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator--
GLM_FUNC_QUALIFIER tvec1<T> operator--
(
tvec1<T> const & v,
int
@ -621,7 +621,7 @@ namespace glm
// Binary bit operators
template <typename T>
inline tvec1<T> operator%
GLM_FUNC_QUALIFIER tvec1<T> operator%
(
tvec1<T> const & v,
typename tvec1<T>::value_type const & s
@ -632,7 +632,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator%
GLM_FUNC_QUALIFIER tvec1<T> operator%
(
typename tvec1<T>::value_type const & s,
tvec1<T> const & v
@ -643,7 +643,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator%
GLM_FUNC_QUALIFIER tvec1<T> operator%
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -654,7 +654,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator&
GLM_FUNC_QUALIFIER tvec1<T> operator&
(
tvec1<T> const & v,
typename tvec1<T>::value_type const & s
@ -665,7 +665,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator&
GLM_FUNC_QUALIFIER tvec1<T> operator&
(
typename tvec1<T>::value_type const & s,
tvec1<T> const & v
@ -676,7 +676,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator&
GLM_FUNC_QUALIFIER tvec1<T> operator&
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -687,7 +687,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator|
GLM_FUNC_QUALIFIER tvec1<T> operator|
(
tvec1<T> const & v,
typename tvec1<T>::value_type const & s
@ -698,7 +698,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator|
GLM_FUNC_QUALIFIER tvec1<T> operator|
(
typename tvec1<T>::value_type const & s,
tvec1<T> const & v
@ -709,7 +709,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator|
GLM_FUNC_QUALIFIER tvec1<T> operator|
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -720,7 +720,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator^
GLM_FUNC_QUALIFIER tvec1<T> operator^
(
tvec1<T> const & v,
typename tvec1<T>::value_type const & s
@ -731,7 +731,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator^
GLM_FUNC_QUALIFIER tvec1<T> operator^
(
typename tvec1<T>::value_type const & s,
tvec1<T> const & v
@ -742,7 +742,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator^
GLM_FUNC_QUALIFIER tvec1<T> operator^
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -753,7 +753,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator<<
GLM_FUNC_QUALIFIER tvec1<T> operator<<
(
tvec1<T> const & v,
typename tvec1<T>::value_type const & s
@ -764,7 +764,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator<<
GLM_FUNC_QUALIFIER tvec1<T> operator<<
(
typename tvec1<T>::value_type const & s,
tvec1<T> const & v
@ -775,7 +775,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator<<
GLM_FUNC_QUALIFIER tvec1<T> operator<<
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -786,7 +786,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator>>
GLM_FUNC_QUALIFIER tvec1<T> operator>>
(
tvec1<T> const & v,
typename tvec1<T>::value_type const & s
@ -797,7 +797,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator>>
GLM_FUNC_QUALIFIER tvec1<T> operator>>
(
typename tvec1<T>::value_type const & s,
tvec1<T> const & v
@ -808,7 +808,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator>>
GLM_FUNC_QUALIFIER tvec1<T> operator>>
(
tvec1<T> const & v1,
tvec1<T> const & v2
@ -819,7 +819,7 @@ namespace glm
}
template <typename T>
inline tvec1<T> operator~
GLM_FUNC_QUALIFIER tvec1<T> operator~
(
tvec1<T> const & v
)
@ -832,7 +832,7 @@ namespace glm
// tref definition
template <typename T>
inline tref1<T>::tref1
GLM_FUNC_QUALIFIER tref1<T>::tref1
(
T & x
) :
@ -840,7 +840,7 @@ namespace glm
{}
template <typename T>
inline tref1<T>::tref1
GLM_FUNC_QUALIFIER tref1<T>::tref1
(
tref1<T> const & r
) :
@ -848,7 +848,7 @@ namespace glm
{}
template <typename T>
inline tref1<T>::tref1
GLM_FUNC_QUALIFIER tref1<T>::tref1
(
tvec1<T> const & v
) :
@ -856,7 +856,7 @@ namespace glm
{}
template <typename T>
inline tref1<T> & tref1<T>::operator=
GLM_FUNC_QUALIFIER tref1<T> & tref1<T>::operator=
(
tref1<T> const & r
)
@ -866,7 +866,7 @@ namespace glm
}
template <typename T>
inline tref1<T> & tref1<T>::operator=
GLM_FUNC_QUALIFIER tref1<T> & tref1<T>::operator=
(
tvec1<T> const & v
)

View File

@ -12,7 +12,7 @@ namespace glm
namespace detail
{
template <typename T>
inline typename tvec2<T>::size_type tvec2<T>::value_size()
GLM_FUNC_QUALIFIER typename tvec2<T>::size_type tvec2<T>::value_size()
{
return 2;
}
@ -21,7 +21,7 @@ namespace glm
// Accesses
template <typename T>
inline typename tvec2<T>::value_type &
GLM_FUNC_QUALIFIER typename tvec2<T>::value_type &
tvec2<T>::operator[]
(
size_type i
@ -32,7 +32,7 @@ namespace glm
}
template <typename T>
inline typename tvec2<T>::value_type const &
GLM_FUNC_QUALIFIER typename tvec2<T>::value_type const &
tvec2<T>::operator[]
(
size_type i
@ -46,20 +46,20 @@ namespace glm
// Implicit basic constructors
template <typename T>
inline tvec2<T>::tvec2() :
GLM_FUNC_QUALIFIER tvec2<T>::tvec2() :
x(value_type(0)),
y(value_type(0))
{}
template <typename T>
inline tvec2<T>::tvec2
GLM_FUNC_QUALIFIER tvec2<T>::tvec2
(
ctor
)
{}
template <typename T>
inline tvec2<T>::tvec2
GLM_FUNC_QUALIFIER tvec2<T>::tvec2
(
tvec2<T> const & v
) :
@ -71,7 +71,7 @@ namespace glm
// Explicit basic constructors
template <typename T>
inline tvec2<T>::tvec2
GLM_FUNC_QUALIFIER tvec2<T>::tvec2
(
value_type const & s
) :
@ -80,7 +80,7 @@ namespace glm
{}
template <typename T>
inline tvec2<T>::tvec2
GLM_FUNC_QUALIFIER tvec2<T>::tvec2
(
value_type const & s1,
value_type const & s2
@ -93,7 +93,7 @@ namespace glm
// Swizzle constructors
template <typename T>
inline tvec2<T>::tvec2
GLM_FUNC_QUALIFIER tvec2<T>::tvec2
(
tref2<T> const & r
) :
@ -106,7 +106,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T>::tvec2
GLM_FUNC_QUALIFIER tvec2<T>::tvec2
(
U const & x
) :
@ -116,7 +116,7 @@ namespace glm
template <typename T>
template <typename U, typename V>
inline tvec2<T>::tvec2
GLM_FUNC_QUALIFIER tvec2<T>::tvec2
(
U const & x,
V const & y
@ -130,7 +130,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T>::tvec2
GLM_FUNC_QUALIFIER tvec2<T>::tvec2
(
tvec2<U> const & v
) :
@ -140,7 +140,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T>::tvec2
GLM_FUNC_QUALIFIER tvec2<T>::tvec2
(
tvec3<U> const & v
) :
@ -150,7 +150,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T>::tvec2
GLM_FUNC_QUALIFIER tvec2<T>::tvec2
(
tvec4<U> const & v
) :
@ -162,7 +162,7 @@ namespace glm
// Unary arithmetic operators
template <typename T>
inline tvec2<T> & tvec2<T>::operator=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator=
(
tvec2<T> const & v
)
@ -174,7 +174,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator=
(
tvec2<U> const & v
)
@ -186,7 +186,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator+=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator+=
(
U const & s
)
@ -198,7 +198,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator+=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator+=
(
tvec2<U> const & v
)
@ -210,7 +210,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator-=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator-=
(
U const & s
)
@ -222,7 +222,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator-=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator-=
(
tvec2<U> const & v
)
@ -234,7 +234,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator*=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator*=
(
U const & s
)
@ -246,7 +246,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator*=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator*=
(
tvec2<U> const & v
)
@ -258,7 +258,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator/=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator/=
(
U const & s
)
@ -270,7 +270,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator/=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator/=
(
tvec2<U> const & v
)
@ -281,7 +281,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> & tvec2<T>::operator++()
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator++()
{
++this->x;
++this->y;
@ -289,7 +289,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> & tvec2<T>::operator--()
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator--()
{
--this->x;
--this->y;
@ -300,7 +300,7 @@ namespace glm
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -310,7 +310,7 @@ namespace glm
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -324,7 +324,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator%=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator%=
(
U const & s
)
@ -336,7 +336,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator%=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator%=
(
tvec2<U> const & v
)
@ -348,7 +348,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator&=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator&=
(
U const & s
)
@ -360,7 +360,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator&=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator&=
(
tvec2<U> const & v
)
@ -372,7 +372,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator|=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator|=
(
U const & s
)
@ -384,7 +384,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator|=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator|=
(
tvec2<U> const & v
)
@ -396,7 +396,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator^=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator^=
(
U const & s
)
@ -408,7 +408,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator^=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator^=
(
tvec2<U> const & v
)
@ -420,7 +420,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator<<=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator<<=
(
U const & s
)
@ -432,7 +432,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator<<=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator<<=
(
tvec2<U> const & v
)
@ -444,7 +444,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator>>=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator>>=
(
U const & s
)
@ -456,7 +456,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec2<T> & tvec2<T>::operator>>=
GLM_FUNC_QUALIFIER tvec2<T> & tvec2<T>::operator>>=
(
tvec2<U> const & v
)
@ -470,7 +470,7 @@ namespace glm
// Swizzle operators
template <typename T>
inline typename tvec2<T>::value_type tvec2<T>::swizzle
GLM_FUNC_QUALIFIER typename tvec2<T>::value_type tvec2<T>::swizzle
(
comp x
) const
@ -479,7 +479,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> tvec2<T>::swizzle
GLM_FUNC_QUALIFIER tvec2<T> tvec2<T>::swizzle
(
comp x,
comp y
@ -491,7 +491,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> tvec2<T>::swizzle
GLM_FUNC_QUALIFIER tvec3<T> tvec2<T>::swizzle
(
comp x,
comp y,
@ -505,7 +505,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> tvec2<T>::swizzle
GLM_FUNC_QUALIFIER tvec4<T> tvec2<T>::swizzle
(
comp x,
comp y,
@ -521,7 +521,7 @@ namespace glm
}
template <typename T>
inline tref2<T> tvec2<T>::swizzle
GLM_FUNC_QUALIFIER tref2<T> tvec2<T>::swizzle
(
comp x,
comp y
@ -536,7 +536,7 @@ namespace glm
// Binary arithmetic operators
template <typename T>
inline tvec2<T> operator+
GLM_FUNC_QUALIFIER tvec2<T> operator+
(
tvec2<T> const & v,
T const & s
@ -548,7 +548,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator+
GLM_FUNC_QUALIFIER tvec2<T> operator+
(
T const & s,
tvec2<T> const & v
@ -560,7 +560,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator+
GLM_FUNC_QUALIFIER tvec2<T> operator+
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -573,7 +573,7 @@ namespace glm
//operator-
template <typename T>
inline tvec2<T> operator-
GLM_FUNC_QUALIFIER tvec2<T> operator-
(
tvec2<T> const & v,
T const & s
@ -585,7 +585,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator-
GLM_FUNC_QUALIFIER tvec2<T> operator-
(
T const & s,
tvec2<T> const & v
@ -597,7 +597,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator-
GLM_FUNC_QUALIFIER tvec2<T> operator-
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -610,7 +610,7 @@ namespace glm
//operator*
template <typename T>
inline tvec2<T> operator*
GLM_FUNC_QUALIFIER tvec2<T> operator*
(
tvec2<T> const & v,
T const & s
@ -622,7 +622,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator*
GLM_FUNC_QUALIFIER tvec2<T> operator*
(
T const & s,
tvec2<T> const & v
@ -634,7 +634,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator*
GLM_FUNC_QUALIFIER tvec2<T> operator*
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -647,7 +647,7 @@ namespace glm
//operator/
template <typename T>
inline tvec2<T> operator/
GLM_FUNC_QUALIFIER tvec2<T> operator/
(
tvec2<T> const & v,
T const & s
@ -659,7 +659,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator/
GLM_FUNC_QUALIFIER tvec2<T> operator/
(
T const & s,
tvec2<T> const & v
@ -671,7 +671,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator/
GLM_FUNC_QUALIFIER tvec2<T> operator/
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -684,7 +684,7 @@ namespace glm
// Unary constant operators
template <typename T>
inline tvec2<T> operator-
GLM_FUNC_QUALIFIER tvec2<T> operator-
(
tvec2<T> const & v
)
@ -695,7 +695,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator++
GLM_FUNC_QUALIFIER tvec2<T> operator++
(
tvec2<T> const & v,
int
@ -707,7 +707,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator--
GLM_FUNC_QUALIFIER tvec2<T> operator--
(
tvec2<T> const & v,
int
@ -722,7 +722,7 @@ namespace glm
// Binary bit operators
template <typename T>
inline tvec2<T> operator%
GLM_FUNC_QUALIFIER tvec2<T> operator%
(
tvec2<T> const & v,
T const & s
@ -734,7 +734,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator%
GLM_FUNC_QUALIFIER tvec2<T> operator%
(
T const & s,
tvec2<T> const & v
@ -746,7 +746,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator%
GLM_FUNC_QUALIFIER tvec2<T> operator%
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -758,7 +758,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator&
GLM_FUNC_QUALIFIER tvec2<T> operator&
(
tvec2<T> const & v,
T const & s
@ -770,7 +770,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator&
GLM_FUNC_QUALIFIER tvec2<T> operator&
(
T const & s,
tvec2<T> const & v
@ -782,7 +782,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator&
GLM_FUNC_QUALIFIER tvec2<T> operator&
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -794,7 +794,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator|
GLM_FUNC_QUALIFIER tvec2<T> operator|
(
tvec2<T> const & v,
T const & s
@ -806,7 +806,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator|
GLM_FUNC_QUALIFIER tvec2<T> operator|
(
T const & s,
tvec2<T> const & v
@ -818,7 +818,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator|
GLM_FUNC_QUALIFIER tvec2<T> operator|
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -830,7 +830,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator^
GLM_FUNC_QUALIFIER tvec2<T> operator^
(
tvec2<T> const & v,
T const & s
@ -842,7 +842,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator^
GLM_FUNC_QUALIFIER tvec2<T> operator^
(
T const & s,
tvec2<T> const & v
@ -854,7 +854,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator^
GLM_FUNC_QUALIFIER tvec2<T> operator^
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -866,7 +866,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator<<
GLM_FUNC_QUALIFIER tvec2<T> operator<<
(
tvec2<T> const & v,
T const & s
@ -878,7 +878,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator<<
GLM_FUNC_QUALIFIER tvec2<T> operator<<
(
T const & s,
tvec2<T> const & v
@ -890,7 +890,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator<<
GLM_FUNC_QUALIFIER tvec2<T> operator<<
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -902,7 +902,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator>>
GLM_FUNC_QUALIFIER tvec2<T> operator>>
(
tvec2<T> const & v,
T const & s
@ -914,7 +914,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator>>
GLM_FUNC_QUALIFIER tvec2<T> operator>>
(
T const & s,
tvec2<T> const & v
@ -926,7 +926,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator>>
GLM_FUNC_QUALIFIER tvec2<T> operator>>
(
tvec2<T> const & v1,
tvec2<T> const & v2
@ -938,7 +938,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> operator~
GLM_FUNC_QUALIFIER tvec2<T> operator~
(
tvec2<T> const & v
)

View File

@ -12,7 +12,7 @@ namespace glm
namespace detail
{
template <typename T>
inline typename tvec3<T>::size_type tvec3<T>::value_size()
GLM_FUNC_QUALIFIER typename tvec3<T>::size_type tvec3<T>::value_size()
{
return 3;
}
@ -21,7 +21,7 @@ namespace glm
// Accesses
template <typename T>
inline typename tvec3<T>::value_type &
GLM_FUNC_QUALIFIER typename tvec3<T>::value_type &
tvec3<T>::operator[]
(
size_type i
@ -32,7 +32,7 @@ namespace glm
}
template <typename T>
inline typename tvec3<T>::value_type const &
GLM_FUNC_QUALIFIER typename tvec3<T>::value_type const &
tvec3<T>::operator[]
(
size_type i
@ -46,21 +46,21 @@ namespace glm
// Implicit basic constructors
template <typename T>
inline tvec3<T>::tvec3() :
GLM_FUNC_QUALIFIER tvec3<T>::tvec3() :
x(value_type(0)),
y(value_type(0)),
z(value_type(0))
{}
template <typename T>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
ctor
)
{}
template <typename T>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
tvec3<T> const & v
) :
@ -73,7 +73,7 @@ namespace glm
// Explicit basic constructors
template <typename T>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
value_type const & s
) :
@ -83,7 +83,7 @@ namespace glm
{}
template <typename T>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
value_type const & s0,
value_type const & s1,
@ -98,7 +98,7 @@ namespace glm
// Swizzle constructors
template <typename T>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
tref3<T> const & r
) :
@ -112,7 +112,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
U const & s
) :
@ -123,7 +123,7 @@ namespace glm
template <typename T>
template <typename A, typename B, typename C>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
A const & x,
B const & y,
@ -139,7 +139,7 @@ namespace glm
template <typename T>
template <typename A, typename B>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
tvec2<A> const & v,
B const & s
@ -151,7 +151,7 @@ namespace glm
template <typename T>
template <typename A, typename B>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
A const & s,
tvec2<B> const & v
@ -163,7 +163,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
tvec3<U> const & v
) :
@ -174,7 +174,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T>::tvec3
GLM_FUNC_QUALIFIER tvec3<T>::tvec3
(
tvec4<U> const & v
) :
@ -187,7 +187,7 @@ namespace glm
// Unary arithmetic operators
template <typename T>
inline tvec3<T>& tvec3<T>::operator=
GLM_FUNC_QUALIFIER tvec3<T>& tvec3<T>::operator=
(
tvec3<T> const & v
)
@ -200,7 +200,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T>& tvec3<T>::operator=
GLM_FUNC_QUALIFIER tvec3<T>& tvec3<T>::operator=
(
tvec3<U> const & v
)
@ -213,7 +213,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator+=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator+=
(
U const & s
)
@ -226,7 +226,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator+=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator+=
(
tvec3<U> const & v
)
@ -239,7 +239,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator-=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator-=
(
U const & s
)
@ -252,7 +252,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator-=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator-=
(
tvec3<U> const & v
)
@ -265,7 +265,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator*=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator*=
(
U const & s
)
@ -278,7 +278,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator*=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator*=
(
tvec3<U> const & v
)
@ -291,7 +291,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator/=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator/=
(
U const & s
)
@ -304,7 +304,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator/=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator/=
(
tvec3<U> const & v
)
@ -316,7 +316,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> & tvec3<T>::operator++()
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator++()
{
++this->x;
++this->y;
@ -325,7 +325,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> & tvec3<T>::operator--()
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator--()
{
--this->x;
--this->y;
@ -337,7 +337,7 @@ namespace glm
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -347,7 +347,7 @@ namespace glm
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -361,7 +361,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator%=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator%=
(
U const & s
)
@ -374,7 +374,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator%=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator%=
(
tvec3<U> const & v
)
@ -387,7 +387,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator&=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator&=
(
U const & s
)
@ -400,7 +400,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator&=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator&=
(
tvec3<U> const & v
)
@ -413,7 +413,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator|=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator|=
(
U const & s
)
@ -426,7 +426,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator|=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator|=
(
tvec3<U> const & v
)
@ -439,7 +439,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator^=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator^=
(
U const & s
)
@ -452,7 +452,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator^=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator^=
(
tvec3<U> const & v
)
@ -465,7 +465,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator<<=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator<<=
(
U const & s
)
@ -478,7 +478,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator<<=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator<<=
(
tvec3<U> const & v
)
@ -491,7 +491,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator>>=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator>>=
(
U const & s
)
@ -504,7 +504,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec3<T> & tvec3<T>::operator>>=
GLM_FUNC_QUALIFIER tvec3<T> & tvec3<T>::operator>>=
(
tvec3<U> const & v
)
@ -519,7 +519,7 @@ namespace glm
// Swizzle operators
template <typename T>
inline typename tvec3<T>::value_type
GLM_FUNC_QUALIFIER typename tvec3<T>::value_type
tvec3<T>::swizzle
(
comp x
@ -529,7 +529,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> tvec3<T>::swizzle
GLM_FUNC_QUALIFIER tvec2<T> tvec3<T>::swizzle
(
comp x,
comp y
@ -541,7 +541,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> tvec3<T>::swizzle
GLM_FUNC_QUALIFIER tvec3<T> tvec3<T>::swizzle
(
comp x,
comp y,
@ -555,7 +555,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> tvec3<T>::swizzle
GLM_FUNC_QUALIFIER tvec4<T> tvec3<T>::swizzle
(
comp x,
comp y,
@ -571,7 +571,7 @@ namespace glm
}
template <typename T>
inline tref3<T> tvec3<T>::swizzle
GLM_FUNC_QUALIFIER tref3<T> tvec3<T>::swizzle
(
comp x,
comp y,
@ -588,7 +588,7 @@ namespace glm
// Binary arithmetic operators
template <typename T>
inline tvec3<T> operator+
GLM_FUNC_QUALIFIER tvec3<T> operator+
(
tvec3<T> const & v,
T const & s
@ -601,7 +601,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator+
GLM_FUNC_QUALIFIER tvec3<T> operator+
(
T const & s,
tvec3<T> const & v
@ -614,7 +614,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator+
GLM_FUNC_QUALIFIER tvec3<T> operator+
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -628,7 +628,7 @@ namespace glm
//operator-
template <typename T>
inline tvec3<T> operator-
GLM_FUNC_QUALIFIER tvec3<T> operator-
(
tvec3<T> const & v,
T const & s
@ -641,7 +641,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator-
GLM_FUNC_QUALIFIER tvec3<T> operator-
(
T const & s,
tvec3<T> const & v
@ -654,7 +654,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator-
GLM_FUNC_QUALIFIER tvec3<T> operator-
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -668,7 +668,7 @@ namespace glm
//operator*
template <typename T>
inline tvec3<T> operator*
GLM_FUNC_QUALIFIER tvec3<T> operator*
(
tvec3<T> const & v,
T const & s
@ -681,7 +681,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator*
GLM_FUNC_QUALIFIER tvec3<T> operator*
(
T const & s,
tvec3<T> const & v
@ -694,7 +694,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator*
GLM_FUNC_QUALIFIER tvec3<T> operator*
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -708,7 +708,7 @@ namespace glm
//operator/
template <typename T>
inline tvec3<T> operator/
GLM_FUNC_QUALIFIER tvec3<T> operator/
(
tvec3<T> const & v,
T const & s
@ -721,7 +721,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator/
GLM_FUNC_QUALIFIER tvec3<T> operator/
(
T const & s,
tvec3<T> const & v
@ -734,7 +734,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator/
GLM_FUNC_QUALIFIER tvec3<T> operator/
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -748,7 +748,7 @@ namespace glm
// Unary constant operators
template <typename T>
inline tvec3<T> operator-
GLM_FUNC_QUALIFIER tvec3<T> operator-
(
tvec3<T> const & v
)
@ -760,7 +760,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator++
GLM_FUNC_QUALIFIER tvec3<T> operator++
(
tvec3<T> const & v,
int
@ -773,7 +773,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator--
GLM_FUNC_QUALIFIER tvec3<T> operator--
(
tvec3<T> const & v,
int
@ -789,7 +789,7 @@ namespace glm
// Binary bit operators
template <typename T>
inline tvec3<T> operator%
GLM_FUNC_QUALIFIER tvec3<T> operator%
(
tvec3<T> const & v,
T const & s
@ -802,7 +802,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator%
GLM_FUNC_QUALIFIER tvec3<T> operator%
(
T const & s,
tvec3<T> const & v
@ -815,7 +815,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator%
GLM_FUNC_QUALIFIER tvec3<T> operator%
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -828,7 +828,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator&
GLM_FUNC_QUALIFIER tvec3<T> operator&
(
tvec3<T> const & v,
T const & s
@ -841,7 +841,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator&
GLM_FUNC_QUALIFIER tvec3<T> operator&
(
T const & s,
tvec3<T> const & v
@ -854,7 +854,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator&
GLM_FUNC_QUALIFIER tvec3<T> operator&
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -867,7 +867,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator|
GLM_FUNC_QUALIFIER tvec3<T> operator|
(
tvec3<T> const & v,
T const & s
@ -880,7 +880,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator|
GLM_FUNC_QUALIFIER tvec3<T> operator|
(
T const & s,
tvec3<T> const & v
@ -893,7 +893,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator|
GLM_FUNC_QUALIFIER tvec3<T> operator|
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -906,7 +906,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator^
GLM_FUNC_QUALIFIER tvec3<T> operator^
(
tvec3<T> const & v,
T const & s
@ -919,7 +919,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator^
GLM_FUNC_QUALIFIER tvec3<T> operator^
(
T const & s,
tvec3<T> const & v
@ -932,7 +932,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator^
GLM_FUNC_QUALIFIER tvec3<T> operator^
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -945,7 +945,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator<<
GLM_FUNC_QUALIFIER tvec3<T> operator<<
(
tvec3<T> const & v,
T const & s
@ -958,7 +958,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator<<
GLM_FUNC_QUALIFIER tvec3<T> operator<<
(
T const & s,
tvec3<T> const & v
@ -971,7 +971,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator<<
GLM_FUNC_QUALIFIER tvec3<T> operator<<
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -984,7 +984,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator>>
GLM_FUNC_QUALIFIER tvec3<T> operator>>
(
tvec3<T> const & v,
T const & s
@ -997,7 +997,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator>>
GLM_FUNC_QUALIFIER tvec3<T> operator>>
(
T const & s,
tvec3<T> const & v
@ -1010,7 +1010,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator>>
GLM_FUNC_QUALIFIER tvec3<T> operator>>
(
tvec3<T> const & v1,
tvec3<T> const & v2
@ -1023,7 +1023,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> operator~
GLM_FUNC_QUALIFIER tvec3<T> operator~
(
tvec3<T> const & v
)
@ -1038,14 +1038,14 @@ namespace glm
// tref definition
template <typename T>
inline tref3<T>::tref3(T & x, T & y, T & z) :
GLM_FUNC_QUALIFIER tref3<T>::tref3(T & x, T & y, T & z) :
x(x),
y(y),
z(z)
{}
template <typename T>
inline tref3<T>::tref3
GLM_FUNC_QUALIFIER tref3<T>::tref3
(
tref3<T> const & r
) :
@ -1055,7 +1055,7 @@ namespace glm
{}
template <typename T>
inline tref3<T>::tref3
GLM_FUNC_QUALIFIER tref3<T>::tref3
(
tvec3<T> const & v
) :
@ -1065,7 +1065,7 @@ namespace glm
{}
template <typename T>
inline tref3<T> & tref3<T>::operator=
GLM_FUNC_QUALIFIER tref3<T> & tref3<T>::operator=
(
tref3<T> const & r
)
@ -1077,7 +1077,7 @@ namespace glm
}
template <typename T>
inline tref3<T> & tref3<T>::operator=
GLM_FUNC_QUALIFIER tref3<T> & tref3<T>::operator=
(
tvec3<T> const & v
)

View File

@ -12,7 +12,7 @@ namespace glm
namespace detail
{
template <typename T>
inline typename tvec4<T>::size_type tvec4<T>::value_size()
GLM_FUNC_QUALIFIER typename tvec4<T>::size_type tvec4<T>::value_size()
{
return 4;
}
@ -21,7 +21,7 @@ namespace glm
// Accesses
template <typename T>
inline typename tvec4<T>::value_type &
GLM_FUNC_QUALIFIER typename tvec4<T>::value_type &
tvec4<T>::operator[]
(
size_type i
@ -32,7 +32,7 @@ namespace glm
}
template <typename T>
inline typename tvec4<T>::value_type const &
GLM_FUNC_QUALIFIER typename tvec4<T>::value_type const &
tvec4<T>::operator[]
(
size_type i
@ -46,7 +46,7 @@ namespace glm
// Implicit basic constructors
template <typename T>
inline tvec4<T>::tvec4() :
GLM_FUNC_QUALIFIER tvec4<T>::tvec4() :
x(value_type(0)),
y(value_type(0)),
z(value_type(0)),
@ -54,14 +54,14 @@ namespace glm
{}
template <typename T>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
ctor
)
{}
template <typename T>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
type const & v
) :
@ -75,7 +75,7 @@ namespace glm
// Explicit basic constructors
template <typename T>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
value_type const & s
) :
@ -86,7 +86,7 @@ namespace glm
{}
template <typename T>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
value_type const & s1,
value_type const & s2,
@ -103,7 +103,7 @@ namespace glm
// Swizzle constructors
template <typename T>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
tref4<T> const & r
) :
@ -118,7 +118,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
U const & x
) :
@ -130,7 +130,7 @@ namespace glm
template <typename T>
template <typename A, typename B, typename C, typename D>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
A const & x,
B const & y,
@ -148,7 +148,7 @@ namespace glm
template <typename T>
template <typename A, typename B, typename C>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
tvec2<A> const & v,
B const & s1,
@ -162,7 +162,7 @@ namespace glm
template <typename T>
template <typename A, typename B, typename C>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
A const & s1,
tvec2<B> const & v,
@ -176,7 +176,7 @@ namespace glm
template <typename T>
template <typename A, typename B, typename C>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
A const & s1,
B const & s2,
@ -190,7 +190,7 @@ namespace glm
template <typename T>
template <typename A, typename B>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
tvec3<A> const & v,
B const & s
@ -203,7 +203,7 @@ namespace glm
template <typename T>
template <typename A, typename B>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
A const & s,
tvec3<B> const & v
@ -216,7 +216,7 @@ namespace glm
template <typename T>
template <typename A, typename B>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
tvec2<A> const & v1,
tvec2<B> const & v2
@ -229,7 +229,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T>::tvec4
GLM_FUNC_QUALIFIER tvec4<T>::tvec4
(
tvec4<U> const & v
) :
@ -243,7 +243,7 @@ namespace glm
// Unary arithmetic operators
template <typename T>
inline tvec4<T> & tvec4<T>::operator=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator=
(
tvec4<T> const & v
)
@ -257,7 +257,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator=
(
tvec4<U> const & v
)
@ -271,7 +271,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator+=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator+=
(
U const & s
)
@ -285,7 +285,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator+=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator+=
(
tvec4<U> const & v
)
@ -299,7 +299,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator-=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator-=
(
U const & s
)
@ -313,7 +313,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator-=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator-=
(
tvec4<U> const & v
)
@ -327,7 +327,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator*=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator*=
(
U const & s
)
@ -341,7 +341,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator*=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator*=
(
tvec4<U> const & v
)
@ -355,7 +355,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator/=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator/=
(
U const & s
)
@ -369,7 +369,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator/=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator/=
(
tvec4<U> const & v
)
@ -382,7 +382,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> & tvec4<T>::operator++()
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator++()
{
++this->x;
++this->y;
@ -392,7 +392,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> & tvec4<T>::operator--()
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator--()
{
--this->x;
--this->y;
@ -406,7 +406,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator%=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator%=
(
U const & s
)
@ -420,7 +420,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator%=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator%=
(
tvec4<U> const & v
)
@ -434,7 +434,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator&=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator&=
(
U const & s
)
@ -448,7 +448,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator&=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator&=
(
tvec4<U> const & v
)
@ -462,7 +462,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator|=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator|=
(
U const & s
)
@ -476,7 +476,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator|=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator|=
(
tvec4<U> const & v
)
@ -490,7 +490,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator^=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator^=
(
U const & s
)
@ -504,7 +504,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator^=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator^=
(
tvec4<U> const & v
)
@ -518,7 +518,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator<<=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator<<=
(
U const & s
)
@ -532,7 +532,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator<<=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator<<=
(
tvec4<U> const & v
)
@ -546,7 +546,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator>>=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator>>=
(
U const & s
)
@ -560,7 +560,7 @@ namespace glm
template <typename T>
template <typename U>
inline tvec4<T> & tvec4<T>::operator>>=
GLM_FUNC_QUALIFIER tvec4<T> & tvec4<T>::operator>>=
(
tvec4<U> const & v
)
@ -576,7 +576,7 @@ namespace glm
// Swizzle operators
template <typename T>
inline typename tvec4<T>::value_type
GLM_FUNC_QUALIFIER typename tvec4<T>::value_type
tvec4<T>::swizzle
(
comp x
@ -586,7 +586,7 @@ namespace glm
}
template <typename T>
inline tvec2<T> tvec4<T>::swizzle
GLM_FUNC_QUALIFIER tvec2<T> tvec4<T>::swizzle
(
comp x,
comp y
@ -598,7 +598,7 @@ namespace glm
}
template <typename T>
inline tvec3<T> tvec4<T>::swizzle
GLM_FUNC_QUALIFIER tvec3<T> tvec4<T>::swizzle
(
comp x,
comp y,
@ -612,7 +612,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> tvec4<T>::swizzle
GLM_FUNC_QUALIFIER tvec4<T> tvec4<T>::swizzle
(
comp x,
comp y,
@ -628,7 +628,7 @@ namespace glm
}
template <typename T>
inline tref4<T> tvec4<T>::swizzle
GLM_FUNC_QUALIFIER tref4<T> tvec4<T>::swizzle
(
comp x,
comp y,
@ -647,7 +647,7 @@ namespace glm
// Binary arithmetic operators
template <typename T>
inline tvec4<T> operator+
GLM_FUNC_QUALIFIER tvec4<T> operator+
(
tvec4<T> const & v,
typename tvec4<T>::value_type const & s
@ -661,7 +661,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator+
GLM_FUNC_QUALIFIER tvec4<T> operator+
(
typename tvec4<T>::value_type const & s,
tvec4<T> const & v
@ -675,7 +675,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator+
GLM_FUNC_QUALIFIER tvec4<T> operator+
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -690,7 +690,7 @@ namespace glm
//operator-
template <typename T>
inline tvec4<T> operator-
GLM_FUNC_QUALIFIER tvec4<T> operator-
(
tvec4<T> const & v,
typename tvec4<T>::value_type const & s
@ -704,7 +704,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator-
GLM_FUNC_QUALIFIER tvec4<T> operator-
(
typename tvec4<T>::value_type const & s,
tvec4<T> const & v
@ -718,7 +718,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator-
GLM_FUNC_QUALIFIER tvec4<T> operator-
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -733,7 +733,7 @@ namespace glm
//operator*
template <typename T>
inline tvec4<T> operator*
GLM_FUNC_QUALIFIER tvec4<T> operator*
(
tvec4<T> const & v,
typename tvec4<T>::value_type const & s
@ -747,7 +747,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator*
GLM_FUNC_QUALIFIER tvec4<T> operator*
(
typename tvec4<T>::value_type const & s,
tvec4<T> const & v
@ -761,7 +761,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator*
GLM_FUNC_QUALIFIER tvec4<T> operator*
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -776,7 +776,7 @@ namespace glm
//operator/
template <typename T>
inline tvec4<T> operator/
GLM_FUNC_QUALIFIER tvec4<T> operator/
(
tvec4<T> const & v,
typename tvec4<T>::value_type const & s
@ -790,7 +790,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator/
GLM_FUNC_QUALIFIER tvec4<T> operator/
(
typename tvec4<T>::value_type const & s,
tvec4<T> const & v
@ -804,7 +804,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator/
GLM_FUNC_QUALIFIER tvec4<T> operator/
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -819,7 +819,7 @@ namespace glm
// Unary constant operators
template <typename T>
inline tvec4<T> operator-
GLM_FUNC_QUALIFIER tvec4<T> operator-
(
tvec4<T> const & v
)
@ -832,7 +832,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator++
GLM_FUNC_QUALIFIER tvec4<T> operator++
(
tvec4<T> const & v,
int
@ -847,7 +847,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator--
GLM_FUNC_QUALIFIER tvec4<T> operator--
(
tvec4<T> const & v,
int
@ -865,7 +865,7 @@ namespace glm
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -875,7 +875,7 @@ namespace glm
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -888,7 +888,7 @@ namespace glm
// Binary bit operators
template <typename T>
inline tvec4<T> operator%
GLM_FUNC_QUALIFIER tvec4<T> operator%
(
tvec4<T> const & v,
typename tvec4<T>::value_type const & s
@ -902,7 +902,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator%
GLM_FUNC_QUALIFIER tvec4<T> operator%
(
typename tvec4<T>::value_type const & s,
tvec4<T> const & v
@ -916,7 +916,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator%
GLM_FUNC_QUALIFIER tvec4<T> operator%
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -930,7 +930,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator&
GLM_FUNC_QUALIFIER tvec4<T> operator&
(
tvec4<T> const & v,
typename tvec4<T>::value_type const & s
@ -944,7 +944,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator&
GLM_FUNC_QUALIFIER tvec4<T> operator&
(
typename tvec4<T>::value_type const & s,
tvec4<T> const & v
@ -958,7 +958,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator&
GLM_FUNC_QUALIFIER tvec4<T> operator&
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -972,7 +972,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator|
GLM_FUNC_QUALIFIER tvec4<T> operator|
(
tvec4<T> const & v,
typename tvec4<T>::value_type const & s
@ -986,7 +986,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator|
GLM_FUNC_QUALIFIER tvec4<T> operator|
(
typename tvec4<T>::value_type const & s,
tvec4<T> const & v
@ -1000,7 +1000,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator|
GLM_FUNC_QUALIFIER tvec4<T> operator|
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -1014,7 +1014,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator^
GLM_FUNC_QUALIFIER tvec4<T> operator^
(
tvec4<T> const & v,
typename tvec4<T>::value_type const & s
@ -1028,7 +1028,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator^
GLM_FUNC_QUALIFIER tvec4<T> operator^
(
typename tvec4<T>::value_type const & s,
tvec4<T> const & v
@ -1042,7 +1042,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator^
GLM_FUNC_QUALIFIER tvec4<T> operator^
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -1056,7 +1056,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator<<
GLM_FUNC_QUALIFIER tvec4<T> operator<<
(
tvec4<T> const & v,
typename tvec4<T>::value_type const & s
@ -1070,7 +1070,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator<<
GLM_FUNC_QUALIFIER tvec4<T> operator<<
(
typename tvec4<T>::value_type const & s,
tvec4<T> const & v
@ -1084,7 +1084,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator<<
GLM_FUNC_QUALIFIER tvec4<T> operator<<
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -1098,7 +1098,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator>>
GLM_FUNC_QUALIFIER tvec4<T> operator>>
(
tvec4<T> const & v,
typename tvec4<T>::value_type const & s
@ -1112,7 +1112,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator>>
GLM_FUNC_QUALIFIER tvec4<T> operator>>
(
typename tvec4<T>::value_type const & s,
tvec4<T> const & v
@ -1126,7 +1126,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator>>
GLM_FUNC_QUALIFIER tvec4<T> operator>>
(
tvec4<T> const & v1,
tvec4<T> const & v2
@ -1140,7 +1140,7 @@ namespace glm
}
template <typename T>
inline tvec4<T> operator~
GLM_FUNC_QUALIFIER tvec4<T> operator~
(
tvec4<T> const & v
)

View File

@ -15,7 +15,7 @@ namespace detail{
//////////////////////////////////////
// hvec2
inline tvec2<thalf>::size_type tvec2<thalf>::value_size()
GLM_FUNC_QUALIFIER tvec2<thalf>::size_type tvec2<thalf>::value_size()
{
return 2;
}
@ -23,13 +23,13 @@ inline tvec2<thalf>::size_type tvec2<thalf>::value_size()
//////////////////////////////////////
// Accesses
inline thalf & tvec2<thalf>::operator[](tvec2<thalf>::size_type i)
GLM_FUNC_QUALIFIER thalf & tvec2<thalf>::operator[](tvec2<thalf>::size_type i)
{
assert(/*i >= tvec2<thalf>::size_type(0) && */i < tvec2<thalf>::value_size());
return (&x)[i];
}
inline thalf const & tvec2<thalf>::operator[](tvec2<thalf>::size_type i) const
GLM_FUNC_QUALIFIER thalf const & tvec2<thalf>::operator[](tvec2<thalf>::size_type i) const
{
assert(/*i >= tvec2<thalf>::size_type(0) && */i < tvec2<thalf>::value_size());
return (&x)[i];
@ -38,12 +38,12 @@ inline thalf const & tvec2<thalf>::operator[](tvec2<thalf>::size_type i) const
//////////////////////////////////////
// Implicit basic constructors
inline tvec2<thalf>::tvec2() :
GLM_FUNC_QUALIFIER tvec2<thalf>::tvec2() :
x(thalf(0.f)),
y(thalf(0.f))
{}
inline tvec2<thalf>::tvec2
GLM_FUNC_QUALIFIER tvec2<thalf>::tvec2
(
tvec2<thalf> const & v
) :
@ -54,7 +54,7 @@ inline tvec2<thalf>::tvec2
//////////////////////////////////////
// Explicit basic constructors
inline tvec2<thalf>::tvec2
GLM_FUNC_QUALIFIER tvec2<thalf>::tvec2
(
thalf const & s
) :
@ -62,7 +62,7 @@ inline tvec2<thalf>::tvec2
y(s)
{}
inline tvec2<thalf>::tvec2
GLM_FUNC_QUALIFIER tvec2<thalf>::tvec2
(
thalf const & s1,
thalf const & s2
@ -74,7 +74,7 @@ inline tvec2<thalf>::tvec2
//////////////////////////////////////
// Swizzle constructors
inline tvec2<thalf>::tvec2
GLM_FUNC_QUALIFIER tvec2<thalf>::tvec2
(
tref2<thalf> const & r
) :
@ -86,7 +86,7 @@ inline tvec2<thalf>::tvec2
// Convertion scalar constructors
template <typename U>
inline tvec2<thalf>::tvec2
GLM_FUNC_QUALIFIER tvec2<thalf>::tvec2
(
U const & x
) :
@ -95,7 +95,7 @@ inline tvec2<thalf>::tvec2
{}
template <typename U, typename V>
inline tvec2<thalf>::tvec2
GLM_FUNC_QUALIFIER tvec2<thalf>::tvec2
(
U const & x,
V const & y
@ -108,7 +108,7 @@ inline tvec2<thalf>::tvec2
// Convertion vector constructors
template <typename U>
inline tvec2<thalf>::tvec2
GLM_FUNC_QUALIFIER tvec2<thalf>::tvec2
(
tvec2<U> const & v
) :
@ -117,7 +117,7 @@ inline tvec2<thalf>::tvec2
{}
template <typename U>
inline tvec2<thalf>::tvec2
GLM_FUNC_QUALIFIER tvec2<thalf>::tvec2
(
tvec3<U> const & v
) :
@ -126,7 +126,7 @@ inline tvec2<thalf>::tvec2
{}
template <typename U>
inline tvec2<thalf>::tvec2
GLM_FUNC_QUALIFIER tvec2<thalf>::tvec2
(
tvec4<U> const & v
) :
@ -137,7 +137,7 @@ inline tvec2<thalf>::tvec2
//////////////////////////////////////
// Unary arithmetic operators
inline tvec2<thalf> & tvec2<thalf>::operator=
GLM_FUNC_QUALIFIER tvec2<thalf> & tvec2<thalf>::operator=
(
tvec2<thalf> const & v
)
@ -147,7 +147,7 @@ inline tvec2<thalf> & tvec2<thalf>::operator=
return *this;
}
inline tvec2<thalf> & tvec2<thalf>::operator+=
GLM_FUNC_QUALIFIER tvec2<thalf> & tvec2<thalf>::operator+=
(
thalf const & s
)
@ -157,7 +157,7 @@ inline tvec2<thalf> & tvec2<thalf>::operator+=
return *this;
}
inline tvec2<thalf> & tvec2<thalf>::operator+=
GLM_FUNC_QUALIFIER tvec2<thalf> & tvec2<thalf>::operator+=
(
tvec2<thalf> const & v
)
@ -167,7 +167,7 @@ inline tvec2<thalf> & tvec2<thalf>::operator+=
return *this;
}
inline tvec2<thalf> & tvec2<thalf>::operator-=
GLM_FUNC_QUALIFIER tvec2<thalf> & tvec2<thalf>::operator-=
(
thalf const & s
)
@ -177,7 +177,7 @@ inline tvec2<thalf> & tvec2<thalf>::operator-=
return *this;
}
inline tvec2<thalf> & tvec2<thalf>::operator-=
GLM_FUNC_QUALIFIER tvec2<thalf> & tvec2<thalf>::operator-=
(
tvec2<thalf> const & v
)
@ -187,7 +187,7 @@ inline tvec2<thalf> & tvec2<thalf>::operator-=
return *this;
}
inline tvec2<thalf>& tvec2<thalf>::operator*=
GLM_FUNC_QUALIFIER tvec2<thalf>& tvec2<thalf>::operator*=
(
thalf const & s
)
@ -197,7 +197,7 @@ inline tvec2<thalf>& tvec2<thalf>::operator*=
return *this;
}
inline tvec2<thalf> & tvec2<thalf>::operator*=
GLM_FUNC_QUALIFIER tvec2<thalf> & tvec2<thalf>::operator*=
(
tvec2<thalf> const & v
)
@ -207,7 +207,7 @@ inline tvec2<thalf> & tvec2<thalf>::operator*=
return *this;
}
inline tvec2<thalf> & tvec2<thalf>::operator/=
GLM_FUNC_QUALIFIER tvec2<thalf> & tvec2<thalf>::operator/=
(
thalf const & s
)
@ -217,7 +217,7 @@ inline tvec2<thalf> & tvec2<thalf>::operator/=
return *this;
}
inline tvec2<thalf> & tvec2<thalf>::operator/=
GLM_FUNC_QUALIFIER tvec2<thalf> & tvec2<thalf>::operator/=
(
tvec2<thalf> const & v
)
@ -227,14 +227,14 @@ inline tvec2<thalf> & tvec2<thalf>::operator/=
return *this;
}
inline tvec2<thalf> & tvec2<thalf>::operator++()
GLM_FUNC_QUALIFIER tvec2<thalf> & tvec2<thalf>::operator++()
{
++this->x;
++this->y;
return *this;
}
inline tvec2<thalf>& tvec2<thalf>::operator--()
GLM_FUNC_QUALIFIER tvec2<thalf>& tvec2<thalf>::operator--()
{
--this->x;
--this->y;
@ -244,19 +244,19 @@ inline tvec2<thalf>& tvec2<thalf>::operator--()
//////////////////////////////////////
// Swizzle operators
inline thalf tvec2<thalf>::swizzle(comp x) const
GLM_FUNC_QUALIFIER thalf tvec2<thalf>::swizzle(comp x) const
{
return (*this)[x];
}
inline tvec2<thalf> tvec2<thalf>::swizzle(comp x, comp y) const
GLM_FUNC_QUALIFIER tvec2<thalf> tvec2<thalf>::swizzle(comp x, comp y) const
{
return tvec2<thalf>(
(*this)[x],
(*this)[y]);
}
inline tvec3<thalf> tvec2<thalf>::swizzle(comp x, comp y, comp z) const
GLM_FUNC_QUALIFIER tvec3<thalf> tvec2<thalf>::swizzle(comp x, comp y, comp z) const
{
return tvec3<thalf>(
(*this)[x],
@ -264,7 +264,7 @@ inline tvec3<thalf> tvec2<thalf>::swizzle(comp x, comp y, comp z) const
(*this)[z]);
}
inline tvec4<thalf> tvec2<thalf>::swizzle(comp x, comp y, comp z, comp w) const
GLM_FUNC_QUALIFIER tvec4<thalf> tvec2<thalf>::swizzle(comp x, comp y, comp z, comp w) const
{
return tvec4<thalf>(
(*this)[x],
@ -273,7 +273,7 @@ inline tvec4<thalf> tvec2<thalf>::swizzle(comp x, comp y, comp z, comp w) const
(*this)[w]);
}
inline tref2<thalf> tvec2<thalf>::swizzle(comp x, comp y)
GLM_FUNC_QUALIFIER tref2<thalf> tvec2<thalf>::swizzle(comp x, comp y)
{
return tref2<thalf>(
(*this)[x],
@ -283,7 +283,7 @@ inline tref2<thalf> tvec2<thalf>::swizzle(comp x, comp y)
//////////////////////////////////////
// hvec3
inline tvec3<thalf>::size_type tvec3<thalf>::value_size()
GLM_FUNC_QUALIFIER tvec3<thalf>::size_type tvec3<thalf>::value_size()
{
return 3;
}
@ -291,7 +291,7 @@ inline tvec3<thalf>::size_type tvec3<thalf>::value_size()
//////////////////////////////////////
// Accesses
inline thalf & tvec3<thalf>::operator[]
GLM_FUNC_QUALIFIER thalf & tvec3<thalf>::operator[]
(
tvec3<thalf>::size_type i
)
@ -301,7 +301,7 @@ inline thalf & tvec3<thalf>::operator[]
return (&x)[i];
}
inline thalf const & tvec3<thalf>::operator[]
GLM_FUNC_QUALIFIER thalf const & tvec3<thalf>::operator[]
(
tvec3<thalf>::size_type i
) const
@ -314,13 +314,13 @@ inline thalf const & tvec3<thalf>::operator[]
//////////////////////////////////////
// Implicit basic constructors
inline tvec3<thalf>::tvec3() :
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3() :
x(thalf(0)),
y(thalf(0)),
z(thalf(0))
{}
inline tvec3<thalf>::tvec3
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3
(
tvec3<thalf> const & v
) :
@ -332,7 +332,7 @@ inline tvec3<thalf>::tvec3
//////////////////////////////////////
// Explicit basic constructors
inline tvec3<thalf>::tvec3
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3
(
thalf const & s
) :
@ -341,7 +341,7 @@ inline tvec3<thalf>::tvec3
z(s)
{}
inline tvec3<thalf>::tvec3
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3
(
thalf const & s0,
thalf const & s1,
@ -355,7 +355,7 @@ inline tvec3<thalf>::tvec3
//////////////////////////////////////
// Swizzle constructors
inline tvec3<thalf>::tvec3
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3
(
tref3<thalf> const & r
) :
@ -368,7 +368,7 @@ inline tvec3<thalf>::tvec3
// Convertion scalar constructors
template <typename U>
inline tvec3<thalf>::tvec3
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3
(
U const & x
) :
@ -378,7 +378,7 @@ inline tvec3<thalf>::tvec3
{}
template <typename A, typename B, typename C>
inline tvec3<thalf>::tvec3
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3
(
A const & x,
B const & y,
@ -393,7 +393,7 @@ inline tvec3<thalf>::tvec3
// Convertion vector constructors
template <typename A, typename B>
inline tvec3<thalf>::tvec3
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3
(
tvec2<A> const & v,
B const & s
@ -404,7 +404,7 @@ inline tvec3<thalf>::tvec3
{}
template <typename A, typename B>
inline tvec3<thalf>::tvec3
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3
(
A const & s,
tvec2<B> const & v
@ -415,7 +415,7 @@ inline tvec3<thalf>::tvec3
{}
template <typename U>
inline tvec3<thalf>::tvec3
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3
(
tvec3<U> const & v
) :
@ -425,7 +425,7 @@ inline tvec3<thalf>::tvec3
{}
template <typename U>
inline tvec3<thalf>::tvec3
GLM_FUNC_QUALIFIER tvec3<thalf>::tvec3
(
tvec4<U> const & v
) :
@ -437,7 +437,7 @@ inline tvec3<thalf>::tvec3
//////////////////////////////////////
// Unary arithmetic operators
inline tvec3<thalf> & tvec3<thalf>::operator=
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator=
(
tvec3<thalf> const & v
)
@ -448,7 +448,7 @@ inline tvec3<thalf> & tvec3<thalf>::operator=
return *this;
}
inline tvec3<thalf> & tvec3<thalf>::operator+=
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator+=
(
thalf const & s
)
@ -459,7 +459,7 @@ inline tvec3<thalf> & tvec3<thalf>::operator+=
return *this;
}
inline tvec3<thalf> & tvec3<thalf>::operator+=
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator+=
(
tvec3<thalf> const & v
)
@ -470,7 +470,7 @@ inline tvec3<thalf> & tvec3<thalf>::operator+=
return *this;
}
inline tvec3<thalf> & tvec3<thalf>::operator-=
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator-=
(
thalf const & s
)
@ -481,7 +481,7 @@ inline tvec3<thalf> & tvec3<thalf>::operator-=
return *this;
}
inline tvec3<thalf> & tvec3<thalf>::operator-=
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator-=
(
tvec3<thalf> const & v
)
@ -492,7 +492,7 @@ inline tvec3<thalf> & tvec3<thalf>::operator-=
return *this;
}
inline tvec3<thalf> & tvec3<thalf>::operator*=
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator*=
(
thalf const & s
)
@ -503,7 +503,7 @@ inline tvec3<thalf> & tvec3<thalf>::operator*=
return *this;
}
inline tvec3<thalf> & tvec3<thalf>::operator*=
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator*=
(
tvec3<thalf> const & v
)
@ -514,7 +514,7 @@ inline tvec3<thalf> & tvec3<thalf>::operator*=
return *this;
}
inline tvec3<thalf> & tvec3<thalf>::operator/=
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator/=
(
thalf const & s
)
@ -525,7 +525,7 @@ inline tvec3<thalf> & tvec3<thalf>::operator/=
return *this;
}
inline tvec3<thalf> & tvec3<thalf>::operator/=
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator/=
(
tvec3<thalf> const & v
)
@ -536,7 +536,7 @@ inline tvec3<thalf> & tvec3<thalf>::operator/=
return *this;
}
inline tvec3<thalf> & tvec3<thalf>::operator++()
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator++()
{
++this->x;
++this->y;
@ -544,7 +544,7 @@ inline tvec3<thalf> & tvec3<thalf>::operator++()
return *this;
}
inline tvec3<thalf> & tvec3<thalf>::operator--()
GLM_FUNC_QUALIFIER tvec3<thalf> & tvec3<thalf>::operator--()
{
--this->x;
--this->y;
@ -555,19 +555,19 @@ inline tvec3<thalf> & tvec3<thalf>::operator--()
//////////////////////////////////////
// Swizzle operators
inline thalf tvec3<thalf>::swizzle(comp x) const
GLM_FUNC_QUALIFIER thalf tvec3<thalf>::swizzle(comp x) const
{
return (*this)[x];
}
inline tvec2<thalf> tvec3<thalf>::swizzle(comp x, comp y) const
GLM_FUNC_QUALIFIER tvec2<thalf> tvec3<thalf>::swizzle(comp x, comp y) const
{
return tvec2<thalf>(
(*this)[x],
(*this)[y]);
}
inline tvec3<thalf> tvec3<thalf>::swizzle(comp x, comp y, comp z) const
GLM_FUNC_QUALIFIER tvec3<thalf> tvec3<thalf>::swizzle(comp x, comp y, comp z) const
{
return tvec3<thalf>(
(*this)[x],
@ -575,7 +575,7 @@ inline tvec3<thalf> tvec3<thalf>::swizzle(comp x, comp y, comp z) const
(*this)[z]);
}
inline tvec4<thalf> tvec3<thalf>::swizzle(comp x, comp y, comp z, comp w) const
GLM_FUNC_QUALIFIER tvec4<thalf> tvec3<thalf>::swizzle(comp x, comp y, comp z, comp w) const
{
return tvec4<thalf>(
(*this)[x],
@ -584,7 +584,7 @@ inline tvec4<thalf> tvec3<thalf>::swizzle(comp x, comp y, comp z, comp w) const
(*this)[w]);
}
inline tref3<thalf> tvec3<thalf>::swizzle(comp x, comp y, comp z)
GLM_FUNC_QUALIFIER tref3<thalf> tvec3<thalf>::swizzle(comp x, comp y, comp z)
{
return tref3<thalf>(
(*this)[x],
@ -595,7 +595,7 @@ inline tref3<thalf> tvec3<thalf>::swizzle(comp x, comp y, comp z)
//////////////////////////////////////
// hvec4
inline tvec4<thalf>::size_type tvec4<thalf>::value_size()
GLM_FUNC_QUALIFIER tvec4<thalf>::size_type tvec4<thalf>::value_size()
{
return 4;
}
@ -603,7 +603,7 @@ inline tvec4<thalf>::size_type tvec4<thalf>::value_size()
//////////////////////////////////////
// Accesses
inline thalf & tvec4<thalf>::operator[]
GLM_FUNC_QUALIFIER thalf & tvec4<thalf>::operator[]
(
tvec4<thalf>::size_type i
)
@ -613,7 +613,7 @@ inline thalf & tvec4<thalf>::operator[]
return (&x)[i];
}
inline thalf const & tvec4<thalf>::operator[]
GLM_FUNC_QUALIFIER thalf const & tvec4<thalf>::operator[]
(
tvec4<thalf>::size_type i
) const
@ -626,14 +626,14 @@ inline thalf const & tvec4<thalf>::operator[]
//////////////////////////////////////
// Implicit basic constructors
inline tvec4<thalf>::tvec4() :
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4() :
x(thalf(0)),
y(thalf(0)),
z(thalf(0)),
w(thalf(0))
{}
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
tvec4<thalf> const & v
) :
@ -646,7 +646,7 @@ inline tvec4<thalf>::tvec4
//////////////////////////////////////
// Explicit basic constructors
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
thalf const & s
) :
@ -656,7 +656,7 @@ inline tvec4<thalf>::tvec4
w(s)
{}
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
thalf const & s1,
thalf const & s2,
@ -672,7 +672,7 @@ inline tvec4<thalf>::tvec4
//////////////////////////////////////
// Swizzle constructors
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
tref4<thalf> const & r
) :
@ -686,7 +686,7 @@ inline tvec4<thalf>::tvec4
// Convertion scalar constructors
template <typename U>
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
U const & x
) :
@ -697,7 +697,7 @@ inline tvec4<thalf>::tvec4
{}
template <typename A, typename B, typename C, typename D>
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
A const & x,
B const & y,
@ -714,7 +714,7 @@ inline tvec4<thalf>::tvec4
// Convertion vector constructors
template <typename A, typename B, typename C>
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
tvec2<A> const & v,
B const & s1,
@ -727,7 +727,7 @@ inline tvec4<thalf>::tvec4
{}
template <typename A, typename B, typename C>
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
A const & s1,
tvec2<B> const & v,
@ -740,7 +740,7 @@ inline tvec4<thalf>::tvec4
{}
template <typename A, typename B, typename C>
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
A const & s1,
B const & s2,
@ -753,7 +753,7 @@ inline tvec4<thalf>::tvec4
{}
template <typename A, typename B>
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
tvec3<A> const & v,
B const & s
@ -765,7 +765,7 @@ inline tvec4<thalf>::tvec4
{}
template <typename A, typename B>
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
A const & s,
tvec3<B> const & v
@ -777,7 +777,7 @@ inline tvec4<thalf>::tvec4
{}
template <typename A, typename B>
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
tvec2<A> const & v1,
tvec2<B> const & v2
@ -789,7 +789,7 @@ inline tvec4<thalf>::tvec4
{}
template <typename U>
inline tvec4<thalf>::tvec4
GLM_FUNC_QUALIFIER tvec4<thalf>::tvec4
(
tvec4<U> const & v
) :
@ -802,7 +802,7 @@ inline tvec4<thalf>::tvec4
//////////////////////////////////////
// Unary arithmetic operators
inline tvec4<thalf>& tvec4<thalf>::operator=
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator=
(
tvec4<thalf> const & v
)
@ -814,7 +814,7 @@ inline tvec4<thalf>& tvec4<thalf>::operator=
return *this;
}
inline tvec4<thalf>& tvec4<thalf>::operator+=
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator+=
(
thalf const & s
)
@ -826,7 +826,7 @@ inline tvec4<thalf>& tvec4<thalf>::operator+=
return *this;
}
inline tvec4<thalf>& tvec4<thalf>::operator+=
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator+=
(
tvec4<thalf> const & v
)
@ -838,7 +838,7 @@ inline tvec4<thalf>& tvec4<thalf>::operator+=
return *this;
}
inline tvec4<thalf>& tvec4<thalf>::operator-=
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator-=
(
thalf const & s
)
@ -850,7 +850,7 @@ inline tvec4<thalf>& tvec4<thalf>::operator-=
return *this;
}
inline tvec4<thalf>& tvec4<thalf>::operator-=
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator-=
(
tvec4<thalf> const & v
)
@ -862,7 +862,7 @@ inline tvec4<thalf>& tvec4<thalf>::operator-=
return *this;
}
inline tvec4<thalf>& tvec4<thalf>::operator*=
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator*=
(
thalf const & s
)
@ -874,7 +874,7 @@ inline tvec4<thalf>& tvec4<thalf>::operator*=
return *this;
}
inline tvec4<thalf>& tvec4<thalf>::operator*=
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator*=
(
tvec4<thalf> const & v
)
@ -886,7 +886,7 @@ inline tvec4<thalf>& tvec4<thalf>::operator*=
return *this;
}
inline tvec4<thalf>& tvec4<thalf>::operator/=
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator/=
(
thalf const & s
)
@ -898,7 +898,7 @@ inline tvec4<thalf>& tvec4<thalf>::operator/=
return *this;
}
inline tvec4<thalf>& tvec4<thalf>::operator/=
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator/=
(
tvec4<thalf> const & v
)
@ -910,7 +910,7 @@ inline tvec4<thalf>& tvec4<thalf>::operator/=
return *this;
}
inline tvec4<thalf>& tvec4<thalf>::operator++()
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator++()
{
++this->x;
++this->y;
@ -919,7 +919,7 @@ inline tvec4<thalf>& tvec4<thalf>::operator++()
return *this;
}
inline tvec4<thalf>& tvec4<thalf>::operator--()
GLM_FUNC_QUALIFIER tvec4<thalf>& tvec4<thalf>::operator--()
{
--this->x;
--this->y;
@ -931,19 +931,19 @@ inline tvec4<thalf>& tvec4<thalf>::operator--()
//////////////////////////////////////
// Swizzle operators
inline thalf tvec4<thalf>::swizzle(comp x) const
GLM_FUNC_QUALIFIER thalf tvec4<thalf>::swizzle(comp x) const
{
return (*this)[x];
}
inline tvec2<thalf> tvec4<thalf>::swizzle(comp x, comp y) const
GLM_FUNC_QUALIFIER tvec2<thalf> tvec4<thalf>::swizzle(comp x, comp y) const
{
return tvec2<thalf>(
(*this)[x],
(*this)[y]);
}
inline tvec3<thalf> tvec4<thalf>::swizzle(comp x, comp y, comp z) const
GLM_FUNC_QUALIFIER tvec3<thalf> tvec4<thalf>::swizzle(comp x, comp y, comp z) const
{
return tvec3<thalf>(
(*this)[x],
@ -951,7 +951,7 @@ inline tvec3<thalf> tvec4<thalf>::swizzle(comp x, comp y, comp z) const
(*this)[z]);
}
inline tvec4<thalf> tvec4<thalf>::swizzle(comp x, comp y, comp z, comp w) const
GLM_FUNC_QUALIFIER tvec4<thalf> tvec4<thalf>::swizzle(comp x, comp y, comp z, comp w) const
{
return tvec4<thalf>(
(*this)[x],
@ -960,7 +960,7 @@ inline tvec4<thalf> tvec4<thalf>::swizzle(comp x, comp y, comp z, comp w) const
(*this)[w]);
}
inline tref4<thalf> tvec4<thalf>::swizzle(comp x, comp y, comp z, comp w)
GLM_FUNC_QUALIFIER tref4<thalf> tvec4<thalf>::swizzle(comp x, comp y, comp z, comp w)
{
return tref4<thalf>(
(*this)[x],

View File

@ -12,7 +12,7 @@ namespace gtc{
namespace matrix_access
{
template <typename genType>
inline genType row(
GLM_FUNC_QUALIFIER genType row(
genType const & m,
int index,
typename genType::row_type const & x)
@ -24,7 +24,7 @@ namespace matrix_access
}
template <typename genType>
inline typename genType::row_type row(
GLM_FUNC_QUALIFIER typename genType::row_type row(
genType const & m,
int index)
{
@ -35,7 +35,7 @@ namespace matrix_access
}
template <typename genType>
inline genType column(
GLM_FUNC_QUALIFIER genType column(
genType const & m,
int index,
typename genType::col_type const & x)
@ -46,7 +46,7 @@ namespace matrix_access
}
template <typename genType>
inline typename genType::col_type column(
GLM_FUNC_QUALIFIER typename genType::col_type column(
genType const & m,
int index)
{

View File

@ -36,7 +36,7 @@ namespace matrix_inverse
//! Compute the inverse transpose of a matrix.
//! From GLM_GTC_matrix_inverse extension.
template <typename genType>
inline typename genType::value_type inverseTranspose(
GLM_FUNC_QUALIFIER typename genType::value_type inverseTranspose(
genType const & m);
///@}

View File

@ -12,7 +12,7 @@ namespace gtc{
namespace matrix_inverse
{
template <typename T>
inline detail::tmat3x3<T> affineInverse
GLM_FUNC_QUALIFIER detail::tmat3x3<T> affineInverse
(
detail::tmat3x3<T> const & m
)
@ -26,7 +26,7 @@ namespace matrix_inverse
}
template <typename T>
inline detail::tmat4x4<T> affineInverse
GLM_FUNC_QUALIFIER detail::tmat4x4<T> affineInverse
(
detail::tmat4x4<T> const & m
)
@ -40,7 +40,7 @@ namespace matrix_inverse
}
template <typename valType>
inline detail::tmat2x2<valType> inverseTranspose(
GLM_FUNC_QUALIFIER detail::tmat2x2<valType> inverseTranspose(
detail::tmat2x2<valType> const & m)
{
valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1];
@ -55,7 +55,7 @@ namespace matrix_inverse
}
template <typename valType>
inline detail::tmat3x3<valType> inverseTranspose(
GLM_FUNC_QUALIFIER detail::tmat3x3<valType> inverseTranspose(
detail::tmat3x3<valType> const & m)
{
valType Determinant =
@ -79,7 +79,7 @@ namespace matrix_inverse
}
template <typename valType>
inline detail::tmat4x4<valType> inverseTranspose(
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> inverseTranspose(
detail::tmat4x4<valType> const & m)
{
valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];

View File

@ -12,7 +12,7 @@ namespace gtc{
namespace matrix_transform
{
template <typename T>
inline detail::tmat4x4<T> translate
GLM_FUNC_QUALIFIER detail::tmat4x4<T> translate
(
detail::tmat4x4<T> const & m,
detail::tvec3<T> const & v
@ -24,7 +24,7 @@ namespace matrix_transform
}
template <typename T>
inline detail::tmat4x4<T> rotate
GLM_FUNC_QUALIFIER detail::tmat4x4<T> rotate
(
detail::tmat4x4<T> const & m,
T const & angle,
@ -61,7 +61,7 @@ namespace matrix_transform
}
template <typename T>
inline detail::tmat4x4<T> scale
GLM_FUNC_QUALIFIER detail::tmat4x4<T> scale
(
detail::tmat4x4<T> const & m,
detail::tvec3<T> const & v
@ -76,7 +76,7 @@ namespace matrix_transform
}
template <typename T>
inline detail::tmat4x4<T> translate_slow
GLM_FUNC_QUALIFIER detail::tmat4x4<T> translate_slow
(
detail::tmat4x4<T> const & m,
detail::tvec3<T> const & v
@ -96,7 +96,7 @@ namespace matrix_transform
}
template <typename T>
inline detail::tmat4x4<T> rotate_slow
GLM_FUNC_QUALIFIER detail::tmat4x4<T> rotate_slow
(
detail::tmat4x4<T> const & m,
T const & angle,
@ -130,7 +130,7 @@ namespace matrix_transform
}
template <typename T>
inline detail::tmat4x4<T> scale_slow
GLM_FUNC_QUALIFIER detail::tmat4x4<T> scale_slow
(
detail::tmat4x4<T> const & m,
detail::tvec3<T> const & v
@ -144,7 +144,7 @@ namespace matrix_transform
}
template <typename valType>
inline detail::tmat4x4<valType> ortho
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> ortho
(
valType const & left,
valType const & right,
@ -165,7 +165,7 @@ namespace matrix_transform
}
template <typename valType>
inline detail::tmat4x4<valType> ortho(
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> ortho(
valType const & left,
valType const & right,
valType const & bottom,
@ -181,7 +181,7 @@ namespace matrix_transform
}
template <typename valType>
inline detail::tmat4x4<valType> frustum
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> frustum
(
valType const & left,
valType const & right,
@ -203,7 +203,7 @@ namespace matrix_transform
}
template <typename valType>
inline detail::tmat4x4<valType> perspective
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> perspective
(
valType const & fovy,
valType const & aspect,
@ -227,7 +227,7 @@ namespace matrix_transform
}
template <typename valType>
inline detail::tmat4x4<valType> perspectiveFov
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> perspectiveFov
(
valType const & fov,
valType const & width,
@ -250,7 +250,7 @@ namespace matrix_transform
}
template <typename T>
inline detail::tmat4x4<T> infinitePerspective
GLM_FUNC_QUALIFIER detail::tmat4x4<T> infinitePerspective
(
T fovy,
T aspect,
@ -273,7 +273,7 @@ namespace matrix_transform
}
template <typename T>
inline detail::tmat4x4<T> tweakedInfinitePerspective
GLM_FUNC_QUALIFIER detail::tmat4x4<T> tweakedInfinitePerspective
(
T fovy,
T aspect,
@ -296,7 +296,7 @@ namespace matrix_transform
}
template <typename T, typename U>
inline detail::tvec3<T> project
GLM_FUNC_QUALIFIER detail::tvec3<T> project
(
detail::tvec3<T> const & obj,
detail::tmat4x4<T> const & model,
@ -317,7 +317,7 @@ namespace matrix_transform
}
template <typename T, typename U>
inline detail::tvec3<T> unProject
GLM_FUNC_QUALIFIER detail::tvec3<T> unProject
(
detail::tvec3<T> const & win,
detail::tmat4x4<T> const & model,
@ -363,7 +363,7 @@ namespace matrix_transform
}
template <typename T>
inline detail::tmat4x4<T> lookAt
GLM_FUNC_QUALIFIER detail::tmat4x4<T> lookAt
(
detail::tvec3<T> const & eye,
detail::tvec3<T> const & center,

View File

@ -13,7 +13,7 @@ namespace glm{
namespace detail{
template <typename T>
inline tquat<T>::tquat() :
GLM_FUNC_QUALIFIER tquat<T>::tquat() :
x(0),
y(0),
z(0),
@ -21,7 +21,7 @@ namespace detail{
{}
template <typename T>
inline tquat<T>::tquat
GLM_FUNC_QUALIFIER tquat<T>::tquat
(
value_type const & s,
tvec3<T> const & v
@ -33,7 +33,7 @@ namespace detail{
{}
template <typename T>
inline tquat<T>::tquat
GLM_FUNC_QUALIFIER tquat<T>::tquat
(
value_type const & w,
value_type const & x,
@ -50,7 +50,7 @@ namespace detail{
// tquat conversions
//template <typename valType>
//inline tquat<valType>::tquat
//GLM_FUNC_QUALIFIER tquat<valType>::tquat
//(
// valType const & pitch,
// valType const & yaw,
@ -68,7 +68,7 @@ namespace detail{
//}
template <typename T>
inline tquat<T>::tquat
GLM_FUNC_QUALIFIER tquat<T>::tquat
(
tvec3<T> const & eulerAngle
)
@ -83,7 +83,7 @@ namespace detail{
}
template <typename T>
inline tquat<T>::tquat
GLM_FUNC_QUALIFIER tquat<T>::tquat
(
tmat3x3<T> const & m
)
@ -92,7 +92,7 @@ namespace detail{
}
template <typename T>
inline tquat<T>::tquat
GLM_FUNC_QUALIFIER tquat<T>::tquat
(
tmat4x4<T> const & m
)
@ -104,13 +104,13 @@ namespace detail{
// tquat<T> accesses
template <typename T>
inline typename tquat<T>::value_type & tquat<T>::operator [] (int i)
GLM_FUNC_QUALIFIER typename tquat<T>::value_type & tquat<T>::operator [] (int i)
{
return (&x)[i];
}
template <typename T>
inline typename tquat<T>::value_type const & tquat<T>::operator [] (int i) const
GLM_FUNC_QUALIFIER typename tquat<T>::value_type const & tquat<T>::operator [] (int i) const
{
return (&x)[i];
}
@ -119,7 +119,7 @@ namespace detail{
// tquat<valType> operators
template <typename T>
inline tquat<T> & tquat<T>::operator *=
GLM_FUNC_QUALIFIER tquat<T> & tquat<T>::operator *=
(
value_type const & s
)
@ -132,7 +132,7 @@ namespace detail{
}
template <typename T>
inline tquat<T> & tquat<T>::operator /=
GLM_FUNC_QUALIFIER tquat<T> & tquat<T>::operator /=
(
value_type const & s
)
@ -148,7 +148,7 @@ namespace detail{
// tquat<valType> external operators
template <typename T>
inline detail::tquat<T> operator-
GLM_FUNC_QUALIFIER detail::tquat<T> operator-
(
detail::tquat<T> const & q
)
@ -157,7 +157,7 @@ namespace detail{
}
template <typename T>
inline detail::tquat<T> operator*
GLM_FUNC_QUALIFIER detail::tquat<T> operator*
(
detail::tquat<T> const & q,
detail::tquat<T> const & p
@ -172,7 +172,7 @@ namespace detail{
// Transformation
template <typename T>
inline detail::tvec3<T> operator*
GLM_FUNC_QUALIFIER detail::tvec3<T> operator*
(
detail::tquat<T> const & q,
detail::tvec3<T> const & v
@ -191,7 +191,7 @@ namespace detail{
}
template <typename T>
inline detail::tvec3<T> operator*
GLM_FUNC_QUALIFIER detail::tvec3<T> operator*
(
detail::tvec3<T> const & v,
detail::tquat<T> const & q
@ -201,7 +201,7 @@ namespace detail{
}
template <typename T>
inline detail::tvec4<T> operator*
GLM_FUNC_QUALIFIER detail::tvec4<T> operator*
(
detail::tquat<T> const & q,
detail::tvec4<T> const & v
@ -211,7 +211,7 @@ namespace detail{
}
template <typename T>
inline detail::tvec4<T> operator*
GLM_FUNC_QUALIFIER detail::tvec4<T> operator*
(
detail::tvec4<T> const & v,
detail::tquat<T> const & q
@ -221,7 +221,7 @@ namespace detail{
}
template <typename T>
inline detail::tquat<T> operator*
GLM_FUNC_QUALIFIER detail::tquat<T> operator*
(
detail::tquat<T> const & q,
typename detail::tquat<T>::value_type const & s
@ -232,7 +232,7 @@ namespace detail{
}
template <typename T>
inline detail::tquat<T> operator*
GLM_FUNC_QUALIFIER detail::tquat<T> operator*
(
typename detail::tquat<T>::value_type const & s,
detail::tquat<T> const & q
@ -242,7 +242,7 @@ namespace detail{
}
template <typename T>
inline detail::tquat<T> operator/
GLM_FUNC_QUALIFIER detail::tquat<T> operator/
(
detail::tquat<T> const & q,
typename detail::tquat<T>::value_type const & s
@ -256,7 +256,7 @@ namespace detail{
// Boolean operators
template <typename T>
inline bool operator==
GLM_FUNC_QUALIFIER bool operator==
(
detail::tquat<T> const & q1,
detail::tquat<T> const & q2
@ -266,7 +266,7 @@ namespace detail{
}
template <typename T>
inline bool operator!=
GLM_FUNC_QUALIFIER bool operator!=
(
detail::tquat<T> const & q1,
detail::tquat<T> const & q2
@ -282,7 +282,7 @@ namespace quaternion{
////////////////////////////////////////////////////////
template <typename T>
inline typename detail::tquat<T>::value_type length
GLM_FUNC_QUALIFIER typename detail::tquat<T>::value_type length
(
detail::tquat<T> const & q
)
@ -291,7 +291,7 @@ namespace quaternion{
}
template <typename T>
inline detail::tquat<T> normalize
GLM_FUNC_QUALIFIER detail::tquat<T> normalize
(
detail::tquat<T> const & q
)
@ -304,7 +304,7 @@ namespace quaternion{
}
template <typename T>
inline typename detail::tquat<T>::value_type dot
GLM_FUNC_QUALIFIER typename detail::tquat<T>::value_type dot
(
detail::tquat<T> const & q1,
detail::tquat<T> const & q2
@ -314,7 +314,7 @@ namespace quaternion{
}
template <typename T>
inline detail::tquat<T> cross
GLM_FUNC_QUALIFIER detail::tquat<T> cross
(
detail::tquat<T> const & q1,
detail::tquat<T> const & q2
@ -329,7 +329,7 @@ namespace quaternion{
// (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle))
template <typename T>
inline detail::tquat<T> mix
GLM_FUNC_QUALIFIER detail::tquat<T> mix
(
detail::tquat<T> const & x,
detail::tquat<T> const & y,
@ -371,7 +371,7 @@ namespace quaternion{
}
template <typename T>
inline detail::tquat<T> mix2
GLM_FUNC_QUALIFIER detail::tquat<T> mix2
(
detail::tquat<T> const & x,
detail::tquat<T> const & y,
@ -408,7 +408,7 @@ namespace quaternion{
}
template <typename T>
inline detail::tquat<T> conjugate
GLM_FUNC_QUALIFIER detail::tquat<T> conjugate
(
detail::tquat<T> const & q
)
@ -417,7 +417,7 @@ namespace quaternion{
}
template <typename T>
inline detail::tquat<T> inverse
GLM_FUNC_QUALIFIER detail::tquat<T> inverse
(
detail::tquat<T> const & q
)
@ -426,7 +426,7 @@ namespace quaternion{
}
template <typename T>
inline detail::tquat<T> rotate
GLM_FUNC_QUALIFIER detail::tquat<T> rotate
(
detail::tquat<T> const & q,
typename detail::tquat<T>::value_type const & angle,
@ -452,7 +452,7 @@ namespace quaternion{
}
template <typename T>
inline detail::tmat3x3<T> mat3_cast
GLM_FUNC_QUALIFIER detail::tmat3x3<T> mat3_cast
(
detail::tquat<T> const & q
)
@ -473,7 +473,7 @@ namespace quaternion{
}
template <typename T>
inline detail::tmat4x4<T> mat4_cast
GLM_FUNC_QUALIFIER detail::tmat4x4<T> mat4_cast
(
detail::tquat<T> const & q
)
@ -482,7 +482,7 @@ namespace quaternion{
}
template <typename T>
inline detail::tquat<T> quat_cast
GLM_FUNC_QUALIFIER detail::tquat<T> quat_cast
(
detail::tmat3x3<T> const & m
)
@ -545,7 +545,7 @@ namespace quaternion{
}
template <typename T>
inline detail::tquat<T> quat_cast
GLM_FUNC_QUALIFIER detail::tquat<T> quat_cast
(
detail::tmat4x4<T> const & m4
)

View File

@ -75,11 +75,11 @@ namespace glm
# define static_swizzle1(TYPE, SIZE) \
template <comp x> \
inline TYPE swizzle(detail::tvec##SIZE<TYPE> const & v) \
GLM_FUNC_QUALIFIER TYPE swizzle(detail::tvec##SIZE<TYPE> const & v) \
{return v[x];} \
\
template <comp x> \
inline TYPE& swizzle(detail::tvec##SIZE<TYPE> & v) \
GLM_FUNC_QUALIFIER TYPE& swizzle(detail::tvec##SIZE<TYPE> & v) \
{return v[x];}
static_swizzle1(detail::float16, 2)
@ -120,32 +120,32 @@ namespace glm
# define static_swizzle2_const(TYPE) \
template <comp x, comp y> \
inline TYPE swizzle(TYPE const & v) \
GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \
{return TYPE(v[x], v[y]);}
# define static_swizzle3_const(TYPE) \
template <comp x, comp y, comp z> \
inline TYPE swizzle(TYPE const & v) \
GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \
{return TYPE(v[x], v[y], v[z]);}
# define static_swizzle4_const(TYPE) \
template <comp x, comp y, comp z, comp w> \
inline TYPE swizzle(TYPE const & v) \
GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \
{return TYPE(v[x], v[y], v[z], v[w]);}
/*
# define static_swizzle2_const(TYPE, SIZE) \
template <comp x, comp y> \
inline detail::tvec2<TYPE> swizzle(detail::tvec##SIZE<TYPE> const & v) \
GLM_FUNC_QUALIFIER detail::tvec2<TYPE> swizzle(detail::tvec##SIZE<TYPE> const & v) \
{return detail::tvec2<TYPE>(v[x], v[y]);}
# define static_swizzle3_const(TYPE, SIZE) \
template <comp x, comp y, comp z> \
inline detail::tvec3<TYPE> swizzle(detail::tvec##SIZE<TYPE> const & v) \
GLM_FUNC_QUALIFIER detail::tvec3<TYPE> swizzle(detail::tvec##SIZE<TYPE> const & v) \
{return detail::tvec3<TYPE>(v[x], v[y], v[z]);}
# define static_swizzle4_const(TYPE, SIZE) \
template <comp x, comp y, comp z, comp w> \
inline detail::tvec4<TYPE> swizzle(detail::tvec##SIZE<TYPE> const & v) \
GLM_FUNC_QUALIFIER detail::tvec4<TYPE> swizzle(detail::tvec##SIZE<TYPE> const & v) \
{return detail::tvec4<TYPE>(v[x], v[y], v[z], v[w]);}
*/
static_swizzle2_const(glm::f16vec2)
@ -258,17 +258,17 @@ namespace glm
# define static_swizzle2_ref(TYPE) \
template <glm::comp x, glm::comp y> \
inline glm::detail::tref2<typename TYPE::value_type> swizzle(TYPE & v) \
GLM_FUNC_QUALIFIER glm::detail::tref2<typename TYPE::value_type> swizzle(TYPE & v) \
{return glm::detail::tref2<typename TYPE::value_type>(v[x], v[y]);}
# define static_swizzle3_ref(TYPE) \
template <glm::comp x, glm::comp y, glm::comp z> \
inline glm::detail::tref3<typename TYPE::value_type> swizzle(TYPE & v) \
GLM_FUNC_QUALIFIER glm::detail::tref3<typename TYPE::value_type> swizzle(TYPE & v) \
{return glm::detail::tref3<typename TYPE::value_type>(v[x], v[y], v[z]);}
# define static_swizzle4_ref(TYPE) \
template <glm::comp x, glm::comp y, glm::comp z, glm::comp w> \
inline glm::detail::tref4<typename TYPE::value_type> swizzle(TYPE & v) \
GLM_FUNC_QUALIFIER glm::detail::tref4<typename TYPE::value_type> swizzle(TYPE & v) \
{return glm::detail::tref4<typename TYPE::value_type>(v[x], v[y], v[z], v[w]);}
static_swizzle2_ref(glm::f16vec2)

View File

@ -15,7 +15,7 @@ namespace gtc{
namespace swizzle{
template <typename T, template <typename> class vecType>
inline T swizzle
GLM_FUNC_QUALIFIER T swizzle
(
vecType<T> const & v,
comp x
@ -26,7 +26,7 @@ inline T swizzle
}
template <typename T, template <typename> class vecType>
inline detail::tvec2<T> swizzle
GLM_FUNC_QUALIFIER detail::tvec2<T> swizzle
(
vecType<T> const & v,
comp x, comp y
@ -38,7 +38,7 @@ inline detail::tvec2<T> swizzle
}
template <typename T, template <typename> class vecType>
inline detail::tvec3<T> swizzle
GLM_FUNC_QUALIFIER detail::tvec3<T> swizzle
(
vecType<T> const & v,
comp x, comp y, comp z
@ -51,7 +51,7 @@ inline detail::tvec3<T> swizzle
}
template <typename T, template <typename> class vecType>
inline detail::tvec4<T> swizzle
GLM_FUNC_QUALIFIER detail::tvec4<T> swizzle
(
vecType<T> const & v,
comp x, comp y, comp z, comp w
@ -61,7 +61,7 @@ inline detail::tvec4<T> swizzle
}
template <typename T>
inline T& swizzle
GLM_FUNC_QUALIFIER T& swizzle
(
detail::tvec4<T> & v,
comp x
@ -71,7 +71,7 @@ inline T& swizzle
}
template <typename T>
inline detail::tref2<T> swizzle
GLM_FUNC_QUALIFIER detail::tref2<T> swizzle
(
detail::tvec4<T> & v,
comp x, comp y
@ -81,7 +81,7 @@ inline detail::tref2<T> swizzle
}
template <typename T>
inline detail::tref3<T> swizzle
GLM_FUNC_QUALIFIER detail::tref3<T> swizzle
(
detail::tvec4<T> & v,
comp x, comp y, comp z
@ -91,7 +91,7 @@ inline detail::tref3<T> swizzle
}
template <typename T>
inline detail::tref4<T> swizzle
GLM_FUNC_QUALIFIER detail::tref4<T> swizzle
(
detail::tvec4<T> & v,
comp x, comp y, comp z, comp w
@ -101,7 +101,7 @@ inline detail::tref4<T> swizzle
}
/*
template <comp x>
inline float& swizzle
GLM_FUNC_QUALIFIER float& swizzle
(
detail::tvec4<float> & v
)
@ -110,7 +110,7 @@ inline float& swizzle
}
template <comp x>
inline int& swizzle
GLM_FUNC_QUALIFIER int& swizzle
(
detail::tvec4<int> & v
)
@ -119,7 +119,7 @@ inline int& swizzle
}
template <comp x, comp y>
inline detail::tref2<float> swizzle
GLM_FUNC_QUALIFIER detail::tref2<float> swizzle
(
detail::tvec4<float> & v
)
@ -128,7 +128,7 @@ inline detail::tref2<float> swizzle
}
template <comp x, comp y>
inline detail::tref2<int> swizzle
GLM_FUNC_QUALIFIER detail::tref2<int> swizzle
(
detail::tvec4<int> & v
)
@ -137,7 +137,7 @@ inline detail::tref2<int> swizzle
}
template <comp x, comp y, comp z>
inline detail::tref3<float> swizzle
GLM_FUNC_QUALIFIER detail::tref3<float> swizzle
(
detail::tvec4<float> & v
)
@ -146,7 +146,7 @@ inline detail::tref3<float> swizzle
}
template <comp x, comp y, comp z>
inline detail::tref3<int> swizzle
GLM_FUNC_QUALIFIER detail::tref3<int> swizzle
(
detail::tvec4<int> & v
)
@ -155,7 +155,7 @@ inline detail::tref3<int> swizzle
}
template <comp x, comp y, comp z, comp w>
inline detail::tref4<float> swizzle
GLM_FUNC_QUALIFIER detail::tref4<float> swizzle
(
detail::tvec4<float> & v
)
@ -164,7 +164,7 @@ inline detail::tref4<float> swizzle
}
template <comp x, comp y, comp z, comp w>
inline detail::tref4<int> swizzle
GLM_FUNC_QUALIFIER detail::tref4<int> swizzle
(
detail::tvec4<int> & v
)

View File

@ -36,7 +36,7 @@ namespace glm
//! Get the const address of the vector content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tvec2<T> const & vec
)
@ -47,7 +47,7 @@ namespace glm
//! Get the address of the vector content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tvec2<T> & vec
)
@ -58,7 +58,7 @@ namespace glm
//! Get the const address of the vector content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tvec3<T> const & vec
)
@ -69,7 +69,7 @@ namespace glm
//! Get the address of the vector content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tvec3<T> & vec
)
@ -80,7 +80,7 @@ namespace glm
//! Get the const address of the vector content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tvec4<T> const & vec
)
@ -91,7 +91,7 @@ namespace glm
//! Get the address of the vector content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tvec4<T> & vec
)
@ -102,7 +102,7 @@ namespace glm
//! Get the const address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tmat2x2<T> const & mat
)
@ -113,7 +113,7 @@ namespace glm
//! Get the address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tmat2x2<T> & mat
)
@ -124,7 +124,7 @@ namespace glm
//! Get the const address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tmat3x3<T> const & mat
)
@ -135,7 +135,7 @@ namespace glm
//! Get the address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tmat3x3<T> & mat
)
@ -146,7 +146,7 @@ namespace glm
//! Get the const address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tmat4x4<T> const & mat
)
@ -157,7 +157,7 @@ namespace glm
//! Get the address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tmat4x4<T> & mat
)
@ -168,7 +168,7 @@ namespace glm
//! Get the const address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tmat2x3<T> const & mat
)
@ -179,7 +179,7 @@ namespace glm
//! Get the address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tmat2x3<T> & mat
)
@ -190,7 +190,7 @@ namespace glm
//! Get the const address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tmat3x2<T> const & mat
)
@ -201,7 +201,7 @@ namespace glm
//! Get the address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tmat3x2<T> & mat
)
@ -212,7 +212,7 @@ namespace glm
//! Get the const address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tmat2x4<T> const & mat
)
@ -223,7 +223,7 @@ namespace glm
//! Get the address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tmat2x4<T> & mat
)
@ -234,7 +234,7 @@ namespace glm
//! Get the const address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tmat4x2<T> const & mat
)
@ -245,7 +245,7 @@ namespace glm
//! Get the address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tmat4x2<T> & mat
)
@ -256,7 +256,7 @@ namespace glm
//! Get the const address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tmat3x4<T> const & mat
)
@ -267,7 +267,7 @@ namespace glm
//! Get the address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tmat3x4<T> & mat
)
@ -278,7 +278,7 @@ namespace glm
//! Get the const address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T const * value_ptr
GLM_FUNC_QUALIFIER T const * value_ptr
(
detail::tmat4x3<T> const & mat
)
@ -289,7 +289,7 @@ namespace glm
//! Get the address of the matrix content.
//! From GLM_GTC_type_ptr extension.
template<typename T>
inline T * value_ptr(detail::tmat4x3<T> & mat)
GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T> & mat)
{
return &(mat[0].x);
}

View File

@ -13,13 +13,13 @@ namespace associated_min_max{
// Min comparison between 2 variables
template<typename T, typename U>
inline U associatedMin(T x, U a, T y, U b)
GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)
{
return x < y ? a : b;
}
template<typename T, typename U>
inline detail::tvec2<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMin
(
const detail::tvec2<T>& x, const detail::tvec2<U>& a,
const detail::tvec2<T>& y, const detail::tvec2<U>& b
@ -34,7 +34,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec3<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMin
(
const detail::tvec3<T>& x, const detail::tvec3<U>& a,
const detail::tvec3<T>& y, const detail::tvec3<U>& b
@ -47,7 +47,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec4<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMin
(
const detail::tvec4<T>& x, const detail::tvec4<U>& a,
const detail::tvec4<T>& y, const detail::tvec4<U>& b
@ -60,7 +60,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec2<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMin
(
T x, const detail::tvec2<U>& a,
T y, const detail::tvec2<U>& b
@ -73,7 +73,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec3<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMin
(
T x, const detail::tvec3<U>& a,
T y, const detail::tvec3<U>& b
@ -86,7 +86,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec4<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMin
(
T x, const detail::tvec4<U>& a,
T y, const detail::tvec4<U>& b
@ -99,7 +99,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec2<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMin
(
const detail::tvec2<T>& x, U a,
const detail::tvec2<T>& y, U b
@ -112,7 +112,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec3<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMin
(
const detail::tvec3<T>& x, U a,
const detail::tvec3<T>& y, U b
@ -125,7 +125,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec4<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMin
(
const detail::tvec4<T>& x, U a,
const detail::tvec4<T>& y, U b
@ -139,7 +139,7 @@ namespace associated_min_max{
// Min comparison between 3 variables
template<typename T, typename U>
inline U associatedMin
GLM_FUNC_QUALIFIER U associatedMin
(
T x, U a,
T y, U b,
@ -151,7 +151,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec2<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMin
(
const detail::tvec2<T>& x, const detail::tvec2<U>& a,
const detail::tvec2<T>& y, const detail::tvec2<U>& b,
@ -165,7 +165,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec3<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMin
(
const detail::tvec3<T>& x, const detail::tvec3<U>& a,
const detail::tvec3<T>& y, const detail::tvec3<U>& b,
@ -179,7 +179,7 @@ namespace associated_min_max{
}
template<typename T, typename U>
inline detail::tvec4<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMin
(
const detail::tvec4<T>& x, const detail::tvec4<U>& a,
const detail::tvec4<T>& y, const detail::tvec4<U>& b,
@ -194,7 +194,7 @@ namespace associated_min_max{
// Min comparison between 4 variables
template<typename T, typename U>
inline U associatedMin
GLM_FUNC_QUALIFIER U associatedMin
(
T x, U a,
T y, U b,
@ -212,7 +212,7 @@ namespace associated_min_max{
// Min comparison between 4 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMin
(
const detail::tvec2<T>& x, const detail::tvec2<U>& a,
const detail::tvec2<T>& y, const detail::tvec2<U>& b,
@ -234,7 +234,7 @@ namespace associated_min_max{
// Min comparison between 4 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMin
(
const detail::tvec3<T>& x, const detail::tvec3<U>& a,
const detail::tvec3<T>& y, const detail::tvec3<U>& b,
@ -256,7 +256,7 @@ namespace associated_min_max{
// Min comparison between 4 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMin
(
const detail::tvec4<T>& x, const detail::tvec4<U>& a,
const detail::tvec4<T>& y, const detail::tvec4<U>& b,
@ -278,7 +278,7 @@ namespace associated_min_max{
// Min comparison between 4 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMin
(
T x, const detail::tvec2<U>& a,
T y, const detail::tvec2<U>& b,
@ -301,7 +301,7 @@ namespace associated_min_max{
// Min comparison between 4 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMin
(
T x, const detail::tvec3<U>& a,
T y, const detail::tvec3<U>& b,
@ -324,7 +324,7 @@ namespace associated_min_max{
// Min comparison between 4 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMin
(
T x, const detail::tvec4<U>& a,
T y, const detail::tvec4<U>& b,
@ -347,7 +347,7 @@ namespace associated_min_max{
// Min comparison between 4 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMin
(
const detail::tvec2<T>& x, U a,
const detail::tvec2<T>& y, U b,
@ -369,7 +369,7 @@ namespace associated_min_max{
// Min comparison between 4 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMin
(
const detail::tvec3<T>& x, U a,
const detail::tvec3<T>& y, U b,
@ -391,7 +391,7 @@ namespace associated_min_max{
// Min comparison between 4 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMin
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMin
(
const detail::tvec4<T>& x, U a,
const detail::tvec4<T>& y, U b,
@ -413,14 +413,14 @@ namespace associated_min_max{
// Max comparison between 2 variables
template<typename T, typename U>
inline U associatedMax(T x, U a, T y, U b)
GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b)
{
return x > y ? a : b;
}
// Max comparison between 2 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMax
(
const detail::tvec2<T>& x, const detail::tvec2<U>& a,
const detail::tvec2<T>& y, const detail::tvec2<U>& b
@ -434,7 +434,7 @@ namespace associated_min_max{
// Max comparison between 2 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMax
(
const detail::tvec3<T>& x, const detail::tvec3<U>& a,
const detail::tvec3<T>& y, const detail::tvec3<U>& b
@ -448,7 +448,7 @@ namespace associated_min_max{
// Max comparison between 2 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMax
(
const detail::tvec4<T>& x, const detail::tvec4<U>& a,
const detail::tvec4<T>& y, const detail::tvec4<U>& b
@ -462,7 +462,7 @@ namespace associated_min_max{
// Max comparison between 2 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMax
(
T x, const detail::tvec2<U>& a,
T y, const detail::tvec2<U>& b
@ -476,7 +476,7 @@ namespace associated_min_max{
// Max comparison between 2 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMax
(
T x, const detail::tvec3<U>& a,
T y, const detail::tvec3<U>& b
@ -490,7 +490,7 @@ namespace associated_min_max{
// Max comparison between 2 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMax
(
T x, const detail::tvec4<U>& a,
T y, const detail::tvec4<U>& b
@ -504,7 +504,7 @@ namespace associated_min_max{
// Max comparison between 2 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMax
(
const detail::tvec2<T>& x, U a,
const detail::tvec2<T>& y, U b
@ -518,7 +518,7 @@ namespace associated_min_max{
// Max comparison between 2 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMax
(
const detail::tvec3<T>& x, U a,
const detail::tvec3<T>& y, U b
@ -532,7 +532,7 @@ namespace associated_min_max{
// Max comparison between 2 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMax
(
const detail::tvec4<T>& x, U a,
const detail::tvec4<T>& y, U b
@ -546,7 +546,7 @@ namespace associated_min_max{
// Max comparison between 3 variables
template<typename T, typename U>
inline U associatedMax
GLM_FUNC_QUALIFIER U associatedMax
(
T x, U a,
T y, U b,
@ -559,7 +559,7 @@ namespace associated_min_max{
// Max comparison between 3 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMax
(
const detail::tvec2<T>& x, const detail::tvec2<U>& a,
const detail::tvec2<T>& y, const detail::tvec2<U>& b,
@ -574,7 +574,7 @@ namespace associated_min_max{
// Max comparison between 3 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMax
(
const detail::tvec3<T>& x, const detail::tvec3<U>& a,
const detail::tvec3<T>& y, const detail::tvec3<U>& b,
@ -589,7 +589,7 @@ namespace associated_min_max{
// Max comparison between 3 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMax
(
const detail::tvec4<T>& x, const detail::tvec4<U>& a,
const detail::tvec4<T>& y, const detail::tvec4<U>& b,
@ -604,7 +604,7 @@ namespace associated_min_max{
// Max comparison between 3 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMax
(
T x, const detail::tvec2<U>& a,
T y, const detail::tvec2<U>& b,
@ -619,7 +619,7 @@ namespace associated_min_max{
// Max comparison between 3 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMax
(
T x, const detail::tvec3<U>& a,
T y, const detail::tvec3<U>& b,
@ -634,7 +634,7 @@ namespace associated_min_max{
// Max comparison between 3 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMax
(
T x, const detail::tvec4<U>& a,
T y, const detail::tvec4<U>& b,
@ -649,7 +649,7 @@ namespace associated_min_max{
// Max comparison between 3 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMax
(
const detail::tvec2<T>& x, U a,
const detail::tvec2<T>& y, U b,
@ -664,7 +664,7 @@ namespace associated_min_max{
// Max comparison between 3 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMax
(
const detail::tvec3<T>& x, U a,
const detail::tvec3<T>& y, U b,
@ -679,7 +679,7 @@ namespace associated_min_max{
// Max comparison between 3 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMax
(
const detail::tvec4<T>& x, U a,
const detail::tvec4<T>& y, U b,
@ -694,7 +694,7 @@ namespace associated_min_max{
// Max comparison between 4 variables
template<typename T, typename U>
inline U associatedMax
GLM_FUNC_QUALIFIER U associatedMax
(
T x, U a,
T y, U b,
@ -712,7 +712,7 @@ namespace associated_min_max{
// Max comparison between 4 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMax
(
const detail::tvec2<T>& x, const detail::tvec2<U>& a,
const detail::tvec2<T>& y, const detail::tvec2<U>& b,
@ -734,7 +734,7 @@ namespace associated_min_max{
// Max comparison between 4 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMax
(
const detail::tvec3<T>& x, const detail::tvec3<U>& a,
const detail::tvec3<T>& y, const detail::tvec3<U>& b,
@ -756,7 +756,7 @@ namespace associated_min_max{
// Max comparison between 4 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMax
(
const detail::tvec4<T>& x, const detail::tvec4<U>& a,
const detail::tvec4<T>& y, const detail::tvec4<U>& b,
@ -778,7 +778,7 @@ namespace associated_min_max{
// Max comparison between 4 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMax
(
T x, const detail::tvec2<U>& a,
T y, const detail::tvec2<U>& b,
@ -801,7 +801,7 @@ namespace associated_min_max{
// Max comparison between 4 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMax
(
T x, const detail::tvec3<U>& a,
T y, const detail::tvec3<U>& b,
@ -824,7 +824,7 @@ namespace associated_min_max{
// Max comparison between 4 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMax
(
T x, const detail::tvec4<U>& a,
T y, const detail::tvec4<U>& b,
@ -847,7 +847,7 @@ namespace associated_min_max{
// Max comparison between 4 variables
template<typename T, typename U>
inline detail::tvec2<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec2<U> associatedMax
(
const detail::tvec2<T>& x, U a,
const detail::tvec2<T>& y, U b,
@ -869,7 +869,7 @@ namespace associated_min_max{
// Max comparison between 4 variables
template<typename T, typename U>
inline detail::tvec3<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec3<U> associatedMax
(
const detail::tvec3<T>& x, U a,
const detail::tvec3<T>& y, U b,
@ -891,7 +891,7 @@ namespace associated_min_max{
// Max comparison between 4 variables
template<typename T, typename U>
inline detail::tvec4<U> associatedMax
GLM_FUNC_QUALIFIER detail::tvec4<U> associatedMax
(
const detail::tvec4<T>& x, U a,
const detail::tvec4<T>& y, U b,

View File

@ -14,7 +14,7 @@ namespace gtx{
namespace bit{
template <typename genIType>
inline genIType mask
GLM_FUNC_QUALIFIER genIType mask
(
genIType const & count
)
@ -23,7 +23,7 @@ inline genIType mask
}
template <typename valIType>
inline detail::tvec2<valIType> mask
GLM_FUNC_QUALIFIER detail::tvec2<valIType> mask
(
detail::tvec2<valIType> const & count
)
@ -34,7 +34,7 @@ inline detail::tvec2<valIType> mask
}
template <typename valIType>
inline detail::tvec3<valIType> mask
GLM_FUNC_QUALIFIER detail::tvec3<valIType> mask
(
detail::tvec3<valIType> const & count
)
@ -46,7 +46,7 @@ inline detail::tvec3<valIType> mask
}
template <typename valIType>
inline detail::tvec4<valIType> mask
GLM_FUNC_QUALIFIER detail::tvec4<valIType> mask
(
detail::tvec4<valIType> const & count
)
@ -60,7 +60,7 @@ inline detail::tvec4<valIType> mask
// extractField
template <typename genIType>
inline genIType extractField
GLM_FUNC_QUALIFIER genIType extractField
(
gtc::half_float::half const & value,
genIType const & first,
@ -72,7 +72,7 @@ inline genIType extractField
}
template <typename genIType>
inline genIType extractField
GLM_FUNC_QUALIFIER genIType extractField
(
float const & value,
genIType const & first,
@ -84,7 +84,7 @@ inline genIType extractField
}
template <typename genIType>
inline genIType extractField
GLM_FUNC_QUALIFIER genIType extractField
(
double const & value,
genIType const & first,
@ -96,7 +96,7 @@ inline genIType extractField
}
template <typename genIUType, typename sizeType>
inline genIUType extractField
GLM_FUNC_QUALIFIER genIUType extractField
(
genIUType const & Value,
sizeType const & First,
@ -114,7 +114,7 @@ inline genIUType extractField
}
template <typename genIUType, typename sizeType>
inline detail::tvec2<genIUType> extractField
GLM_FUNC_QUALIFIER detail::tvec2<genIUType> extractField
(
detail::tvec2<genIUType> const & value,
sizeType const & first,
@ -127,7 +127,7 @@ inline detail::tvec2<genIUType> extractField
}
template <typename genIUType, typename sizeType>
inline detail::tvec3<genIUType> extractField
GLM_FUNC_QUALIFIER detail::tvec3<genIUType> extractField
(
detail::tvec3<genIUType> const & value,
sizeType const & first,
@ -141,7 +141,7 @@ inline detail::tvec3<genIUType> extractField
}
template <typename genIUType, typename sizeType>
inline detail::tvec4<genIUType> extractField
GLM_FUNC_QUALIFIER detail::tvec4<genIUType> extractField
(
detail::tvec4<genIUType> const & value,
sizeType const & first,
@ -156,7 +156,7 @@ inline detail::tvec4<genIUType> extractField
}
template <typename genIUType, typename sizeType>
inline detail::tvec2<genIUType> extractField
GLM_FUNC_QUALIFIER detail::tvec2<genIUType> extractField
(
detail::tvec2<genIUType> const & value,
detail::tvec2<sizeType> const & first,
@ -169,7 +169,7 @@ inline detail::tvec2<genIUType> extractField
}
template <typename genIUType, typename sizeType>
inline detail::tvec3<genIUType> extractField
GLM_FUNC_QUALIFIER detail::tvec3<genIUType> extractField
(
detail::tvec3<genIUType> const & value,
detail::tvec3<sizeType> const & first,
@ -183,7 +183,7 @@ inline detail::tvec3<genIUType> extractField
}
template <typename genIUType, typename sizeType>
inline detail::tvec4<genIUType> extractField
GLM_FUNC_QUALIFIER detail::tvec4<genIUType> extractField
(
detail::tvec4<genIUType> const & value,
detail::tvec4<sizeType> const & first,
@ -198,7 +198,7 @@ inline detail::tvec4<genIUType> extractField
}
template <typename genIUType, typename sizeType>
inline detail::tvec2<genIUType> extractField
GLM_FUNC_QUALIFIER detail::tvec2<genIUType> extractField
(
genIUType const & value,
detail::tvec2<sizeType> const & first,
@ -211,7 +211,7 @@ inline detail::tvec2<genIUType> extractField
}
template <typename genIUType, typename sizeType>
inline detail::tvec3<genIUType> extractField
GLM_FUNC_QUALIFIER detail::tvec3<genIUType> extractField
(
genIUType const & value,
detail::tvec3<sizeType> const & first,
@ -225,7 +225,7 @@ inline detail::tvec3<genIUType> extractField
}
template <typename genIUType, typename sizeType>
inline detail::tvec4<genIUType> extractField
GLM_FUNC_QUALIFIER detail::tvec4<genIUType> extractField
(
genIUType const & value,
detail::tvec4<sizeType> const & first,
@ -241,7 +241,7 @@ inline detail::tvec4<genIUType> extractField
// lowestBit
template <typename genType>
inline int lowestBit
GLM_FUNC_QUALIFIER int lowestBit
(
genType const & Value
)
@ -254,7 +254,7 @@ inline int lowestBit
}
template <typename valType>
inline detail::tvec2<int> lowestBit
GLM_FUNC_QUALIFIER detail::tvec2<int> lowestBit
(
detail::tvec2<valType> const & value
)
@ -265,7 +265,7 @@ inline detail::tvec2<int> lowestBit
}
template <typename valType>
inline detail::tvec3<int> lowestBit
GLM_FUNC_QUALIFIER detail::tvec3<int> lowestBit
(
detail::tvec3<valType> const & value
)
@ -277,7 +277,7 @@ inline detail::tvec3<int> lowestBit
}
template <typename valType>
inline detail::tvec4<int> lowestBit
GLM_FUNC_QUALIFIER detail::tvec4<int> lowestBit
(
detail::tvec4<valType> const & value
)
@ -291,7 +291,7 @@ inline detail::tvec4<int> lowestBit
// highestBit
template <typename genType>
inline int highestBit
GLM_FUNC_QUALIFIER int highestBit
(
genType const & value
)
@ -304,7 +304,7 @@ inline int highestBit
}
//template <>
//inline int highestBit<int>
//GLM_FUNC_QUALIFIER int highestBit<int>
//(
// int value
//)
@ -315,7 +315,7 @@ inline int highestBit
//}
template <typename valType>
inline detail::tvec2<int> highestBit
GLM_FUNC_QUALIFIER detail::tvec2<int> highestBit
(
detail::tvec2<valType> const & value
)
@ -326,7 +326,7 @@ inline detail::tvec2<int> highestBit
}
template <typename valType>
inline detail::tvec3<int> highestBit
GLM_FUNC_QUALIFIER detail::tvec3<int> highestBit
(
detail::tvec3<valType> const & value
)
@ -338,7 +338,7 @@ inline detail::tvec3<int> highestBit
}
template <typename valType>
inline detail::tvec4<int> highestBit
GLM_FUNC_QUALIFIER detail::tvec4<int> highestBit
(
detail::tvec4<valType> const & value
)
@ -352,7 +352,7 @@ inline detail::tvec4<int> highestBit
// highestBitValue
template <typename genType>
inline genType highestBitValue
GLM_FUNC_QUALIFIER genType highestBitValue
(
genType const & value
)
@ -368,7 +368,7 @@ inline genType highestBitValue
}
template <typename valType>
inline detail::tvec2<int> highestBitValue
GLM_FUNC_QUALIFIER detail::tvec2<int> highestBitValue
(
detail::tvec2<valType> const & value
)
@ -379,7 +379,7 @@ inline detail::tvec2<int> highestBitValue
}
template <typename valType>
inline detail::tvec3<int> highestBitValue
GLM_FUNC_QUALIFIER detail::tvec3<int> highestBitValue
(
detail::tvec3<valType> const & value
)
@ -391,7 +391,7 @@ inline detail::tvec3<int> highestBitValue
}
template <typename valType>
inline detail::tvec4<int> highestBitValue
GLM_FUNC_QUALIFIER detail::tvec4<int> highestBitValue
(
detail::tvec4<valType> const & value
)
@ -405,7 +405,7 @@ inline detail::tvec4<int> highestBitValue
// isPowerOfTwo
template <typename genType>
inline bool isPowerOfTwo(genType const & Value)
GLM_FUNC_QUALIFIER bool isPowerOfTwo(genType const & Value)
{
//detail::If<std::numeric_limits<genType>::is_signed>::apply(abs, Value);
//return !(Value & (Value - 1));
@ -418,7 +418,7 @@ inline bool isPowerOfTwo(genType const & Value)
}
template <typename valType>
inline detail::tvec2<bool> isPowerOfTwo
GLM_FUNC_QUALIFIER detail::tvec2<bool> isPowerOfTwo
(
detail::tvec2<valType> const & value
)
@ -429,7 +429,7 @@ inline detail::tvec2<bool> isPowerOfTwo
}
template <typename valType>
inline detail::tvec3<bool> isPowerOfTwo
GLM_FUNC_QUALIFIER detail::tvec3<bool> isPowerOfTwo
(
detail::tvec3<valType> const & value
)
@ -441,7 +441,7 @@ inline detail::tvec3<bool> isPowerOfTwo
}
template <typename valType>
inline detail::tvec4<bool> isPowerOfTwo
GLM_FUNC_QUALIFIER detail::tvec4<bool> isPowerOfTwo
(
detail::tvec4<valType> const & value
)
@ -455,13 +455,13 @@ inline detail::tvec4<bool> isPowerOfTwo
// powerOfTwoAbove
template <typename genType>
inline genType powerOfTwoAbove(genType const & value)
GLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType const & value)
{
return isPowerOfTwo(value) ? value : highestBitValue(value) << 1;
}
template <typename valType>
inline detail::tvec2<valType> powerOfTwoAbove
GLM_FUNC_QUALIFIER detail::tvec2<valType> powerOfTwoAbove
(
detail::tvec2<valType> const & value
)
@ -472,7 +472,7 @@ inline detail::tvec2<valType> powerOfTwoAbove
}
template <typename valType>
inline detail::tvec3<valType> powerOfTwoAbove
GLM_FUNC_QUALIFIER detail::tvec3<valType> powerOfTwoAbove
(
detail::tvec3<valType> const & value
)
@ -484,7 +484,7 @@ inline detail::tvec3<valType> powerOfTwoAbove
}
template <typename valType>
inline detail::tvec4<valType> powerOfTwoAbove
GLM_FUNC_QUALIFIER detail::tvec4<valType> powerOfTwoAbove
(
detail::tvec4<valType> const & value
)
@ -498,7 +498,7 @@ inline detail::tvec4<valType> powerOfTwoAbove
// powerOfTwoBelow
template <typename genType>
inline genType powerOfTwoBelow
GLM_FUNC_QUALIFIER genType powerOfTwoBelow
(
genType const & value
)
@ -507,7 +507,7 @@ inline genType powerOfTwoBelow
}
template <typename valType>
inline detail::tvec2<valType> powerOfTwoBelow
GLM_FUNC_QUALIFIER detail::tvec2<valType> powerOfTwoBelow
(
detail::tvec2<valType> const & value
)
@ -518,7 +518,7 @@ inline detail::tvec2<valType> powerOfTwoBelow
}
template <typename valType>
inline detail::tvec3<valType> powerOfTwoBelow
GLM_FUNC_QUALIFIER detail::tvec3<valType> powerOfTwoBelow
(
detail::tvec3<valType> const & value
)
@ -530,7 +530,7 @@ inline detail::tvec3<valType> powerOfTwoBelow
}
template <typename valType>
inline detail::tvec4<valType> powerOfTwoBelow
GLM_FUNC_QUALIFIER detail::tvec4<valType> powerOfTwoBelow
(
detail::tvec4<valType> const & value
)
@ -544,7 +544,7 @@ inline detail::tvec4<valType> powerOfTwoBelow
// powerOfTwoNearest
template <typename genType>
inline genType powerOfTwoNearest
GLM_FUNC_QUALIFIER genType powerOfTwoNearest
(
genType const & value
)
@ -558,7 +558,7 @@ inline genType powerOfTwoNearest
}
template <typename valType>
inline detail::tvec2<valType> powerOfTwoNearest
GLM_FUNC_QUALIFIER detail::tvec2<valType> powerOfTwoNearest
(
detail::tvec2<valType> const & value
)
@ -569,7 +569,7 @@ inline detail::tvec2<valType> powerOfTwoNearest
}
template <typename valType>
inline detail::tvec3<valType> powerOfTwoNearest
GLM_FUNC_QUALIFIER detail::tvec3<valType> powerOfTwoNearest
(
detail::tvec3<valType> const & value
)
@ -581,7 +581,7 @@ inline detail::tvec3<valType> powerOfTwoNearest
}
template <typename valType>
inline detail::tvec4<valType> powerOfTwoNearest
GLM_FUNC_QUALIFIER detail::tvec4<valType> powerOfTwoNearest
(
detail::tvec4<valType> const & value
)
@ -594,7 +594,7 @@ inline detail::tvec4<valType> powerOfTwoNearest
}
template <typename genType>
inline genType bitRevert(genType const & In)
GLM_FUNC_QUALIFIER genType bitRevert(genType const & In)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, "'bitRevert' only accept integer values");
@ -607,7 +607,7 @@ inline genType bitRevert(genType const & In)
}
template <typename valType>
inline detail::tvec2<valType> bitRevert
GLM_FUNC_QUALIFIER detail::tvec2<valType> bitRevert
(
detail::tvec2<valType> const & Value
)
@ -618,7 +618,7 @@ inline detail::tvec2<valType> bitRevert
}
template <typename valType>
inline detail::tvec3<valType> bitRevert
GLM_FUNC_QUALIFIER detail::tvec3<valType> bitRevert
(
detail::tvec3<valType> const & Value
)
@ -630,7 +630,7 @@ inline detail::tvec3<valType> bitRevert
}
template <typename valType>
inline detail::tvec4<valType> bitRevert
GLM_FUNC_QUALIFIER detail::tvec4<valType> bitRevert
(
detail::tvec4<valType> const & Value
)
@ -643,7 +643,7 @@ inline detail::tvec4<valType> bitRevert
}
template <typename genType>
inline genType bitRotateRight(genType const & In, std::size_t Shift)
GLM_FUNC_QUALIFIER genType bitRotateRight(genType const & In, std::size_t Shift)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, "'bitRotateRight' only accept integer values");
@ -652,7 +652,7 @@ inline genType bitRotateRight(genType const & In, std::size_t Shift)
}
template <typename valType>
inline detail::tvec2<valType> bitRotateRight
GLM_FUNC_QUALIFIER detail::tvec2<valType> bitRotateRight
(
detail::tvec2<valType> const & Value,
std::size_t Shift
@ -664,7 +664,7 @@ inline detail::tvec2<valType> bitRotateRight
}
template <typename valType>
inline detail::tvec3<valType> bitRotateRight
GLM_FUNC_QUALIFIER detail::tvec3<valType> bitRotateRight
(
detail::tvec3<valType> const & Value,
std::size_t Shift
@ -677,7 +677,7 @@ inline detail::tvec3<valType> bitRotateRight
}
template <typename valType>
inline detail::tvec4<valType> bitRotateRight
GLM_FUNC_QUALIFIER detail::tvec4<valType> bitRotateRight
(
detail::tvec4<valType> const & Value,
std::size_t Shift
@ -691,7 +691,7 @@ inline detail::tvec4<valType> bitRotateRight
}
template <typename genType>
inline genType bitRotateLeft(genType const & In, std::size_t Shift)
GLM_FUNC_QUALIFIER genType bitRotateLeft(genType const & In, std::size_t Shift)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, "'bitRotateLeft' only accept integer values");
@ -700,7 +700,7 @@ inline genType bitRotateLeft(genType const & In, std::size_t Shift)
}
template <typename valType>
inline detail::tvec2<valType> bitRotateLeft
GLM_FUNC_QUALIFIER detail::tvec2<valType> bitRotateLeft
(
detail::tvec2<valType> const & Value,
std::size_t Shift
@ -712,7 +712,7 @@ inline detail::tvec2<valType> bitRotateLeft
}
template <typename valType>
inline detail::tvec3<valType> bitRotateLeft
GLM_FUNC_QUALIFIER detail::tvec3<valType> bitRotateLeft
(
detail::tvec3<valType> const & Value,
std::size_t Shift
@ -725,7 +725,7 @@ inline detail::tvec3<valType> bitRotateLeft
}
template <typename valType>
inline detail::tvec4<valType> bitRotateLeft
GLM_FUNC_QUALIFIER detail::tvec4<valType> bitRotateLeft
(
detail::tvec4<valType> const & Value,
std::size_t Shift

View File

@ -15,7 +15,7 @@ namespace gtx{
namespace closest_point{
template <typename valType>
inline detail::tvec3<valType> closestPointOnLine
GLM_FUNC_QUALIFIER detail::tvec3<valType> closestPointOnLine
(
detail::tvec3<valType> const & point,
detail::tvec3<valType> const & a,

View File

@ -13,19 +13,19 @@ namespace gtx{
namespace color_cast{
template <typename T>
inline gtc::type_precision::uint8 u8channel_cast(T a)
GLM_FUNC_QUALIFIER gtc::type_precision::uint8 u8channel_cast(T a)
{
return static_cast<gtc::type_precision::uint8>(a * T(255));
}
template <typename T>
inline gtc::type_precision::uint16 u16channel_cast(T a)
GLM_FUNC_QUALIFIER gtc::type_precision::uint16 u16channel_cast(T a)
{
return static_cast<gtc::type_precision::uint16>(a * T(65535));
}
template <typename T>
inline gtc::type_precision::uint32 u32_rgbx_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint32 u32_rgbx_cast(const detail::tvec3<T>& c)
{
gtc::type_precision::uint32 result = 0;
result += static_cast<gtc::type_precision::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 0;
@ -35,7 +35,7 @@ inline gtc::type_precision::uint32 u32_rgbx_cast(const detail::tvec3<T>& c)
}
template <typename T>
inline gtc::type_precision::uint32 u32_xrgb_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint32 u32_xrgb_cast(const detail::tvec3<T>& c)
{
gtc::type_precision::uint32 result = 0;
result += static_cast<gtc::type_precision::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 8;
@ -45,7 +45,7 @@ inline gtc::type_precision::uint32 u32_xrgb_cast(const detail::tvec3<T>& c)
}
template <typename T>
inline gtc::type_precision::uint32 u32_bgrx_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint32 u32_bgrx_cast(const detail::tvec3<T>& c)
{
gtc::type_precision::uint32 result = 0;
result += static_cast<gtc::type_precision::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 16;
@ -55,7 +55,7 @@ inline gtc::type_precision::uint32 u32_bgrx_cast(const detail::tvec3<T>& c)
}
template <typename T>
inline gtc::type_precision::uint32 u32_xbgr_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint32 u32_xbgr_cast(const detail::tvec3<T>& c)
{
gtc::type_precision::uint32 result = 0;
result += static_cast<gtc::type_precision::uint32>(c.x * detail::tvec3<T>::value_type(255)) << 24;
@ -66,7 +66,7 @@ inline gtc::type_precision::uint32 u32_xbgr_cast(const detail::tvec3<T>& c)
}
template <typename T>
inline gtc::type_precision::uint32 u32_rgba_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint32 u32_rgba_cast(const detail::tvec4<T>& c)
{
gtc::type_precision::uint32 result = 0;
result += static_cast<gtc::type_precision::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 0;
@ -77,7 +77,7 @@ inline gtc::type_precision::uint32 u32_rgba_cast(const detail::tvec4<T>& c)
}
template <typename T>
inline gtc::type_precision::uint32 u32_argb_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint32 u32_argb_cast(const detail::tvec4<T>& c)
{
gtc::type_precision::uint32 result = 0;
result += static_cast<gtc::type_precision::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 8;
@ -88,7 +88,7 @@ inline gtc::type_precision::uint32 u32_argb_cast(const detail::tvec4<T>& c)
}
template <typename T>
inline gtc::type_precision::uint32 u32_bgra_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint32 u32_bgra_cast(const detail::tvec4<T>& c)
{
gtc::type_precision::uint32 result = 0;
result += static_cast<gtc::type_precision::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 16;
@ -99,7 +99,7 @@ inline gtc::type_precision::uint32 u32_bgra_cast(const detail::tvec4<T>& c)
}
template <typename T>
inline gtc::type_precision::uint32 u32_abgr_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint32 u32_abgr_cast(const detail::tvec4<T>& c)
{
gtc::type_precision::uint32 result = 0;
result += static_cast<gtc::type_precision::uint32>(c.x * detail::tvec4<T>::value_type(255)) << 24;
@ -110,7 +110,7 @@ inline gtc::type_precision::uint32 u32_abgr_cast(const detail::tvec4<T>& c)
}
template <typename T>
inline gtc::type_precision::uint64 u64_rgbx_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint64 u64_rgbx_cast(const detail::tvec3<T>& c)
{
gtc::type_precision::uint64 result = 0;
result += static_cast<gtc::type_precision::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 0;
@ -120,7 +120,7 @@ inline gtc::type_precision::uint64 u64_rgbx_cast(const detail::tvec3<T>& c)
}
template <typename T>
inline gtc::type_precision::uint64 u32_xrgb_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint64 u32_xrgb_cast(const detail::tvec3<T>& c)
{
gtc::type_precision::uint64 result = 0;
result += static_cast<gtc::type_precision::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 16;
@ -130,7 +130,7 @@ inline gtc::type_precision::uint64 u32_xrgb_cast(const detail::tvec3<T>& c)
}
template <typename T>
inline gtc::type_precision::uint64 u32_bgrx_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint64 u32_bgrx_cast(const detail::tvec3<T>& c)
{
gtc::type_precision::uint64 result = 0;
result += static_cast<gtc::type_precision::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 32;
@ -140,7 +140,7 @@ inline gtc::type_precision::uint64 u32_bgrx_cast(const detail::tvec3<T>& c)
}
template <typename T>
inline gtc::type_precision::uint64 u32_xbgr_cast(const detail::tvec3<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint64 u32_xbgr_cast(const detail::tvec3<T>& c)
{
gtc::type_precision::uint64 result = 0;
result += static_cast<gtc::type_precision::uint64>(c.x * detail::tvec3<T>::value_type(65535)) << 48;
@ -151,7 +151,7 @@ inline gtc::type_precision::uint64 u32_xbgr_cast(const detail::tvec3<T>& c)
}
template <typename T>
inline gtc::type_precision::uint64 u64_rgba_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint64 u64_rgba_cast(const detail::tvec4<T>& c)
{
gtc::type_precision::uint64 result = 0;
result += static_cast<gtc::type_precision::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 0;
@ -162,7 +162,7 @@ inline gtc::type_precision::uint64 u64_rgba_cast(const detail::tvec4<T>& c)
}
template <typename T>
inline gtc::type_precision::uint64 u64_argb_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint64 u64_argb_cast(const detail::tvec4<T>& c)
{
gtc::type_precision::uint64 result = 0;
result += static_cast<gtc::type_precision::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 16;
@ -173,7 +173,7 @@ inline gtc::type_precision::uint64 u64_argb_cast(const detail::tvec4<T>& c)
}
template <typename T>
inline gtc::type_precision::uint64 u64_bgra_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint64 u64_bgra_cast(const detail::tvec4<T>& c)
{
gtc::type_precision::uint64 result = 0;
result += static_cast<gtc::type_precision::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 32;
@ -184,7 +184,7 @@ inline gtc::type_precision::uint64 u64_bgra_cast(const detail::tvec4<T>& c)
}
template <typename T>
inline gtc::type_precision::uint64 u64_abgr_cast(const detail::tvec4<T>& c)
GLM_FUNC_QUALIFIER gtc::type_precision::uint64 u64_abgr_cast(const detail::tvec4<T>& c)
{
gtc::type_precision::uint64 result = 0;
result += static_cast<gtc::type_precision::uint64>(c.x * detail::tvec4<T>::value_type(65535)) << 48;
@ -195,13 +195,13 @@ inline gtc::type_precision::uint64 u64_abgr_cast(const detail::tvec4<T>& c)
}
template <>
inline f16vec1 f16_channel_cast<gtc::type_precision::uint32>(gtc::type_precision::uint32 color)
GLM_FUNC_QUALIFIER f16vec1 f16_channel_cast<gtc::type_precision::uint32>(gtc::type_precision::uint32 color)
{
return gtc::type_precision::f16(static_cast<float>(color >> 0) / static_cast<float>(255));
}
template <>
inline gtc::type_precision::f16vec3 f16_rgbx_cast<gtc::type_precision::uint32>(gtc::type_precision::uint32 color)
GLM_FUNC_QUALIFIER gtc::type_precision::f16vec3 f16_rgbx_cast<gtc::type_precision::uint32>(gtc::type_precision::uint32 color)
{
gtc::type_precision::f16vec3 result;
result.x = gtc::type_precision::f16(static_cast<float>(color >> 0) / static_cast<float>(255));
@ -211,7 +211,7 @@ inline gtc::type_precision::f16vec3 f16_rgbx_cast<gtc::type_precision::uint32>(g
}
template <>
inline gtc::type_precision::f16vec3 f16_xrgb_cast<gtc::type_precision::uint32>(gtc::type_precision::uint32 color)
GLM_FUNC_QUALIFIER gtc::type_precision::f16vec3 f16_xrgb_cast<gtc::type_precision::uint32>(gtc::type_precision::uint32 color)
{
gtc::type_precision::f16vec3 result;
result.x = gtc::type_precision::f16(static_cast<float>(color >> 8) / static_cast<float>(255));
@ -221,7 +221,7 @@ inline gtc::type_precision::f16vec3 f16_xrgb_cast<gtc::type_precision::uint32>(g
}
template <>
inline f16vec3 f16_bgrx_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER f16vec3 f16_bgrx_cast<uint32>(uint32 color)
{
f16vec3 result;
result.x = f16(static_cast<float>(color >> 16) / static_cast<float>(255));
@ -231,7 +231,7 @@ inline f16vec3 f16_bgrx_cast<uint32>(uint32 color)
}
template <>
inline f16vec3 f16_xbgr_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER f16vec3 f16_xbgr_cast<uint32>(uint32 color)
{
f16vec3 result;
result.x = f16(static_cast<float>(color >> 24) / static_cast<float>(255));
@ -241,7 +241,7 @@ inline f16vec3 f16_xbgr_cast<uint32>(uint32 color)
}
template <>
inline f16vec4 f16_rgba_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER f16vec4 f16_rgba_cast<uint32>(uint32 color)
{
f16vec4 result;
result.x = f16(static_cast<float>(color >> 0) / static_cast<float>(255));
@ -252,7 +252,7 @@ inline f16vec4 f16_rgba_cast<uint32>(uint32 color)
}
template <>
inline f16vec4 f16_argb_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER f16vec4 f16_argb_cast<uint32>(uint32 color)
{
f16vec4 result;
result.x = f16(static_cast<float>(color >> 8) / static_cast<float>(255));
@ -263,7 +263,7 @@ inline f16vec4 f16_argb_cast<uint32>(uint32 color)
}
template <>
inline f16vec4 f16_bgra_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER f16vec4 f16_bgra_cast<uint32>(uint32 color)
{
f16vec4 result;
result.x = f16(static_cast<float>(color >> 16) / static_cast<float>(255));
@ -274,7 +274,7 @@ inline f16vec4 f16_bgra_cast<uint32>(uint32 color)
}
template <>
inline f16vec4 f16_abgr_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER f16vec4 f16_abgr_cast<uint32>(uint32 color)
{
f16vec4 result;
result.x = f16(static_cast<float>(color >> 24) / static_cast<float>(255));
@ -285,13 +285,13 @@ inline f16vec4 f16_abgr_cast<uint32>(uint32 color)
}
template <>
inline float f32_channel_cast<uint8>(uint8 color)
GLM_FUNC_QUALIFIER float f32_channel_cast<uint8>(uint8 color)
{
return static_cast<float>(color >> 0) / static_cast<float>(255);
}
template <>
inline detail::tvec3<float> f32_rgbx_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec3<float> f32_rgbx_cast<uint32>(uint32 color)
{
detail::tvec3<float> result;
result.x = static_cast<float>(color >> 0) / static_cast<float>(255);
@ -301,7 +301,7 @@ inline detail::tvec3<float> f32_rgbx_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec3<float> f32_xrgb_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec3<float> f32_xrgb_cast<uint32>(uint32 color)
{
detail::tvec3<float> result;
result.x = static_cast<float>(color >> 8) / static_cast<float>(255);
@ -311,7 +311,7 @@ inline detail::tvec3<float> f32_xrgb_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec3<float> f32_bgrx_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec3<float> f32_bgrx_cast<uint32>(uint32 color)
{
detail::tvec3<float> result;
result.x = static_cast<float>(color >> 16) / static_cast<float>(255);
@ -321,7 +321,7 @@ inline detail::tvec3<float> f32_bgrx_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec3<float> f32_xbgr_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec3<float> f32_xbgr_cast<uint32>(uint32 color)
{
detail::tvec3<float> result;
result.x = static_cast<float>(color >> 24) / static_cast<float>(255);
@ -331,7 +331,7 @@ inline detail::tvec3<float> f32_xbgr_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec4<float> f32_rgba_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec4<float> f32_rgba_cast<uint32>(uint32 color)
{
detail::tvec4<float> result;
result.x = static_cast<float>(color >> 0) / static_cast<float>(255);
@ -342,7 +342,7 @@ inline detail::tvec4<float> f32_rgba_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec4<float> f32_argb_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec4<float> f32_argb_cast<uint32>(uint32 color)
{
detail::tvec4<float> result;
result.x = static_cast<float>(color >> 8) / static_cast<float>(255);
@ -353,7 +353,7 @@ inline detail::tvec4<float> f32_argb_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec4<float> f32_bgra_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec4<float> f32_bgra_cast<uint32>(uint32 color)
{
detail::tvec4<float> result;
result.x = static_cast<float>(color >> 16) / static_cast<float>(255);
@ -364,7 +364,7 @@ inline detail::tvec4<float> f32_bgra_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec4<float> f32_abgr_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec4<float> f32_abgr_cast<uint32>(uint32 color)
{
detail::tvec4<float> result;
result.x = static_cast<float>(color >> 24) / static_cast<float>(255);
@ -375,13 +375,13 @@ inline detail::tvec4<float> f32_abgr_cast<uint32>(uint32 color)
}
template <>
inline double f64_channel_cast<uint8>(uint8 color)
GLM_FUNC_QUALIFIER double f64_channel_cast<uint8>(uint8 color)
{
return static_cast<double>(color >> 0) / static_cast<double>(255);
}
template <>
inline detail::tvec3<double> f64_rgbx_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec3<double> f64_rgbx_cast<uint32>(uint32 color)
{
detail::tvec3<double> result;
result.x = static_cast<double>(color >> 0) / static_cast<double>(255);
@ -391,7 +391,7 @@ inline detail::tvec3<double> f64_rgbx_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec3<double> f64_xrgb_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec3<double> f64_xrgb_cast<uint32>(uint32 color)
{
detail::tvec3<double> result;
result.x = static_cast<double>(color >> 8) / static_cast<double>(255);
@ -401,7 +401,7 @@ inline detail::tvec3<double> f64_xrgb_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec3<double> f64_bgrx_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec3<double> f64_bgrx_cast<uint32>(uint32 color)
{
detail::tvec3<double> result;
result.x = static_cast<double>(color >> 16) / static_cast<double>(255);
@ -411,7 +411,7 @@ inline detail::tvec3<double> f64_bgrx_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec3<double> f64_xbgr_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec3<double> f64_xbgr_cast<uint32>(uint32 color)
{
detail::tvec3<double> result;
result.x = static_cast<double>(color >> 24) / static_cast<double>(255);
@ -421,7 +421,7 @@ inline detail::tvec3<double> f64_xbgr_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec4<double> f64_rgba_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec4<double> f64_rgba_cast<uint32>(uint32 color)
{
detail::tvec4<double> result;
result.x = static_cast<double>(color >> 0) / static_cast<double>(255);
@ -432,7 +432,7 @@ inline detail::tvec4<double> f64_rgba_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec4<double> f64_argb_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec4<double> f64_argb_cast<uint32>(uint32 color)
{
detail::tvec4<double> result;
result.x = static_cast<double>(color >> 8) / static_cast<double>(255);
@ -443,7 +443,7 @@ inline detail::tvec4<double> f64_argb_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec4<double> f64_bgra_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec4<double> f64_bgra_cast<uint32>(uint32 color)
{
detail::tvec4<double> result;
result.x = static_cast<double>(color >> 16) / static_cast<double>(255);
@ -454,7 +454,7 @@ inline detail::tvec4<double> f64_bgra_cast<uint32>(uint32 color)
}
template <>
inline detail::tvec4<double> f64_abgr_cast<uint32>(uint32 color)
GLM_FUNC_QUALIFIER detail::tvec4<double> f64_abgr_cast<uint32>(uint32 color)
{
detail::tvec4<double> result;
result.x = static_cast<double>(color >> 24) / static_cast<double>(255);
@ -465,13 +465,13 @@ inline detail::tvec4<double> f64_abgr_cast<uint32>(uint32 color)
}
template <>
inline detail::thalf f16_channel_cast<uint16>(uint16 color)
GLM_FUNC_QUALIFIER detail::thalf f16_channel_cast<uint16>(uint16 color)
{
return detail::thalf(static_cast<float>(color >> 0) / static_cast<float>(65535));
}
template <>
inline detail::tvec3<detail::thalf> f16_rgbx_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_rgbx_cast<uint64>(uint64 color)
{
detail::tvec3<detail::thalf> result;
result.x = detail::thalf(static_cast<float>(color >> 0) / static_cast<float>(65535));
@ -481,7 +481,7 @@ inline detail::tvec3<detail::thalf> f16_rgbx_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec3<detail::thalf> f16_xrgb_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_xrgb_cast<uint64>(uint64 color)
{
detail::tvec3<detail::thalf> result;
result.x = detail::thalf(static_cast<float>(color >> 16) / static_cast<float>(65535));
@ -491,7 +491,7 @@ inline detail::tvec3<detail::thalf> f16_xrgb_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec3<detail::thalf> f16_bgrx_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_bgrx_cast<uint64>(uint64 color)
{
detail::tvec3<detail::thalf> result;
result.x = detail::thalf(static_cast<float>(color >> 32) / static_cast<float>(65535));
@ -501,7 +501,7 @@ inline detail::tvec3<detail::thalf> f16_bgrx_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec3<detail::thalf> f16_xbgr_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<detail::thalf> f16_xbgr_cast<uint64>(uint64 color)
{
detail::tvec3<detail::thalf> result;
result.x = detail::thalf(static_cast<float>(color >> 48) / static_cast<float>(65535));
@ -511,7 +511,7 @@ inline detail::tvec3<detail::thalf> f16_xbgr_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<detail::thalf> f16_rgba_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_rgba_cast<uint64>(uint64 color)
{
detail::tvec4<detail::thalf> result;
result.x = detail::thalf(static_cast<float>(color >> 0) / static_cast<float>(65535));
@ -522,7 +522,7 @@ inline detail::tvec4<detail::thalf> f16_rgba_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<detail::thalf> f16_argb_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_argb_cast<uint64>(uint64 color)
{
detail::tvec4<detail::thalf> result;
result.x = detail::thalf(static_cast<float>(color >> 16) / static_cast<float>(65535));
@ -533,7 +533,7 @@ inline detail::tvec4<detail::thalf> f16_argb_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<detail::thalf> f16_bgra_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_bgra_cast<uint64>(uint64 color)
{
detail::tvec4<detail::thalf> result;
result.x = detail::thalf(static_cast<float>(color >> 32) / static_cast<float>(65535));
@ -544,7 +544,7 @@ inline detail::tvec4<detail::thalf> f16_bgra_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<detail::thalf> f16_abgr_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<detail::thalf> f16_abgr_cast<uint64>(uint64 color)
{
detail::tvec4<detail::thalf> result;
result.x = detail::thalf(static_cast<float>(color >> 48) / static_cast<float>(65535));
@ -555,13 +555,13 @@ inline detail::tvec4<detail::thalf> f16_abgr_cast<uint64>(uint64 color)
}
template <>
inline float f32_channel_cast<uint16>(uint16 color)
GLM_FUNC_QUALIFIER float f32_channel_cast<uint16>(uint16 color)
{
return static_cast<float>(color >> 0) / static_cast<float>(65535);
}
template <>
inline detail::tvec3<float> f32_rgbx_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<float> f32_rgbx_cast<uint64>(uint64 color)
{
detail::tvec3<float> result;
result.x = static_cast<float>(color >> 0) / static_cast<float>(65535);
@ -571,7 +571,7 @@ inline detail::tvec3<float> f32_rgbx_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec3<float> f32_xrgb_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<float> f32_xrgb_cast<uint64>(uint64 color)
{
detail::tvec3<float> result;
result.x = static_cast<float>(color >> 16) / static_cast<float>(65535);
@ -581,7 +581,7 @@ inline detail::tvec3<float> f32_xrgb_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec3<float> f32_bgrx_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<float> f32_bgrx_cast<uint64>(uint64 color)
{
detail::tvec3<float> result;
result.x = static_cast<float>(color >> 32) / static_cast<float>(65535);
@ -591,7 +591,7 @@ inline detail::tvec3<float> f32_bgrx_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec3<float> f32_xbgr_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<float> f32_xbgr_cast<uint64>(uint64 color)
{
detail::tvec3<float> result;
result.x = static_cast<float>(color >> 48) / static_cast<float>(65535);
@ -601,7 +601,7 @@ inline detail::tvec3<float> f32_xbgr_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<float> f32_rgba_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<float> f32_rgba_cast<uint64>(uint64 color)
{
detail::tvec4<float> result;
result.x = static_cast<float>(color >> 0) / static_cast<float>(65535);
@ -612,7 +612,7 @@ inline detail::tvec4<float> f32_rgba_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<float> f32_argb_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<float> f32_argb_cast<uint64>(uint64 color)
{
detail::tvec4<float> result;
result.x = static_cast<float>(color >> 16) / static_cast<float>(65535);
@ -623,7 +623,7 @@ inline detail::tvec4<float> f32_argb_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<float> f32_bgra_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<float> f32_bgra_cast<uint64>(uint64 color)
{
detail::tvec4<float> result;
result.x = static_cast<float>(color >> 32) / static_cast<float>(65535);
@ -634,7 +634,7 @@ inline detail::tvec4<float> f32_bgra_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<float> f32_abgr_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<float> f32_abgr_cast<uint64>(uint64 color)
{
detail::tvec4<float> result;
result.x = static_cast<float>(color >> 48) / static_cast<float>(65535);
@ -645,13 +645,13 @@ inline detail::tvec4<float> f32_abgr_cast<uint64>(uint64 color)
}
template <>
inline double f64_channel_cast<uint16>(uint16 color)
GLM_FUNC_QUALIFIER double f64_channel_cast<uint16>(uint16 color)
{
return static_cast<double>(color >> 0) / static_cast<double>(65535);
}
template <>
inline detail::tvec3<double> f64_rgbx_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<double> f64_rgbx_cast<uint64>(uint64 color)
{
detail::tvec3<double> result;
result.x = static_cast<double>(color >> 0) / static_cast<double>(65535);
@ -661,7 +661,7 @@ inline detail::tvec3<double> f64_rgbx_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec3<double> f64_xrgb_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<double> f64_xrgb_cast<uint64>(uint64 color)
{
detail::tvec3<double> result;
result.x = static_cast<double>(color >> 16) / static_cast<double>(65535);
@ -671,7 +671,7 @@ inline detail::tvec3<double> f64_xrgb_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec3<double> f64_bgrx_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<double> f64_bgrx_cast<uint64>(uint64 color)
{
detail::tvec3<double> result;
result.x = static_cast<double>(color >> 32) / static_cast<double>(65535);
@ -681,7 +681,7 @@ inline detail::tvec3<double> f64_bgrx_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec3<double> f64_xbgr_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec3<double> f64_xbgr_cast<uint64>(uint64 color)
{
detail::tvec3<double> result;
result.x = static_cast<double>(color >> 48) / static_cast<double>(65535);
@ -691,7 +691,7 @@ inline detail::tvec3<double> f64_xbgr_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<double> f64_rgba_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<double> f64_rgba_cast<uint64>(uint64 color)
{
detail::tvec4<double> result;
result.x = static_cast<double>(color >> 0) / static_cast<double>(65535);
@ -702,7 +702,7 @@ inline detail::tvec4<double> f64_rgba_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<double> f64_argb_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<double> f64_argb_cast<uint64>(uint64 color)
{
detail::tvec4<double> result;
result.x = static_cast<double>(color >> 16) / static_cast<double>(65535);
@ -713,7 +713,7 @@ inline detail::tvec4<double> f64_argb_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<double> f64_bgra_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<double> f64_bgra_cast<uint64>(uint64 color)
{
detail::tvec4<double> result;
result.x = static_cast<double>(color >> 32) / static_cast<double>(65535);
@ -724,7 +724,7 @@ inline detail::tvec4<double> f64_bgra_cast<uint64>(uint64 color)
}
template <>
inline detail::tvec4<double> f64_abgr_cast<uint64>(uint64 color)
GLM_FUNC_QUALIFIER detail::tvec4<double> f64_abgr_cast<uint64>(uint64 color)
{
detail::tvec4<double> result;
result.x = static_cast<double>(color >> 48) / static_cast<double>(65535);

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace color_space
{
template <typename T>
inline detail::tvec3<T> rgbColor(const detail::tvec3<T>& hsvColor)
GLM_FUNC_QUALIFIER detail::tvec3<T> rgbColor(const detail::tvec3<T>& hsvColor)
{
detail::tvec3<T> hsv = hsvColor;
detail::tvec3<T> rgbColor;
@ -69,7 +69,7 @@ namespace color_space
}
template <typename T>
inline detail::tvec3<T> hsvColor(const detail::tvec3<T>& rgbColor)
GLM_FUNC_QUALIFIER detail::tvec3<T> hsvColor(const detail::tvec3<T>& rgbColor)
{
detail::tvec3<T> hsv = rgbColor;
float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b);
@ -109,7 +109,7 @@ namespace color_space
}
template <typename T>
inline detail::tmat4x4<T> saturation(const T s)
GLM_FUNC_QUALIFIER detail::tmat4x4<T> saturation(const T s)
{
detail::tvec3<T> rgbw = detail::tvec3<T>(T(0.2126), T(0.7152), T(0.0722));
@ -131,19 +131,19 @@ namespace color_space
}
template <typename T>
inline detail::tvec3<T> saturation(const T s, const detail::tvec3<T>& color)
GLM_FUNC_QUALIFIER detail::tvec3<T> saturation(const T s, const detail::tvec3<T>& color)
{
return detail::tvec3<T>(saturation(s) * detail::tvec4<T>(color, T(0)));
}
template <typename T>
inline detail::tvec4<T> saturation(const T s, const detail::tvec4<T>& color)
GLM_FUNC_QUALIFIER detail::tvec4<T> saturation(const T s, const detail::tvec4<T>& color)
{
return saturation(s) * color;
}
template <typename T>
inline T luminosity(const detail::tvec3<T>& color)
GLM_FUNC_QUALIFIER T luminosity(const detail::tvec3<T>& color)
{
const detail::tvec3<T> tmp = detail::tvec3<T>(0.33, 0.59, 0.11);
return dot(color, tmp);

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace color_space_YCoCg{
template <typename valType>
inline detail::tvec3<valType> rgb2YCoCg
GLM_FUNC_QUALIFIER detail::tvec3<valType> rgb2YCoCg
(
detail::tvec3<valType> const & rgbColor
)
@ -25,7 +25,7 @@ inline detail::tvec3<valType> rgb2YCoCg
}
template <typename valType>
inline detail::tvec3<valType> rgb2YCoCgR
GLM_FUNC_QUALIFIER detail::tvec3<valType> rgb2YCoCgR
(
detail::tvec3<valType> const & rgbColor
)
@ -38,7 +38,7 @@ inline detail::tvec3<valType> rgb2YCoCgR
}
template <typename valType>
inline detail::tvec3<valType> YCoCg2rgb
GLM_FUNC_QUALIFIER detail::tvec3<valType> YCoCg2rgb
(
detail::tvec3<valType> const & YCoCgColor
)
@ -51,7 +51,7 @@ inline detail::tvec3<valType> YCoCg2rgb
}
template <typename valType>
inline detail::tvec3<valType> YCoCgR2rgb
GLM_FUNC_QUALIFIER detail::tvec3<valType> YCoCgR2rgb
(
detail::tvec3<valType> const & YCoCgRColor
)

View File

@ -41,23 +41,23 @@ namespace glm
/// \addtogroup gtx_compatibility
///@{
template <typename T> inline T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec2<T> lerp(const detail::tvec2<T>& x, const detail::tvec2<T>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec3<T> lerp(const detail::tvec3<T>& x, const detail::tvec3<T>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec4<T> lerp(const detail::tvec4<T>& x, const detail::tvec4<T>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec2<T> lerp(const detail::tvec2<T>& x, const detail::tvec2<T>& y, const detail::tvec2<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec3<T> lerp(const detail::tvec3<T>& x, const detail::tvec3<T>& y, const detail::tvec3<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec4<T> lerp(const detail::tvec4<T>& x, const detail::tvec4<T>& y, const detail::tvec4<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> lerp(const detail::tvec2<T>& x, const detail::tvec2<T>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> lerp(const detail::tvec3<T>& x, const detail::tvec3<T>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> lerp(const detail::tvec4<T>& x, const detail::tvec4<T>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> lerp(const detail::tvec2<T>& x, const detail::tvec2<T>& y, const detail::tvec2<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> lerp(const detail::tvec3<T>& x, const detail::tvec3<T>& y, const detail::tvec3<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> lerp(const detail::tvec4<T>& x, const detail::tvec4<T>& y, const detail::tvec4<T>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
template <typename T> inline T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec2<T> saturate(const detail::tvec2<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec3<T> saturate(const detail::tvec3<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec4<T> saturate(const detail::tvec4<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> saturate(const detail::tvec2<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> saturate(const detail::tvec3<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> saturate(const detail::tvec4<T>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
template <typename T> inline T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec2<T> atan2(const detail::tvec2<T>& x, const detail::tvec2<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec3<T> atan2(const detail::tvec3<T>& x, const detail::tvec3<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename T> inline detail::tvec4<T> atan2(const detail::tvec4<T>& x, const detail::tvec4<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec2<T> atan2(const detail::tvec2<T>& x, const detail::tvec2<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec3<T> atan2(const detail::tvec3<T>& x, const detail::tvec3<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename T> GLM_FUNC_QUALIFIER detail::tvec4<T> atan2(const detail::tvec4<T>& x, const detail::tvec4<T>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
template <typename genType> bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
template <typename valType> detail::tvec2<bool> isfinite(const detail::tvec2<valType>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)

View File

@ -13,7 +13,7 @@ namespace compatibility{
// isfinite
template <typename genType>
inline bool isfinite(
GLM_FUNC_QUALIFIER bool isfinite(
genType const & x)
{
#if(GLM_COMPILER & GLM_COMPILER_VC)
@ -24,7 +24,7 @@ inline bool isfinite(
}
template <typename valType>
inline detail::tvec2<bool> isfinite(
GLM_FUNC_QUALIFIER detail::tvec2<bool> isfinite(
detail::tvec2<valType> const & x)
{
return detail::tvec2<bool>(
@ -33,7 +33,7 @@ inline detail::tvec2<bool> isfinite(
}
template <typename valType>
inline detail::tvec3<bool> isfinite(
GLM_FUNC_QUALIFIER detail::tvec3<bool> isfinite(
detail::tvec3<valType> const & x)
{
return detail::tvec3<bool>(
@ -43,7 +43,7 @@ inline detail::tvec3<bool> isfinite(
}
template <typename valType>
inline detail::tvec4<bool> isfinite(
GLM_FUNC_QUALIFIER detail::tvec4<bool> isfinite(
detail::tvec4<valType> const & x)
{
return detail::tvec4<bool>(
@ -55,7 +55,7 @@ inline detail::tvec4<bool> isfinite(
// isinf
template <typename genType>
inline bool isinf(
GLM_FUNC_QUALIFIER bool isinf(
genType const & x)
{
#if(GLM_COMPILER & GLM_COMPILER_VC)
@ -66,7 +66,7 @@ inline bool isinf(
}
template <typename valType>
inline detail::tvec2<bool> isinf(
GLM_FUNC_QUALIFIER detail::tvec2<bool> isinf(
detail::tvec2<valType> const & x)
{
return detail::tvec2<bool>(
@ -75,7 +75,7 @@ inline detail::tvec2<bool> isinf(
}
template <typename valType>
inline detail::tvec3<bool> isinf(
GLM_FUNC_QUALIFIER detail::tvec3<bool> isinf(
detail::tvec3<valType> const & x)
{
return detail::tvec3<bool>(
@ -85,7 +85,7 @@ inline detail::tvec3<bool> isinf(
}
template <typename valType>
inline detail::tvec4<bool> isinf(
GLM_FUNC_QUALIFIER detail::tvec4<bool> isinf(
detail::tvec4<valType> const & x)
{
return detail::tvec4<bool>(
@ -97,7 +97,7 @@ inline detail::tvec4<bool> isinf(
// isnan
template <typename genType>
inline bool isnan(genType const & x)
GLM_FUNC_QUALIFIER bool isnan(genType const & x)
{
#if(GLM_COMPILER & GLM_COMPILER_VC)
return _isnan(x);
@ -107,7 +107,7 @@ inline bool isnan(genType const & x)
}
template <typename valType>
inline detail::tvec2<bool> isnan(
GLM_FUNC_QUALIFIER detail::tvec2<bool> isnan(
detail::tvec2<valType> const & x)
{
return detail::tvec2<bool>(
@ -116,7 +116,7 @@ inline detail::tvec2<bool> isnan(
}
template <typename valType>
inline detail::tvec3<bool> isnan(
GLM_FUNC_QUALIFIER detail::tvec3<bool> isnan(
detail::tvec3<valType> const & x)
{
return detail::tvec3<bool>(
@ -126,7 +126,7 @@ inline detail::tvec3<bool> isnan(
}
template <typename valType>
inline detail::tvec4<bool> isnan(
GLM_FUNC_QUALIFIER detail::tvec4<bool> isnan(
detail::tvec4<valType> const & x)
{
return detail::tvec4<bool>(

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace component_wise
{
template <typename genType>
inline typename genType::value_type compAdd(genType const & v)
GLM_FUNC_QUALIFIER typename genType::value_type compAdd(genType const & v)
{
typename genType::size_type result = typename genType::value_type(0);
for(typename genType::size_type i = 0; i < genType::value_size(); ++i)
@ -21,7 +21,7 @@ namespace component_wise
}
template <typename genType>
inline typename genType::value_type compMul(genType const & v)
GLM_FUNC_QUALIFIER typename genType::value_type compMul(genType const & v)
{
typename genType::value_type result = typename genType::value_type(1);
for(typename genType::size_type i = 0; i < genType::value_size(); ++i)
@ -30,7 +30,7 @@ namespace component_wise
}
template <typename genType>
inline typename genType::value_type compMin(genType const & v)
GLM_FUNC_QUALIFIER typename genType::value_type compMin(genType const & v)
{
typename genType::value_type result = typename genType::value_type(v[0]);
for(typename genType::size_type i = 1; i < genType::value_size(); ++i)
@ -39,7 +39,7 @@ namespace component_wise
}
template <typename genType>
inline typename genType::value_type compMax(genType const & v)
GLM_FUNC_QUALIFIER typename genType::value_type compMax(genType const & v)
{
typename genType::value_type result = typename genType::value_type(v[0]);
for(typename genType::size_type i = 1; i < genType::value_size(); ++i)

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace epsilon{
template <typename genType>
inline bool equalEpsilon
GLM_FUNC_QUALIFIER bool equalEpsilon
(
genType const & x,
genType const & y,
@ -23,7 +23,7 @@ inline bool equalEpsilon
}
template <typename genType>
inline bool notEqualEpsilon
GLM_FUNC_QUALIFIER bool notEqualEpsilon
(
genType const & x,
genType const & y,
@ -34,7 +34,7 @@ inline bool notEqualEpsilon
}
template <typename valType>
inline detail::tvec2<bool> equalEpsilon
GLM_FUNC_QUALIFIER detail::tvec2<bool> equalEpsilon
(
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y,
@ -46,7 +46,7 @@ inline detail::tvec2<bool> equalEpsilon
}
template <typename valType>
inline detail::tvec3<bool> equalEpsilon
GLM_FUNC_QUALIFIER detail::tvec3<bool> equalEpsilon
(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y,
@ -59,7 +59,7 @@ inline detail::tvec3<bool> equalEpsilon
}
template <typename valType>
inline detail::tvec4<bool> equalEpsilon
GLM_FUNC_QUALIFIER detail::tvec4<bool> equalEpsilon
(
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y,
@ -74,7 +74,7 @@ inline detail::tvec4<bool> equalEpsilon
}
template <typename valType>
inline detail::tvec2<bool> notEqualEpsilon
GLM_FUNC_QUALIFIER detail::tvec2<bool> notEqualEpsilon
(
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y,
@ -87,7 +87,7 @@ inline detail::tvec2<bool> notEqualEpsilon
}
template <typename valType>
inline detail::tvec3<bool> notEqualEpsilon
GLM_FUNC_QUALIFIER detail::tvec3<bool> notEqualEpsilon
(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y,
@ -101,7 +101,7 @@ inline detail::tvec3<bool> notEqualEpsilon
}
template <typename valType>
inline detail::tvec4<bool> notEqualEpsilon
GLM_FUNC_QUALIFIER detail::tvec4<bool> notEqualEpsilon
(
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y,
@ -116,7 +116,7 @@ inline detail::tvec4<bool> notEqualEpsilon
}
template <typename valType>
inline detail::tvec2<bool> equalEpsilon
GLM_FUNC_QUALIFIER detail::tvec2<bool> equalEpsilon
(
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y,
@ -129,7 +129,7 @@ inline detail::tvec2<bool> equalEpsilon
}
template <typename valType>
inline detail::tvec3<bool> equalEpsilon
GLM_FUNC_QUALIFIER detail::tvec3<bool> equalEpsilon
(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y,
@ -143,7 +143,7 @@ inline detail::tvec3<bool> equalEpsilon
}
template <typename valType>
inline detail::tvec4<bool> equalEpsilon
GLM_FUNC_QUALIFIER detail::tvec4<bool> equalEpsilon
(
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y,
@ -158,7 +158,7 @@ inline detail::tvec4<bool> equalEpsilon
}
template <typename valType>
inline detail::tvec2<bool> notEqualEpsilon
GLM_FUNC_QUALIFIER detail::tvec2<bool> notEqualEpsilon
(
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y,
@ -171,7 +171,7 @@ inline detail::tvec2<bool> notEqualEpsilon
}
template <typename valType>
inline detail::tvec3<bool> notEqualEpsilon
GLM_FUNC_QUALIFIER detail::tvec3<bool> notEqualEpsilon
(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y,
@ -185,7 +185,7 @@ inline detail::tvec3<bool> notEqualEpsilon
}
template <typename valType>
inline detail::tvec4<bool> notEqualEpsilon
GLM_FUNC_QUALIFIER detail::tvec4<bool> notEqualEpsilon
(
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y,

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace euler_angles{
template <typename valType>
inline detail::tmat4x4<valType> eulerAngleX
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> eulerAngleX
(
valType const & angleX
)
@ -28,7 +28,7 @@ inline detail::tmat4x4<valType> eulerAngleX
}
template <typename valType>
inline detail::tmat4x4<valType> eulerAngleY
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> eulerAngleY
(
valType const & angleY
)
@ -44,7 +44,7 @@ inline detail::tmat4x4<valType> eulerAngleY
}
template <typename valType>
inline detail::tmat4x4<valType> eulerAngleZ
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> eulerAngleZ
(
valType const & angleZ
)
@ -60,7 +60,7 @@ inline detail::tmat4x4<valType> eulerAngleZ
}
template <typename valType>
inline detail::tmat4x4<valType> eulerAngleXY
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> eulerAngleXY
(
valType const & angleX,
valType const & angleY
@ -79,7 +79,7 @@ inline detail::tmat4x4<valType> eulerAngleXY
}
template <typename valType>
inline detail::tmat4x4<valType> eulerAngleYX
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> eulerAngleYX
(
valType const & angleY,
valType const & angleX
@ -98,7 +98,7 @@ inline detail::tmat4x4<valType> eulerAngleYX
}
template <typename valType>
inline detail::tmat4x4<valType> eulerAngleXZ
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> eulerAngleXZ
(
valType const & angleX,
valType const & angleZ
@ -108,7 +108,7 @@ inline detail::tmat4x4<valType> eulerAngleXZ
}
template <typename valType>
inline detail::tmat4x4<valType> eulerAngleZX
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> eulerAngleZX
(
valType const & angleZ,
valType const & angleX
@ -118,7 +118,7 @@ inline detail::tmat4x4<valType> eulerAngleZX
}
template <typename valType>
inline detail::tmat4x4<valType> eulerAngleYXZ
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> eulerAngleYXZ
(
valType const & yaw,
valType const & pitch,
@ -153,7 +153,7 @@ inline detail::tmat4x4<valType> eulerAngleYXZ
}
template <typename valType>
inline detail::tmat4x4<valType> yawPitchRoll
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> yawPitchRoll
(
valType const & yaw,
valType const & pitch,
@ -188,7 +188,7 @@ inline detail::tmat4x4<valType> yawPitchRoll
}
template <typename valType>
inline detail::tmat2x2<valType> orientate2
GLM_FUNC_QUALIFIER detail::tmat2x2<valType> orientate2
(
valType const & angle
)
@ -205,7 +205,7 @@ inline detail::tmat2x2<valType> orientate2
}
template <typename valType>
inline detail::tmat3x3<valType> orientate3
GLM_FUNC_QUALIFIER detail::tmat3x3<valType> orientate3
(
valType const & angle
)
@ -227,7 +227,7 @@ inline detail::tmat3x3<valType> orientate3
}
template <typename valType>
inline detail::tmat3x3<valType> orientate3
GLM_FUNC_QUALIFIER detail::tmat3x3<valType> orientate3
(
detail::tvec3<valType> const & angles
)
@ -236,7 +236,7 @@ inline detail::tmat3x3<valType> orientate3
}
template <typename valType>
inline detail::tmat4x4<valType> orientate4
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> orientate4
(
detail::tvec3<valType> const & angles
)

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace extented_min_max
{
template <typename T>
inline T min(
GLM_FUNC_QUALIFIER T min(
T const & x,
T const & y,
T const & z)
@ -25,7 +25,7 @@ namespace extented_min_max
typename T,
template <typename> class C
>
inline C<T> min
GLM_FUNC_QUALIFIER C<T> min
(
C<T> const & x,
typename C<T>::value_type const & y,
@ -40,7 +40,7 @@ namespace extented_min_max
typename T,
template <typename> class C
>
inline C<T> min
GLM_FUNC_QUALIFIER C<T> min
(
C<T> const & x,
C<T> const & y,
@ -51,7 +51,7 @@ namespace extented_min_max
}
template <typename T>
inline T min
GLM_FUNC_QUALIFIER T min
(
T const & x,
T const & y,
@ -67,7 +67,7 @@ namespace extented_min_max
typename T,
template <typename> class C
>
inline C<T> min
GLM_FUNC_QUALIFIER C<T> min
(
C<T> const & x,
typename C<T>::value_type const & y,
@ -83,7 +83,7 @@ namespace extented_min_max
typename T,
template <typename> class C
>
inline C<T> min
GLM_FUNC_QUALIFIER C<T> min
(
C<T> const & x,
C<T> const & y,
@ -95,7 +95,7 @@ namespace extented_min_max
}
template <typename T>
inline T max(
GLM_FUNC_QUALIFIER T max(
T const & x,
T const & y,
T const & z)
@ -108,7 +108,7 @@ namespace extented_min_max
typename T,
template <typename> class C
>
inline C<T> max
GLM_FUNC_QUALIFIER C<T> max
(
C<T> const & x,
typename C<T>::value_type const & y,
@ -123,7 +123,7 @@ namespace extented_min_max
typename T,
template <typename> class C
>
inline C<T> max
GLM_FUNC_QUALIFIER C<T> max
(
C<T> const & x,
C<T> const & y,
@ -134,7 +134,7 @@ namespace extented_min_max
}
template <typename T>
inline T max
GLM_FUNC_QUALIFIER T max
(
T const & x,
T const & y,
@ -150,7 +150,7 @@ namespace extented_min_max
typename T,
template <typename> class C
>
inline C<T> max
GLM_FUNC_QUALIFIER C<T> max
(
C<T> const & x,
typename C<T>::value_type const & y,
@ -166,7 +166,7 @@ namespace extented_min_max
typename T,
template <typename> class C
>
inline C<T> max
GLM_FUNC_QUALIFIER C<T> max
(
C<T> const & x,
C<T> const & y,

View File

@ -13,13 +13,13 @@ namespace fast_exponential
{
// fastPow:
template <typename T>
inline T fastPow(const T x, const T y)
GLM_FUNC_QUALIFIER T fastPow(const T x, const T y)
{
return exp(y * log(x));
}
template <typename T>
inline detail::tvec2<T> fastPow(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastPow(
const detail::tvec2<T>& x,
const detail::tvec2<T>& y)
{
@ -29,7 +29,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec3<T> fastPow(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastPow(
const detail::tvec3<T>& x,
const detail::tvec3<T>& y)
{
@ -40,7 +40,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec4<T> fastPow(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastPow(
const detail::tvec4<T>& x,
const detail::tvec4<T>& y)
{
@ -52,7 +52,7 @@ namespace fast_exponential
}
template <typename T>
inline T fastPow(const T x, int y)
GLM_FUNC_QUALIFIER T fastPow(const T x, int y)
{
T f = T(1);
for(int i = 0; i < y; ++i)
@ -61,7 +61,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec2<T> fastPow(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastPow(
const detail::tvec2<T>& x,
const detail::tvec2<int>& y)
{
@ -71,7 +71,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec3<T> fastPow(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastPow(
const detail::tvec3<T>& x,
const detail::tvec3<int>& y)
{
@ -82,7 +82,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec4<T> fastPow(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastPow(
const detail::tvec4<T>& x,
const detail::tvec4<int>& y)
{
@ -96,7 +96,7 @@ namespace fast_exponential
// fastExp
// Note: This function provides accurate results only for value between -1 and 1, else avoid it.
template <typename T>
inline T fastExp(const T x)
GLM_FUNC_QUALIFIER T fastExp(const T x)
{
// This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.
// return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f))));
@ -107,7 +107,7 @@ namespace fast_exponential
return T(1) + x + (x2 * T(0.5)) + (x3 * T(0.1666666667)) + (x4 * T(0.041666667)) + (x5 * T(0.008333333333));
}
/* // Try to handle all values of float... but often shower than std::exp, glm::floor and the loop kill the performance
inline float fastExp(float x)
GLM_FUNC_QUALIFIER float fastExp(float x)
{
const float e = 2.718281828f;
const float IntegerPart = floor(x);
@ -125,7 +125,7 @@ namespace fast_exponential
}
// Increase accuracy on number bigger that 1 and smaller than -1 but it's not enough for high and negative numbers
inline float fastExp(float x)
GLM_FUNC_QUALIFIER float fastExp(float x)
{
// This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.
// return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f))));
@ -140,7 +140,7 @@ namespace fast_exponential
}
*/
template <typename T>
inline detail::tvec2<T> fastExp(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastExp(
const detail::tvec2<T>& x)
{
return detail::tvec2<T>(
@ -149,7 +149,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec3<T> fastExp(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastExp(
const detail::tvec3<T>& x)
{
return detail::tvec3<T>(
@ -159,7 +159,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec4<T> fastExp(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastExp(
const detail::tvec4<T>& x)
{
return detail::tvec4<T>(
@ -171,13 +171,13 @@ namespace fast_exponential
// fastLog
template <typename T>
inline T fastLog(const T x)
GLM_FUNC_QUALIFIER T fastLog(const T x)
{
return std::log(x);
}
/* Slower than the VC7.1 function...
inline float fastLog(float x)
GLM_FUNC_QUALIFIER float fastLog(float x)
{
float y1 = (x - 1.0f) / (x + 1.0f);
float y2 = y1 * y1;
@ -186,7 +186,7 @@ namespace fast_exponential
*/
template <typename T>
inline detail::tvec2<T> fastLog(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastLog(
const detail::tvec2<T>& x)
{
return detail::tvec2<T>(
@ -195,7 +195,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec3<T> fastLog(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastLog(
const detail::tvec3<T>& x)
{
return detail::tvec3<T>(
@ -205,7 +205,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec4<T> fastLog(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastLog(
const detail::tvec4<T>& x)
{
return detail::tvec4<T>(
@ -217,13 +217,13 @@ namespace fast_exponential
//fastExp2, ln2 = 0.69314718055994530941723212145818f
template <typename T>
inline T fastExp2(const T x)
GLM_FUNC_QUALIFIER T fastExp2(const T x)
{
return fastExp(0.69314718055994530941723212145818f * x);
}
template <typename T>
inline detail::tvec2<T> fastExp2(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastExp2(
const detail::tvec2<T>& x)
{
return detail::tvec2<T>(
@ -232,7 +232,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec3<T> fastExp2(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastExp2(
const detail::tvec3<T>& x)
{
return detail::tvec3<T>(
@ -242,7 +242,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec4<T> fastExp2(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastExp2(
const detail::tvec4<T>& x)
{
return detail::tvec4<T>(
@ -254,13 +254,13 @@ namespace fast_exponential
// fastLog2, ln2 = 0.69314718055994530941723212145818f
template <typename T>
inline T fastLog2(const T x)
GLM_FUNC_QUALIFIER T fastLog2(const T x)
{
return fastLog(x) / 0.69314718055994530941723212145818f;
}
template <typename T>
inline detail::tvec2<T> fastLog2(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastLog2(
const detail::tvec2<T>& x)
{
return detail::tvec2<T>(
@ -269,7 +269,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec3<T> fastLog2(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastLog2(
const detail::tvec3<T>& x)
{
return detail::tvec3<T>(
@ -279,7 +279,7 @@ namespace fast_exponential
}
template <typename T>
inline detail::tvec4<T> fastLog2(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastLog2(
const detail::tvec4<T>& x)
{
return detail::tvec4<T>(

View File

@ -13,7 +13,7 @@ namespace fast_square_root{
// fastSqrt
template <typename genType>
inline genType fastSqrt
GLM_FUNC_QUALIFIER genType fastSqrt
(
genType const & x
)
@ -22,7 +22,7 @@ inline genType fastSqrt
}
template <typename valType>
inline detail::tvec2<valType> fastSqrt
GLM_FUNC_QUALIFIER detail::tvec2<valType> fastSqrt
(
detail::tvec2<valType> const & x
)
@ -33,7 +33,7 @@ inline detail::tvec2<valType> fastSqrt
}
template <typename valType>
inline detail::tvec3<valType> fastSqrt
GLM_FUNC_QUALIFIER detail::tvec3<valType> fastSqrt
(
detail::tvec3<valType> const & x
)
@ -45,7 +45,7 @@ inline detail::tvec3<valType> fastSqrt
}
template <typename valType>
inline detail::tvec4<valType> fastSqrt
GLM_FUNC_QUALIFIER detail::tvec4<valType> fastSqrt
(
detail::tvec4<valType> const & x
)
@ -59,7 +59,7 @@ inline detail::tvec4<valType> fastSqrt
// fastInversesqrt
template <typename genType>
inline genType fastInverseSqrt
GLM_FUNC_QUALIFIER genType fastInverseSqrt
(
genType const & x
)
@ -76,7 +76,7 @@ inline genType fastInverseSqrt
}
template <typename valType>
inline detail::tvec2<valType> fastInverseSqrt
GLM_FUNC_QUALIFIER detail::tvec2<valType> fastInverseSqrt
(
detail::tvec2<valType> const & x
)
@ -87,7 +87,7 @@ inline detail::tvec2<valType> fastInverseSqrt
}
template <typename valType>
inline detail::tvec3<valType> fastInverseSqrt
GLM_FUNC_QUALIFIER detail::tvec3<valType> fastInverseSqrt
(
detail::tvec3<valType> const & x
)
@ -99,7 +99,7 @@ inline detail::tvec3<valType> fastInverseSqrt
}
template <typename valType>
inline detail::tvec4<valType> fastInverseSqrt
GLM_FUNC_QUALIFIER detail::tvec4<valType> fastInverseSqrt
(
detail::tvec4<valType> const & x
)
@ -113,7 +113,7 @@ inline detail::tvec4<valType> fastInverseSqrt
// fastLength
template <typename genType>
inline genType fastLength
GLM_FUNC_QUALIFIER genType fastLength
(
genType const & x
)
@ -122,7 +122,7 @@ inline genType fastLength
}
template <typename valType>
inline valType fastLength
GLM_FUNC_QUALIFIER valType fastLength
(
detail::tvec2<valType> const & x
)
@ -132,7 +132,7 @@ inline valType fastLength
}
template <typename valType>
inline valType fastLength
GLM_FUNC_QUALIFIER valType fastLength
(
detail::tvec3<valType> const & x
)
@ -142,7 +142,7 @@ inline valType fastLength
}
template <typename valType>
inline valType fastLength
GLM_FUNC_QUALIFIER valType fastLength
(
detail::tvec4<valType> const & x
)
@ -153,7 +153,7 @@ inline valType fastLength
// fastDistance
template <typename genType>
inline genType fastDistance
GLM_FUNC_QUALIFIER genType fastDistance
(
genType const & x,
genType const & y
@ -163,7 +163,7 @@ inline genType fastDistance
}
template <typename valType>
inline valType fastDistance
GLM_FUNC_QUALIFIER valType fastDistance
(
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y
@ -173,7 +173,7 @@ inline valType fastDistance
}
template <typename valType>
inline valType fastDistance
GLM_FUNC_QUALIFIER valType fastDistance
(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y
@ -183,7 +183,7 @@ inline valType fastDistance
}
template <typename valType>
inline valType fastDistance
GLM_FUNC_QUALIFIER valType fastDistance
(
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y
@ -194,7 +194,7 @@ inline valType fastDistance
// fastNormalize
template <typename genType>
inline genType fastNormalize
GLM_FUNC_QUALIFIER genType fastNormalize
(
genType const & x
)
@ -203,7 +203,7 @@ inline genType fastNormalize
}
template <typename valType>
inline detail::tvec2<valType> fastNormalize
GLM_FUNC_QUALIFIER detail::tvec2<valType> fastNormalize
(
detail::tvec2<valType> const & x
)
@ -213,7 +213,7 @@ inline detail::tvec2<valType> fastNormalize
}
template <typename valType>
inline detail::tvec3<valType> fastNormalize
GLM_FUNC_QUALIFIER detail::tvec3<valType> fastNormalize
(
detail::tvec3<valType> const & x
)
@ -223,7 +223,7 @@ inline detail::tvec3<valType> fastNormalize
}
template <typename valType>
inline detail::tvec4<valType> fastNormalize
GLM_FUNC_QUALIFIER detail::tvec4<valType> fastNormalize
(
detail::tvec4<valType> const & x
)

View File

@ -13,13 +13,13 @@ namespace fast_trigonometry
{
// sin
template <typename T>
inline T fastSin(const T x)
GLM_FUNC_QUALIFIER T fastSin(const T x)
{
return x - ((x * x * x) / T(6)) + ((x * x * x * x * x) / T(120)) - ((x * x * x * x * x * x * x) / T(5040));
}
template <typename T>
inline detail::tvec2<T> fastSin(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastSin(
const detail::tvec2<T>& x)
{
return detail::tvec2<T>(
@ -28,7 +28,7 @@ namespace fast_trigonometry
}
template <typename T>
inline detail::tvec3<T> fastSin(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastSin(
const detail::tvec3<T>& x)
{
return detail::tvec3<T>(
@ -38,7 +38,7 @@ namespace fast_trigonometry
}
template <typename T>
inline detail::tvec4<T> fastSin(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastSin(
const detail::tvec4<T>& x)
{
return detail::tvec4<T>(
@ -50,13 +50,13 @@ namespace fast_trigonometry
// cos
template <typename T>
inline T fastCos(const T x)
GLM_FUNC_QUALIFIER T fastCos(const T x)
{
return T(1) - (x * x * T(0.5)) + (x * x * x * x * T(0.041666666666)) - (x * x * x * x * x * x * T(0.00138888888888));
}
template <typename T>
inline detail::tvec2<T> fastCos(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastCos(
const detail::tvec2<T>& x)
{
return detail::tvec2<T>(
@ -65,7 +65,7 @@ namespace fast_trigonometry
}
template <typename T>
inline detail::tvec3<T> fastCos(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastCos(
const detail::tvec3<T>& x)
{
return detail::tvec3<T>(
@ -75,7 +75,7 @@ namespace fast_trigonometry
}
template <typename T>
inline detail::tvec4<T> fastCos(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastCos(
const detail::tvec4<T>& x)
{
return detail::tvec4<T>(
@ -87,13 +87,13 @@ namespace fast_trigonometry
// tan
template <typename T>
inline T fastTan(const T x)
GLM_FUNC_QUALIFIER T fastTan(const T x)
{
return x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539));
}
template <typename T>
inline detail::tvec2<T> fastTan(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastTan(
const detail::tvec2<T>& x)
{
return detail::tvec2<T>(
@ -102,7 +102,7 @@ namespace fast_trigonometry
}
template <typename T>
inline detail::tvec3<T> fastTan(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastTan(
const detail::tvec3<T>& x)
{
return detail::tvec3<T>(
@ -112,7 +112,7 @@ namespace fast_trigonometry
}
template <typename T>
inline detail::tvec4<T> fastTan(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastTan(
const detail::tvec4<T>& x)
{
return detail::tvec4<T>(
@ -124,7 +124,7 @@ namespace fast_trigonometry
// asin
template <typename T>
inline T fastAsin(const T x)
GLM_FUNC_QUALIFIER T fastAsin(const T x)
{
return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159));
}
@ -158,7 +158,7 @@ namespace fast_trigonometry
// acos
template <typename T>
inline T fastAcos(const T x)
GLM_FUNC_QUALIFIER T fastAcos(const T x)
{
return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2)
}
@ -192,14 +192,14 @@ namespace fast_trigonometry
// atan
template <typename T>
inline T fastAtan(const T y, const T x)
GLM_FUNC_QUALIFIER T fastAtan(const T y, const T x)
{
T sgn = sign(y) * sign(x);
return abs(fastAtan(y / x)) * sgn;
}
template <typename T>
inline detail::tvec2<T> fastAtan(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastAtan(
const detail::tvec2<T>& y,
const detail::tvec2<T>& x)
{
@ -209,7 +209,7 @@ namespace fast_trigonometry
}
template <typename T>
inline detail::tvec3<T> fastAtan(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastAtan(
const detail::tvec3<T>& y,
const detail::tvec3<T>& x)
{
@ -220,7 +220,7 @@ namespace fast_trigonometry
}
template <typename T>
inline detail::tvec4<T> fastAtan(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastAtan(
const detail::tvec4<T>& y,
const detail::tvec4<T>& x)
{
@ -232,13 +232,13 @@ namespace fast_trigonometry
}
template <typename T>
inline T fastAtan(const T x)
GLM_FUNC_QUALIFIER T fastAtan(const T x)
{
return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909));
}
template <typename T>
inline detail::tvec2<T> fastAtan(
GLM_FUNC_QUALIFIER detail::tvec2<T> fastAtan(
const detail::tvec2<T>& x)
{
return detail::tvec2<T>(
@ -247,7 +247,7 @@ namespace fast_trigonometry
}
template <typename T>
inline detail::tvec3<T> fastAtan(
GLM_FUNC_QUALIFIER detail::tvec3<T> fastAtan(
const detail::tvec3<T>& x)
{
return detail::tvec3<T>(
@ -257,7 +257,7 @@ namespace fast_trigonometry
}
template <typename T>
inline detail::tvec4<T> fastAtan(
GLM_FUNC_QUALIFIER detail::tvec4<T> fastAtan(
const detail::tvec4<T>& x)
{
return detail::tvec4<T>(

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace handed_coordinate_space
{
template <typename T>
inline bool rightHanded(
GLM_FUNC_QUALIFIER bool rightHanded(
detail::tvec3<T> const & tangent,
detail::tvec3<T> const & binormal,
detail::tvec3<T> const & normal)
@ -21,7 +21,7 @@ namespace handed_coordinate_space
}
template <typename T>
inline bool leftHanded(
GLM_FUNC_QUALIFIER bool leftHanded(
detail::tvec3<T> const & tangent,
detail::tvec3<T> const & binormal,
detail::tvec3<T> const & normal)

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace inertia{
template <typename T>
inline detail::tmat3x3<T> boxInertia3(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> boxInertia3(
const T Mass,
const detail::tvec3<T>& Scale)
{
@ -24,7 +24,7 @@ namespace inertia{
}
template <typename T>
inline detail::tmat4x4<T> boxInertia4(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> boxInertia4(
const T Mass,
const detail::tvec3<T>& Scale)
{
@ -36,7 +36,7 @@ namespace inertia{
}
template <typename T>
inline detail::tmat3x3<T> diskInertia3(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> diskInertia3(
const T Mass,
const T Radius)
{
@ -47,7 +47,7 @@ namespace inertia{
}
template <typename T>
inline detail::tmat4x4<T> diskInertia4(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> diskInertia4(
const T Mass,
const T Radius)
{
@ -59,7 +59,7 @@ namespace inertia{
}
template <typename T>
inline detail::tmat3x3<T> ballInertia3(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> ballInertia3(
const T Mass,
const T Radius)
{
@ -68,7 +68,7 @@ namespace inertia{
}
template <typename T>
inline detail::tmat4x4<T> ballInertia4(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> ballInertia4(
const T Mass,
const T Radius)
{
@ -79,7 +79,7 @@ namespace inertia{
}
template <typename T>
inline detail::tmat3x3<T> sphereInertia3(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> sphereInertia3(
const T Mass,
const T Radius)
{
@ -88,7 +88,7 @@ namespace inertia{
}
template <typename T>
inline detail::tmat4x4<T> sphereInertia4(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> sphereInertia4(
const T Mass,
const T Radius)
{

View File

@ -11,7 +11,7 @@ namespace glm{
namespace gtx{
namespace int_10_10_10_2
{
inline dword uint10_10_10_2_cast(glm::vec4 const & v)
GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast(glm::vec4 const & v)
{
return dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30);
}

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace integer
{
// pow
inline int pow(int x, int y)
GLM_FUNC_QUALIFIER int pow(int x, int y)
{
if(y == 0)
return 1;
@ -23,7 +23,7 @@ namespace integer
}
// sqrt: From Christopher J. Musial, An integer square root, Graphics Gems, 1990, page 387
inline int sqrt(int x)
GLM_FUNC_QUALIFIER int sqrt(int x)
{
if(x <= 1) return x;
@ -40,14 +40,14 @@ namespace integer
}
// mod
inline int mod(int x, int y)
GLM_FUNC_QUALIFIER int mod(int x, int y)
{
return x - y * (x / y);
}
// factorial (!12 max, integer only)
template <typename genType>
inline genType factorial(genType const & x)
GLM_FUNC_QUALIFIER genType factorial(genType const & x)
{
genType Result;
for(Result = 1; x > 1; --x)
@ -56,7 +56,7 @@ namespace integer
}
template <typename valType>
inline detail::tvec2<valType> factorial(
GLM_FUNC_QUALIFIER detail::tvec2<valType> factorial(
detail::tvec2<valType> const & x)
{
return detail::tvec2<valType>(
@ -65,7 +65,7 @@ namespace integer
}
template <typename valType>
inline detail::tvec3<valType> factorial(
GLM_FUNC_QUALIFIER detail::tvec3<valType> factorial(
detail::tvec3<valType> const & x)
{
return detail::tvec3<valType>(
@ -75,7 +75,7 @@ namespace integer
}
template <typename valType>
inline detail::tvec4<valType> factorial(
GLM_FUNC_QUALIFIER detail::tvec4<valType> factorial(
detail::tvec4<valType> const & x)
{
return detail::tvec4<valType>(

View File

@ -15,7 +15,7 @@ namespace gtx{
namespace intersect{
template <typename genType>
inline bool intersectRayTriangle
GLM_FUNC_QUALIFIER bool intersectRayTriangle
(
genType const & orig, genType const & dir,
genType const & v0, genType const & v1, genType const & v2,
@ -55,7 +55,7 @@ inline bool intersectRayTriangle
}
//template <typename genType>
//inline bool intersectRayTriangle
//GLM_FUNC_QUALIFIER bool intersectRayTriangle
//(
// genType const & orig, genType const & dir,
// genType const & vert0, genType const & vert1, genType const & vert2,
@ -92,7 +92,7 @@ inline bool intersectRayTriangle
//}
template <typename genType>
inline bool intersectLineTriangle
GLM_FUNC_QUALIFIER bool intersectLineTriangle
(
genType const & orig, genType const & dir,
genType const & vert0, genType const & vert1, genType const & vert2,
@ -130,7 +130,7 @@ inline bool intersectLineTriangle
}
template <typename genType>
inline bool intersectRaySphere
GLM_FUNC_QUALIFIER bool intersectRaySphere
(
genType const & rayStarting, genType const & rayDirection,
genType const & sphereCenter, typename genType::value_type sphereRadius,
@ -163,7 +163,7 @@ inline bool intersectRaySphere
}
template <typename genType>
inline bool intersectLineSphere
GLM_FUNC_QUALIFIER bool intersectLineSphere
(
genType const & point0, genType const & point1,
genType const & center, typename genType::value_type radius,

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace log_base{
template <typename genType>
inline genType log(
GLM_FUNC_QUALIFIER genType log(
genType const & x,
genType const & base)
{
@ -22,7 +22,7 @@ inline genType log(
}
template <typename valType>
inline detail::tvec2<valType> log(
GLM_FUNC_QUALIFIER detail::tvec2<valType> log(
detail::tvec2<valType> const & v,
valType const & base)
{
@ -32,7 +32,7 @@ inline detail::tvec2<valType> log(
}
template <typename valType>
inline detail::tvec3<valType> log(
GLM_FUNC_QUALIFIER detail::tvec3<valType> log(
detail::tvec3<valType> const & v,
valType const & base)
{
@ -43,7 +43,7 @@ inline detail::tvec3<valType> log(
}
template <typename valType>
inline detail::tvec4<valType> log(
GLM_FUNC_QUALIFIER detail::tvec4<valType> log(
detail::tvec4<valType> const & v,
valType const & base)
{
@ -55,7 +55,7 @@ inline detail::tvec4<valType> log(
}
template <typename valType>
inline detail::tvec2<valType> log(
GLM_FUNC_QUALIFIER detail::tvec2<valType> log(
detail::tvec2<valType> const & v,
detail::tvec2<valType> const & base)
{
@ -65,7 +65,7 @@ inline detail::tvec2<valType> log(
}
template <typename valType>
inline detail::tvec3<valType> log(
GLM_FUNC_QUALIFIER detail::tvec3<valType> log(
detail::tvec3<valType> const & v,
detail::tvec3<valType> const & base)
{
@ -76,7 +76,7 @@ inline detail::tvec3<valType> log(
}
template <typename valType>
inline detail::tvec4<valType> log(
GLM_FUNC_QUALIFIER detail::tvec4<valType> log(
detail::tvec4<valType> const & v,
detail::tvec4<valType> const & base)
{

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace matrix_cross_product
{
template <typename T>
inline detail::tmat3x3<T> matrixCross3(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> matrixCross3(
detail::tvec3<T> const & x)
{
detail::tmat3x3<T> Result(T(0));
@ -26,7 +26,7 @@ namespace matrix_cross_product
}
template <typename T>
inline detail::tmat4x4<T> matrixCross4(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> matrixCross4(
detail::tvec3<T> const & x)
{
detail::tmat4x4<T> Result(T(0));

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace matrix_major_storage
{
template <typename T>
inline detail::tmat2x2<T> rowMajor2(
GLM_FUNC_QUALIFIER detail::tmat2x2<T> rowMajor2(
const detail::tvec2<T>& v1,
const detail::tvec2<T>& v2)
{
@ -25,7 +25,7 @@ namespace matrix_major_storage
}
template <typename T>
inline detail::tmat2x2<T> rowMajor2(
GLM_FUNC_QUALIFIER detail::tmat2x2<T> rowMajor2(
const detail::tmat2x2<T>& m)
{
detail::tmat2x2<T> Result;
@ -37,7 +37,7 @@ namespace matrix_major_storage
}
template <typename T>
inline detail::tmat3x3<T> rowMajor3(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> rowMajor3(
const detail::tvec3<T>& v1,
const detail::tvec3<T>& v2,
const detail::tvec3<T>& v3)
@ -56,7 +56,7 @@ namespace matrix_major_storage
}
template <typename T>
inline detail::tmat3x3<T> rowMajor3(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> rowMajor3(
const detail::tmat3x3<T>& m)
{
detail::tmat3x3<T> Result;
@ -73,7 +73,7 @@ namespace matrix_major_storage
}
template <typename T>
inline detail::tmat4x4<T> rowMajor4(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> rowMajor4(
const detail::tvec4<T>& v1,
const detail::tvec4<T>& v2,
const detail::tvec4<T>& v3,
@ -100,7 +100,7 @@ namespace matrix_major_storage
}
template <typename T>
inline detail::tmat4x4<T> rowMajor4(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> rowMajor4(
const detail::tmat4x4<T>& m)
{
detail::tmat4x4<T> Result;
@ -124,7 +124,7 @@ namespace matrix_major_storage
}
template <typename T>
inline detail::tmat2x2<T> colMajor2(
GLM_FUNC_QUALIFIER detail::tmat2x2<T> colMajor2(
const detail::tvec2<T>& v1,
const detail::tvec2<T>& v2)
{
@ -132,14 +132,14 @@ namespace matrix_major_storage
}
template <typename T>
inline detail::tmat2x2<T> colMajor2(
GLM_FUNC_QUALIFIER detail::tmat2x2<T> colMajor2(
const detail::tmat2x2<T>& m)
{
return detail::tmat2x2<T>(m);
}
template <typename T>
inline detail::tmat3x3<T> colMajor3(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> colMajor3(
const detail::tvec3<T>& v1,
const detail::tvec3<T>& v2,
const detail::tvec3<T>& v3)
@ -148,14 +148,14 @@ namespace matrix_major_storage
}
template <typename T>
inline detail::tmat3x3<T> colMajor3(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> colMajor3(
const detail::tmat3x3<T>& m)
{
return detail::tmat3x3<T>(m);
}
template <typename T>
inline detail::tmat4x4<T> colMajor4(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> colMajor4(
const detail::tvec4<T>& v1,
const detail::tvec4<T>& v2,
const detail::tvec4<T>& v3,
@ -165,7 +165,7 @@ namespace matrix_major_storage
}
template <typename T>
inline detail::tmat4x4<T> colMajor4(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> colMajor4(
const detail::tmat4x4<T>& m)
{
return detail::tmat4x4<T>(m);

View File

@ -12,7 +12,7 @@ namespace gtc{
namespace matrix_operation
{
template <typename valType>
inline detail::tmat2x2<valType> diagonal2x2
GLM_FUNC_QUALIFIER detail::tmat2x2<valType> diagonal2x2
(
detail::tvec2<valType> const & v
)
@ -24,7 +24,7 @@ namespace matrix_operation
}
template <typename valType>
inline detail::tmat2x3<valType> diagonal2x3
GLM_FUNC_QUALIFIER detail::tmat2x3<valType> diagonal2x3
(
detail::tvec2<valType> const & v
)
@ -36,7 +36,7 @@ namespace matrix_operation
}
template <typename valType>
inline detail::tmat2x4<valType> diagonal2x4
GLM_FUNC_QUALIFIER detail::tmat2x4<valType> diagonal2x4
(
detail::tvec2<valType> const & v
)
@ -48,7 +48,7 @@ namespace matrix_operation
}
template <typename valType>
inline detail::tmat3x2<valType> diagonal3x2
GLM_FUNC_QUALIFIER detail::tmat3x2<valType> diagonal3x2
(
detail::tvec2<valType> const & v
)
@ -60,7 +60,7 @@ namespace matrix_operation
}
template <typename valType>
inline detail::tmat3x3<valType> diagonal3x3
GLM_FUNC_QUALIFIER detail::tmat3x3<valType> diagonal3x3
(
detail::tvec3<valType> const & v
)
@ -73,7 +73,7 @@ namespace matrix_operation
}
template <typename valType>
inline detail::tmat3x4<valType> diagonal3x4
GLM_FUNC_QUALIFIER detail::tmat3x4<valType> diagonal3x4
(
detail::tvec3<valType> const & v
)
@ -86,7 +86,7 @@ namespace matrix_operation
}
template <typename valType>
inline detail::tmat4x4<valType> diagonal4x4
GLM_FUNC_QUALIFIER detail::tmat4x4<valType> diagonal4x4
(
detail::tvec4<valType> const & v
)
@ -100,7 +100,7 @@ namespace matrix_operation
}
template <typename valType>
inline detail::tmat4x3<valType> diagonal4x3
GLM_FUNC_QUALIFIER detail::tmat4x3<valType> diagonal4x3
(
detail::tvec3<valType> const & v
)
@ -113,7 +113,7 @@ namespace matrix_operation
}
template <typename valType>
inline detail::tmat4x2<valType> diagonal4x2
GLM_FUNC_QUALIFIER detail::tmat4x2<valType> diagonal4x2
(
detail::tvec2<valType> const & v
)

View File

@ -15,7 +15,7 @@ namespace gtx{
namespace matrix_query
{
template<typename T>
inline bool isNull(
GLM_FUNC_QUALIFIER bool isNull(
const detail::tmat2x2<T>& m,
const T epsilon)
{
@ -26,7 +26,7 @@ namespace matrix_query
}
template<typename T>
inline bool isNull(
GLM_FUNC_QUALIFIER bool isNull(
const detail::tmat3x3<T>& m,
const T epsilon)
{
@ -37,7 +37,7 @@ namespace matrix_query
}
template<typename T>
inline bool isNull(
GLM_FUNC_QUALIFIER bool isNull(
const detail::tmat4x4<T>& m,
const T epsilon)
{
@ -48,7 +48,7 @@ namespace matrix_query
}
template<typename genType>
inline bool isIdentity(
GLM_FUNC_QUALIFIER bool isIdentity(
const genType& m,
const typename genType::value_type epsilon)
{
@ -66,7 +66,7 @@ namespace matrix_query
}
template<typename T>
inline bool isNormalized(
GLM_FUNC_QUALIFIER bool isNormalized(
const detail::tmat2x2<T>& m,
const T epsilon)
{
@ -84,7 +84,7 @@ namespace matrix_query
}
template<typename T>
inline bool isNormalized(
GLM_FUNC_QUALIFIER bool isNormalized(
const detail::tmat3x3<T>& m,
const T epsilon)
{
@ -102,7 +102,7 @@ namespace matrix_query
}
template<typename T>
inline bool isNormalized(
GLM_FUNC_QUALIFIER bool isNormalized(
const detail::tmat4x4<T>& m,
const T epsilon)
{
@ -120,7 +120,7 @@ namespace matrix_query
}
template<typename genType>
inline bool isOrthogonal(
GLM_FUNC_QUALIFIER bool isOrthogonal(
const genType& m,
const typename genType::value_type epsilon)
{

View File

@ -13,7 +13,7 @@ namespace gtx{
namespace mixed_product
{
template <typename valType>
inline valType mixedProduct(
GLM_FUNC_QUALIFIER valType mixedProduct(
detail::tvec3<valType> const & v1,
detail::tvec3<valType> const & v2,
detail::tvec3<valType> const & v3)

View File

@ -18,7 +18,7 @@ namespace multiple
// higherMultiple
template <typename genType>
inline genType higherMultiple
GLM_FUNC_QUALIFIER genType higherMultiple
(
genType const & Source,
genType const & Multiple
@ -29,7 +29,7 @@ namespace multiple
}
template <>
inline detail::thalf higherMultiple
GLM_FUNC_QUALIFIER detail::thalf higherMultiple
(
detail::thalf const & Source,
detail::thalf const & Multiple
@ -40,7 +40,7 @@ namespace multiple
}
template <>
inline float higherMultiple
GLM_FUNC_QUALIFIER float higherMultiple
(
float const & Source,
float const & Multiple
@ -51,7 +51,7 @@ namespace multiple
}
template <>
inline double higherMultiple
GLM_FUNC_QUALIFIER double higherMultiple
(
double const & Source,
double const & Multiple
@ -62,7 +62,7 @@ namespace multiple
}
template <typename T>
inline detail::tvec2<T> higherMultiple
GLM_FUNC_QUALIFIER detail::tvec2<T> higherMultiple
(
detail::tvec2<T> const & Source,
detail::tvec2<T> const & Multiple
@ -75,7 +75,7 @@ namespace multiple
}
template <typename T>
inline detail::tvec3<T> higherMultiple
GLM_FUNC_QUALIFIER detail::tvec3<T> higherMultiple
(
detail::tvec3<T> const & Source,
detail::tvec3<T> const & Multiple
@ -88,7 +88,7 @@ namespace multiple
}
template <typename T>
inline detail::tvec4<T> higherMultiple
GLM_FUNC_QUALIFIER detail::tvec4<T> higherMultiple
(
detail::tvec4<T> const & Source,
detail::tvec4<T> const & Multiple
@ -104,7 +104,7 @@ namespace multiple
// lowerMultiple
template <typename genType>
inline genType lowerMultiple
GLM_FUNC_QUALIFIER genType lowerMultiple
(
genType const & Source,
genType const & Multiple
@ -115,7 +115,7 @@ namespace multiple
}
template <>
inline detail::thalf lowerMultiple
GLM_FUNC_QUALIFIER detail::thalf lowerMultiple
(
detail::thalf const & Source,
detail::thalf const & Multiple
@ -126,7 +126,7 @@ namespace multiple
}
template <>
inline float lowerMultiple
GLM_FUNC_QUALIFIER float lowerMultiple
(
float const & Source,
float const & Multiple
@ -137,7 +137,7 @@ namespace multiple
}
template <>
inline double lowerMultiple
GLM_FUNC_QUALIFIER double lowerMultiple
(
double const & Source,
double const & Multiple
@ -148,7 +148,7 @@ namespace multiple
}
template <typename T>
inline detail::tvec2<T> lowerMultiple
GLM_FUNC_QUALIFIER detail::tvec2<T> lowerMultiple
(
detail::tvec2<T> const & Source,
detail::tvec2<T> const & Multiple
@ -161,7 +161,7 @@ namespace multiple
}
template <typename T>
inline detail::tvec3<T> lowerMultiple
GLM_FUNC_QUALIFIER detail::tvec3<T> lowerMultiple
(
detail::tvec3<T> const & Source,
detail::tvec3<T> const & Multiple
@ -174,7 +174,7 @@ namespace multiple
}
template <typename T>
inline detail::tvec4<T> lowerMultiple
GLM_FUNC_QUALIFIER detail::tvec4<T> lowerMultiple
(
detail::tvec4<T> const & Source,
detail::tvec4<T> const & Multiple

View File

@ -12,35 +12,35 @@ namespace gtx{
namespace norm
{
template <typename T>
inline T length2(
GLM_FUNC_QUALIFIER T length2(
const T x)
{
return x * x;
}
template <typename T>
inline T length2(
GLM_FUNC_QUALIFIER T length2(
const detail::tvec2<T>& x)
{
return dot(x, x);
}
template <typename T>
inline T length2(
GLM_FUNC_QUALIFIER T length2(
const detail::tvec3<T>& x)
{
return dot(x, x);
}
template <typename T>
inline T length2(
GLM_FUNC_QUALIFIER T length2(
const detail::tvec4<T>& x)
{
return dot(x, x);
}
template <typename T>
inline T length2(
GLM_FUNC_QUALIFIER T length2(
const detail::tquat<T>& q)
{
return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;
@ -79,7 +79,7 @@ namespace norm
}
template <typename T>
inline T l1Norm(
GLM_FUNC_QUALIFIER T l1Norm(
const detail::tvec3<T>& a,
const detail::tvec3<T>& b)
{
@ -87,14 +87,14 @@ namespace norm
}
template <typename T>
inline T l1Norm(
GLM_FUNC_QUALIFIER T l1Norm(
const detail::tvec3<T>& v)
{
return abs(v.x) + abs(v.y) + abs(v.z);
}
template <typename T>
inline T l2Norm(
GLM_FUNC_QUALIFIER T l2Norm(
const detail::tvec3<T>& a,
const detail::tvec3<T>& b)
{
@ -102,14 +102,14 @@ namespace norm
}
template <typename T>
inline T l2Norm(
GLM_FUNC_QUALIFIER T l2Norm(
const detail::tvec3<T>& v)
{
return length(v);
}
template <typename T>
inline T lxNorm(
GLM_FUNC_QUALIFIER T lxNorm(
const detail::tvec3<T>& x,
const detail::tvec3<T>& y,
unsigned int Depth)
@ -118,7 +118,7 @@ namespace norm
}
template <typename T>
inline T lxNorm(
GLM_FUNC_QUALIFIER T lxNorm(
const detail::tvec3<T>& v,
unsigned int Depth)
{

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace normal{
template <typename T>
inline detail::tvec3<T> triangleNormal
GLM_FUNC_QUALIFIER detail::tvec3<T> triangleNormal
(
detail::tvec3<T> const & p1,
detail::tvec3<T> const & p2,

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace normalize_dot{
template <typename genType>
inline genType normalizeDot
GLM_FUNC_QUALIFIER genType normalizeDot
(
genType const & x,
genType const & y
@ -25,7 +25,7 @@ inline genType normalizeDot
}
template <typename valType>
inline valType normalizeDot
GLM_FUNC_QUALIFIER valType normalizeDot
(
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y
@ -38,7 +38,7 @@ inline valType normalizeDot
}
template <typename valType>
inline valType normalizeDot
GLM_FUNC_QUALIFIER valType normalizeDot
(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y
@ -51,7 +51,7 @@ inline valType normalizeDot
}
template <typename valType>
inline valType normalizeDot
GLM_FUNC_QUALIFIER valType normalizeDot
(
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y
@ -64,7 +64,7 @@ inline valType normalizeDot
}
template <typename genType>
inline genType fastNormalizeDot
GLM_FUNC_QUALIFIER genType fastNormalizeDot
(
genType const & x,
genType const & y
@ -77,7 +77,7 @@ inline genType fastNormalizeDot
}
template <typename valType>
inline valType fastNormalizeDot
GLM_FUNC_QUALIFIER valType fastNormalizeDot
(
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y
@ -90,7 +90,7 @@ inline valType fastNormalizeDot
}
template <typename valType>
inline valType fastNormalizeDot
GLM_FUNC_QUALIFIER valType fastNormalizeDot
(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y
@ -103,7 +103,7 @@ inline valType fastNormalizeDot
}
template <typename valType>
inline valType fastNormalizeDot
GLM_FUNC_QUALIFIER valType fastNormalizeDot
(
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y

View File

@ -12,36 +12,36 @@ namespace gtx{
namespace optimum_pow{
template <typename genType>
inline genType pow2(const genType& x)
GLM_FUNC_QUALIFIER genType pow2(const genType& x)
{
return x * x;
}
template <typename genType>
inline genType pow3(const genType& x)
GLM_FUNC_QUALIFIER genType pow3(const genType& x)
{
return x * x * x;
}
template <typename genType>
inline genType pow4(const genType& x)
GLM_FUNC_QUALIFIER genType pow4(const genType& x)
{
return x * x * x * x;
}
inline bool powOfTwo(int x)
GLM_FUNC_QUALIFIER bool powOfTwo(int x)
{
return !(x & (x - 1));
}
inline detail::tvec2<bool> powOfTwo(const detail::tvec2<int>& x)
GLM_FUNC_QUALIFIER detail::tvec2<bool> powOfTwo(const detail::tvec2<int>& x)
{
return detail::tvec2<bool>(
powOfTwo(x.x),
powOfTwo(x.y));
}
inline detail::tvec3<bool> powOfTwo(const detail::tvec3<int>& x)
GLM_FUNC_QUALIFIER detail::tvec3<bool> powOfTwo(const detail::tvec3<int>& x)
{
return detail::tvec3<bool>(
powOfTwo(x.x),
@ -49,7 +49,7 @@ namespace optimum_pow{
powOfTwo(x.z));
}
inline detail::tvec4<bool> powOfTwo(const detail::tvec4<int>& x)
GLM_FUNC_QUALIFIER detail::tvec4<bool> powOfTwo(const detail::tvec4<int>& x)
{
return detail::tvec4<bool>(
powOfTwo(x.x),

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace orthonormalize{
template <typename T>
inline detail::tmat3x3<T> orthonormalize
GLM_FUNC_QUALIFIER detail::tmat3x3<T> orthonormalize
(
const detail::tmat3x3<T>& m
)
@ -34,7 +34,7 @@ namespace orthonormalize{
}
template <typename T>
inline detail::tvec3<T> orthonormalize
GLM_FUNC_QUALIFIER detail::tvec3<T> orthonormalize
(
const detail::tvec3<T>& x,
const detail::tvec3<T>& y

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace perpendicular{
template <typename T>
inline detail::tvec2<T> perp(
GLM_FUNC_QUALIFIER detail::tvec2<T> perp(
detail::tvec2<T> const & x,
detail::tvec2<T> const & Normal)
{
@ -20,7 +20,7 @@ inline detail::tvec2<T> perp(
}
template <typename T>
inline detail::tvec3<T> perp(
GLM_FUNC_QUALIFIER detail::tvec3<T> perp(
detail::tvec3<T> const & x,
detail::tvec3<T> const & Normal)
{
@ -28,7 +28,7 @@ inline detail::tvec3<T> perp(
}
template <typename T>
inline detail::tvec4<T> perp(
GLM_FUNC_QUALIFIER detail::tvec4<T> perp(
detail::tvec4<T> const & x,
detail::tvec4<T> const & Normal)
{

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace polar_coordinates
{
template <typename T>
inline detail::tvec3<T> polar(
GLM_FUNC_QUALIFIER detail::tvec3<T> polar(
const detail::tvec3<T>& euclidean)
{
T length = length(euclidean);
@ -26,7 +26,7 @@ namespace polar_coordinates
}
template <typename T>
inline detail::tvec3<T> euclidean(
GLM_FUNC_QUALIFIER detail::tvec3<T> euclidean(
const detail::tvec3<T>& polar)
{
T latitude = radians(polar.x);

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace projection{
template <typename T>
inline detail::tvec2<T> proj(
GLM_FUNC_QUALIFIER detail::tvec2<T> proj(
detail::tvec2<T> const & x,
detail::tvec2<T> const & Normal)
{
@ -20,7 +20,7 @@ inline detail::tvec2<T> proj(
}
template <typename T>
inline detail::tvec3<T> proj(
GLM_FUNC_QUALIFIER detail::tvec3<T> proj(
detail::tvec3<T> const & x,
detail::tvec3<T> const & Normal)
{
@ -28,7 +28,7 @@ inline detail::tvec3<T> proj(
}
template <typename T>
inline detail::tvec4<T> proj(
GLM_FUNC_QUALIFIER detail::tvec4<T> proj(
detail::tvec4<T> const & x,
detail::tvec4<T> const & Normal)
{

View File

@ -14,7 +14,7 @@ namespace gtx{
namespace quaternion
{
template <typename valType>
inline detail::tvec3<valType> cross
GLM_FUNC_QUALIFIER detail::tvec3<valType> cross
(
detail::tvec3<valType> const & v,
detail::tquat<valType> const & q
@ -24,7 +24,7 @@ namespace quaternion
}
template <typename valType>
inline detail::tvec3<valType> cross
GLM_FUNC_QUALIFIER detail::tvec3<valType> cross
(
detail::tquat<valType> const & q,
detail::tvec3<valType> const & v
@ -34,7 +34,7 @@ namespace quaternion
}
template <typename T>
inline detail::tquat<T> squad
GLM_FUNC_QUALIFIER detail::tquat<T> squad
(
detail::tquat<T> const & q1,
detail::tquat<T> const & q2,
@ -46,7 +46,7 @@ namespace quaternion
}
template <typename T>
inline detail::tquat<T> intermediate
GLM_FUNC_QUALIFIER detail::tquat<T> intermediate
(
detail::tquat<T> const & prev,
detail::tquat<T> const & curr,
@ -58,7 +58,7 @@ namespace quaternion
}
template <typename T>
inline detail::tquat<T> exp
GLM_FUNC_QUALIFIER detail::tquat<T> exp
(
detail::tquat<T> const & q,
T const & exponent
@ -71,7 +71,7 @@ namespace quaternion
}
template <typename T>
inline detail::tquat<T> log
GLM_FUNC_QUALIFIER detail::tquat<T> log
(
detail::tquat<T> const & q
)
@ -95,7 +95,7 @@ namespace quaternion
}
template <typename T>
inline detail::tquat<T> pow
GLM_FUNC_QUALIFIER detail::tquat<T> pow
(
detail::tquat<T> const & x,
T const & y
@ -114,7 +114,7 @@ namespace quaternion
}
//template <typename T>
//inline detail::tquat<T> sqrt
//GLM_FUNC_QUALIFIER detail::tquat<T> sqrt
//(
// detail::tquat<T> const & q
//)
@ -124,7 +124,7 @@ namespace quaternion
//}
template <typename T>
inline detail::tvec3<T> rotate
GLM_FUNC_QUALIFIER detail::tvec3<T> rotate
(
detail::tquat<T> const & q,
detail::tvec3<T> const & v
@ -134,7 +134,7 @@ namespace quaternion
}
template <typename T>
inline detail::tvec4<T> rotate
GLM_FUNC_QUALIFIER detail::tvec4<T> rotate
(
detail::tquat<T> const & q,
detail::tvec4<T> const & v
@ -144,7 +144,7 @@ namespace quaternion
}
template <typename T>
inline T angle
GLM_FUNC_QUALIFIER T angle
(
detail::tquat<T> const & x
)
@ -153,7 +153,7 @@ namespace quaternion
}
template <typename T>
inline detail::tvec3<T> axis
GLM_FUNC_QUALIFIER detail::tvec3<T> axis
(
detail::tquat<T> const & x
)
@ -166,7 +166,7 @@ namespace quaternion
}
template <typename valType>
inline detail::tquat<valType> angleAxis
GLM_FUNC_QUALIFIER detail::tquat<valType> angleAxis
(
valType const & angle,
valType const & x,
@ -178,7 +178,7 @@ namespace quaternion
}
template <typename valType>
inline detail::tquat<valType> angleAxis
GLM_FUNC_QUALIFIER detail::tquat<valType> angleAxis
(
valType const & angle,
detail::tvec3<valType> const & v
@ -198,7 +198,7 @@ namespace quaternion
}
template <typename T>
inline T extractRealComponent
GLM_FUNC_QUALIFIER T extractRealComponent
(
detail::tquat<T> const & q
)
@ -211,7 +211,7 @@ namespace quaternion
}
template <typename valType>
inline valType roll
GLM_FUNC_QUALIFIER valType roll
(
detail::tquat<valType> const & q
)
@ -220,7 +220,7 @@ namespace quaternion
}
template <typename valType>
inline valType pitch
GLM_FUNC_QUALIFIER valType pitch
(
detail::tquat<valType> const & q
)
@ -229,7 +229,7 @@ namespace quaternion
}
template <typename valType>
inline valType yaw
GLM_FUNC_QUALIFIER valType yaw
(
detail::tquat<valType> const & q
)
@ -238,7 +238,7 @@ namespace quaternion
}
template <typename valType>
inline detail::tvec3<valType> eularAngles
GLM_FUNC_QUALIFIER detail::tvec3<valType> eularAngles
(
detail::tquat<valType> const & x
)

View File

@ -15,7 +15,7 @@ namespace gtx{
namespace random
{
template <>
inline float signedRand1()
GLM_FUNC_QUALIFIER float signedRand1()
{
#if(GLM_COMPILER & GLM_COMPILER_VC)
#define RAND_SHIFT_NUM 5
@ -26,13 +26,13 @@ namespace random
}
template <>
inline double signedRand1()
GLM_FUNC_QUALIFIER double signedRand1()
{
return double(signedRand1<float>());
}
template <typename T>
inline detail::tvec2<T> signedRand2()
GLM_FUNC_QUALIFIER detail::tvec2<T> signedRand2()
{
return detail::tvec2<T>(
signedRand1<float>(),
@ -40,7 +40,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> signedRand3()
GLM_FUNC_QUALIFIER detail::tvec3<T> signedRand3()
{
return detail::tvec3<T>(
signedRand1<float>(),
@ -49,7 +49,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<T> signedRand4()
GLM_FUNC_QUALIFIER detail::tvec4<T> signedRand4()
{
return detail::tvec4<T>(
signedRand1<float>(),
@ -59,14 +59,14 @@ namespace random
}
template <typename T>
inline detail::tvec2<T> normalizedRand2()
GLM_FUNC_QUALIFIER detail::tvec2<T> normalizedRand2()
{
T a = compRand1<T>(T(0), T(6.283185307179586476925286766559f));
return detail::tvec2<T>(cos(a), sin(a));
}
template <typename T>
inline detail::tvec3<T> normalizedRand3()
GLM_FUNC_QUALIFIER detail::tvec3<T> normalizedRand3()
{
T z = compRand1(T(-1), T(1));
T a = compRand1(T(0), T(6.283185307179586476925286766559f));
@ -80,7 +80,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> normalizedRand3(
GLM_FUNC_QUALIFIER detail::tvec3<T> normalizedRand3(
T Min,
T Max)
{
@ -88,32 +88,32 @@ namespace random
}
template <>
inline float compRand1()
GLM_FUNC_QUALIFIER float compRand1()
{
return float(std::rand()) / float(RAND_MAX);
}
template <>
inline double compRand1()
GLM_FUNC_QUALIFIER double compRand1()
{
return double(std::rand()) / double(RAND_MAX);
}
inline glm::half compRand1(
GLM_FUNC_QUALIFIER glm::half compRand1(
glm::half Min,
glm::half Max)
{
return compRand1<glm::half>() * (Max - Min) + Min;
}
inline float compRand1(
GLM_FUNC_QUALIFIER float compRand1(
float Min,
float Max)
{
return compRand1<float>() * (Max - Min) + Min;
}
inline double compRand1(
GLM_FUNC_QUALIFIER double compRand1(
double Min,
double Max)
{
@ -121,7 +121,7 @@ namespace random
}
template <typename T>
inline T compRand1(
GLM_FUNC_QUALIFIER T compRand1(
T Min,
T Max)
{
@ -129,7 +129,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<T> compRand2(
GLM_FUNC_QUALIFIER detail::tvec2<T> compRand2(
T Min,
T Max)
{
@ -139,7 +139,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> compRand3(
GLM_FUNC_QUALIFIER detail::tvec3<T> compRand3(
T Min,
T Max)
{
@ -150,7 +150,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<T> compRand4(
GLM_FUNC_QUALIFIER detail::tvec4<T> compRand4(
T Min,
T Max)
{
@ -162,7 +162,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<T> compRand2(
GLM_FUNC_QUALIFIER detail::tvec2<T> compRand2(
T Min,
const detail::tvec2<T>& Max)
{
@ -172,7 +172,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> compRand3(
GLM_FUNC_QUALIFIER detail::tvec3<T> compRand3(
T Min,
const detail::tvec3<T>& Max)
{
@ -183,7 +183,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<T> compRand4(
GLM_FUNC_QUALIFIER detail::tvec4<T> compRand4(
T Min,
const detail::tvec4<T>& Max)
{
@ -195,7 +195,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<T> compRand2(
GLM_FUNC_QUALIFIER detail::tvec2<T> compRand2(
const detail::tvec2<T>& Min,
T Max)
{
@ -205,7 +205,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> compRand3(
GLM_FUNC_QUALIFIER detail::tvec3<T> compRand3(
const detail::tvec3<T>& Min,
T Max)
{
@ -216,7 +216,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<T> compRand4(
GLM_FUNC_QUALIFIER detail::tvec4<T> compRand4(
const detail::tvec4<T>& Min,
T Max)
{
@ -228,7 +228,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<T> compRand2(
GLM_FUNC_QUALIFIER detail::tvec2<T> compRand2(
const detail::tvec2<T>& Min,
const detail::tvec2<T>& Max)
{
@ -238,7 +238,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> compRand3(
GLM_FUNC_QUALIFIER detail::tvec3<T> compRand3(
const detail::tvec3<T>& Min,
const detail::tvec3<T>& Max)
{
@ -249,7 +249,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<T> compRand4(
GLM_FUNC_QUALIFIER detail::tvec4<T> compRand4(
const detail::tvec4<T>& Min,
const detail::tvec4<T>& Max)
{
@ -261,7 +261,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<float> vecRand2()
GLM_FUNC_QUALIFIER detail::tvec2<float> vecRand2()
{
detail::tvec2<float> result(float(0));
do
@ -273,7 +273,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<double> vecRand2()
GLM_FUNC_QUALIFIER detail::tvec2<double> vecRand2()
{
detail::tvec2<double> result(double(0));
do
@ -285,7 +285,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<T> vecRand2(
GLM_FUNC_QUALIFIER detail::tvec2<T> vecRand2(
T MinRadius,
T MaxRadius)
{
@ -305,7 +305,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> vecRand3()
GLM_FUNC_QUALIFIER detail::tvec3<T> vecRand3()
{
detail::tvec3<T> Result(T(0));
do
@ -318,7 +318,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> vecRand3(
GLM_FUNC_QUALIFIER detail::tvec3<T> vecRand3(
T MinRadius,
T MaxRadius)
{
@ -338,7 +338,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<float> vecRand4()
GLM_FUNC_QUALIFIER detail::tvec4<float> vecRand4()
{
detail::tvec4<float> result(float(0));
do
@ -350,7 +350,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<double> vecRand4()
GLM_FUNC_QUALIFIER detail::tvec4<double> vecRand4()
{
detail::tvec4<double> result(double(0));
do
@ -362,7 +362,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<T> vecRand4(
GLM_FUNC_QUALIFIER detail::tvec4<T> vecRand4(
T MinRadius,
T MaxRadius)
{
@ -382,7 +382,7 @@ namespace random
}
template <typename T>
inline T gaussRand1(
GLM_FUNC_QUALIFIER T gaussRand1(
T mean,
T std_deviation)
{
@ -400,7 +400,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<T> gaussRand2(
GLM_FUNC_QUALIFIER detail::tvec2<T> gaussRand2(
T mean,
T std_deviation)
{
@ -410,7 +410,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> gaussRand3(
GLM_FUNC_QUALIFIER detail::tvec3<T> gaussRand3(
T mean,
T std_deviation)
{
@ -421,7 +421,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<T> gaussRand4(
GLM_FUNC_QUALIFIER detail::tvec4<T> gaussRand4(
T mean,
T std_deviation)
{
@ -433,7 +433,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<T> gaussRand2(
GLM_FUNC_QUALIFIER detail::tvec2<T> gaussRand2(
T mean,
const detail::tvec2<T>& std_deviation)
{
@ -443,7 +443,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> gaussRand3(
GLM_FUNC_QUALIFIER detail::tvec3<T> gaussRand3(
T mean,
const detail::tvec3<T>& std_deviation)
{
@ -454,7 +454,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<T> gaussRand4(
GLM_FUNC_QUALIFIER detail::tvec4<T> gaussRand4(
T mean,
const detail::tvec4<T>& std_deviation)
{
@ -466,7 +466,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<T> gaussRand2(
GLM_FUNC_QUALIFIER detail::tvec2<T> gaussRand2(
const detail::tvec2<T>& mean,
T std_deviation)
{
@ -476,7 +476,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> gaussRand3(
GLM_FUNC_QUALIFIER detail::tvec3<T> gaussRand3(
const detail::tvec3<T>& mean,
T std_deviation)
{
@ -487,7 +487,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<T> gaussRand4(
GLM_FUNC_QUALIFIER detail::tvec4<T> gaussRand4(
const detail::tvec4<T>& mean,
T std_deviation)
{
@ -499,7 +499,7 @@ namespace random
}
template <typename T>
inline detail::tvec2<T> gaussRand2(
GLM_FUNC_QUALIFIER detail::tvec2<T> gaussRand2(
const detail::tvec2<T>& mean,
const detail::tvec2<T>& std_deviation)
{
@ -509,7 +509,7 @@ namespace random
}
template <typename T>
inline detail::tvec3<T> gaussRand3(
GLM_FUNC_QUALIFIER detail::tvec3<T> gaussRand3(
const detail::tvec3<T>& mean,
const detail::tvec3<T>& std_deviation)
{
@ -520,7 +520,7 @@ namespace random
}
template <typename T>
inline detail::tvec4<T> gaussRand4(
GLM_FUNC_QUALIFIER detail::tvec4<T> gaussRand4(
const detail::tvec4<T>& mean,
const detail::tvec4<T>& std_deviation)
{

View File

@ -13,7 +13,7 @@ namespace reciprocal{
// sec
template <typename genType>
inline genType sec
GLM_FUNC_QUALIFIER genType sec
(
genType const & angle
)
@ -24,7 +24,7 @@ inline genType sec
}
template <typename valType>
inline detail::tvec2<valType> sec
GLM_FUNC_QUALIFIER detail::tvec2<valType> sec
(
detail::tvec2<valType> const & angle
)
@ -35,7 +35,7 @@ inline detail::tvec2<valType> sec
}
template <typename valType>
inline detail::tvec3<valType> sec
GLM_FUNC_QUALIFIER detail::tvec3<valType> sec
(
detail::tvec3<valType> const & angle
)
@ -47,7 +47,7 @@ inline detail::tvec3<valType> sec
}
template <typename valType>
inline detail::tvec4<valType> sec
GLM_FUNC_QUALIFIER detail::tvec4<valType> sec
(
detail::tvec4<valType> const & angle
)
@ -61,7 +61,7 @@ inline detail::tvec4<valType> sec
// csc
template <typename genType>
inline genType csc
GLM_FUNC_QUALIFIER genType csc
(
genType const & angle
)
@ -72,7 +72,7 @@ inline genType csc
}
template <typename valType>
inline detail::tvec2<valType> csc
GLM_FUNC_QUALIFIER detail::tvec2<valType> csc
(
detail::tvec2<valType> const & angle
)
@ -83,7 +83,7 @@ inline detail::tvec2<valType> csc
}
template <typename valType>
inline detail::tvec3<valType> csc
GLM_FUNC_QUALIFIER detail::tvec3<valType> csc
(
detail::tvec3<valType> const & angle
)
@ -95,7 +95,7 @@ inline detail::tvec3<valType> csc
}
template <typename valType>
inline detail::tvec4<valType> csc
GLM_FUNC_QUALIFIER detail::tvec4<valType> csc
(
detail::tvec4<valType> const & angle
)
@ -109,7 +109,7 @@ inline detail::tvec4<valType> csc
// cot
template <typename genType>
inline genType cot
GLM_FUNC_QUALIFIER genType cot
(
genType const & angle
)
@ -120,7 +120,7 @@ inline genType cot
}
template <typename valType>
inline detail::tvec2<valType> cot
GLM_FUNC_QUALIFIER detail::tvec2<valType> cot
(
detail::tvec2<valType> const & angle
)
@ -131,7 +131,7 @@ inline detail::tvec2<valType> cot
}
template <typename valType>
inline detail::tvec3<valType> cot
GLM_FUNC_QUALIFIER detail::tvec3<valType> cot
(
detail::tvec3<valType> const & angle
)
@ -143,7 +143,7 @@ inline detail::tvec3<valType> cot
}
template <typename valType>
inline detail::tvec4<valType> cot
GLM_FUNC_QUALIFIER detail::tvec4<valType> cot
(
detail::tvec4<valType> const & angle
)
@ -157,7 +157,7 @@ inline detail::tvec4<valType> cot
// asec
template <typename genType>
inline genType asec
GLM_FUNC_QUALIFIER genType asec
(
genType const & x
)
@ -168,7 +168,7 @@ inline genType asec
}
template <typename valType>
inline detail::tvec2<valType> asec
GLM_FUNC_QUALIFIER detail::tvec2<valType> asec
(
detail::tvec2<valType> const & x
)
@ -179,7 +179,7 @@ inline detail::tvec2<valType> asec
}
template <typename valType>
inline detail::tvec3<valType> asec
GLM_FUNC_QUALIFIER detail::tvec3<valType> asec
(
detail::tvec3<valType> const & x
)
@ -191,7 +191,7 @@ inline detail::tvec3<valType> asec
}
template <typename valType>
inline detail::tvec4<valType> asec
GLM_FUNC_QUALIFIER detail::tvec4<valType> asec
(
detail::tvec4<valType> const & x
)
@ -205,7 +205,7 @@ inline detail::tvec4<valType> asec
// acsc
template <typename genType>
inline genType acsc
GLM_FUNC_QUALIFIER genType acsc
(
genType const & x
)
@ -216,7 +216,7 @@ inline genType acsc
}
template <typename valType>
inline detail::tvec2<valType> acsc
GLM_FUNC_QUALIFIER detail::tvec2<valType> acsc
(
detail::tvec2<valType> const & x
)
@ -227,7 +227,7 @@ inline detail::tvec2<valType> acsc
}
template <typename valType>
inline detail::tvec3<valType> acsc
GLM_FUNC_QUALIFIER detail::tvec3<valType> acsc
(
detail::tvec3<valType> const & x
)
@ -239,7 +239,7 @@ inline detail::tvec3<valType> acsc
}
template <typename valType>
inline detail::tvec4<valType> acsc
GLM_FUNC_QUALIFIER detail::tvec4<valType> acsc
(
detail::tvec4<valType> const & x
)
@ -253,7 +253,7 @@ inline detail::tvec4<valType> acsc
// acot
template <typename genType>
inline genType acot
GLM_FUNC_QUALIFIER genType acot
(
genType const & x
)
@ -265,7 +265,7 @@ inline genType acot
}
template <typename valType>
inline detail::tvec2<valType> acot
GLM_FUNC_QUALIFIER detail::tvec2<valType> acot
(
detail::tvec2<valType> const & x
)
@ -276,7 +276,7 @@ inline detail::tvec2<valType> acot
}
template <typename valType>
inline detail::tvec3<valType> acot
GLM_FUNC_QUALIFIER detail::tvec3<valType> acot
(
detail::tvec3<valType> const & x
)
@ -288,7 +288,7 @@ inline detail::tvec3<valType> acot
}
template <typename valType>
inline detail::tvec4<valType> acot
GLM_FUNC_QUALIFIER detail::tvec4<valType> acot
(
detail::tvec4<valType> const & x
)
@ -302,7 +302,7 @@ inline detail::tvec4<valType> acot
// sech
template <typename genType>
inline genType sech
GLM_FUNC_QUALIFIER genType sech
(
genType const & angle
)
@ -313,7 +313,7 @@ inline genType sech
}
template <typename valType>
inline detail::tvec2<valType> sech
GLM_FUNC_QUALIFIER detail::tvec2<valType> sech
(
detail::tvec2<valType> const & angle
)
@ -324,7 +324,7 @@ inline detail::tvec2<valType> sech
}
template <typename valType>
inline detail::tvec3<valType> sech
GLM_FUNC_QUALIFIER detail::tvec3<valType> sech
(
detail::tvec3<valType> const & angle
)
@ -336,7 +336,7 @@ inline detail::tvec3<valType> sech
}
template <typename valType>
inline detail::tvec4<valType> sech
GLM_FUNC_QUALIFIER detail::tvec4<valType> sech
(
detail::tvec4<valType> const & angle
)
@ -350,7 +350,7 @@ inline detail::tvec4<valType> sech
// csch
template <typename genType>
inline genType csch
GLM_FUNC_QUALIFIER genType csch
(
genType const & angle
)
@ -361,7 +361,7 @@ inline genType csch
}
template <typename valType>
inline detail::tvec2<valType> csch
GLM_FUNC_QUALIFIER detail::tvec2<valType> csch
(
detail::tvec2<valType> const & angle
)
@ -372,7 +372,7 @@ inline detail::tvec2<valType> csch
}
template <typename valType>
inline detail::tvec3<valType> csch
GLM_FUNC_QUALIFIER detail::tvec3<valType> csch
(
detail::tvec3<valType> const & angle
)
@ -384,7 +384,7 @@ inline detail::tvec3<valType> csch
}
template <typename valType>
inline detail::tvec4<valType> csch
GLM_FUNC_QUALIFIER detail::tvec4<valType> csch
(
detail::tvec4<valType> const & angle
)
@ -398,7 +398,7 @@ inline detail::tvec4<valType> csch
// coth
template <typename genType>
inline genType coth
GLM_FUNC_QUALIFIER genType coth
(
genType const & angle
)
@ -409,7 +409,7 @@ inline genType coth
}
template <typename valType>
inline detail::tvec2<valType> coth
GLM_FUNC_QUALIFIER detail::tvec2<valType> coth
(
detail::tvec2<valType> const & angle
)
@ -420,7 +420,7 @@ inline detail::tvec2<valType> coth
}
template <typename valType>
inline detail::tvec3<valType> coth
GLM_FUNC_QUALIFIER detail::tvec3<valType> coth
(
detail::tvec3<valType> const & angle
)
@ -432,7 +432,7 @@ inline detail::tvec3<valType> coth
}
template <typename valType>
inline detail::tvec4<valType> coth
GLM_FUNC_QUALIFIER detail::tvec4<valType> coth
(
detail::tvec4<valType> const & angle
)
@ -446,7 +446,7 @@ inline detail::tvec4<valType> coth
// asech
template <typename genType>
inline genType asech
GLM_FUNC_QUALIFIER genType asech
(
genType const & x
)
@ -457,7 +457,7 @@ inline genType asech
}
template <typename valType>
inline detail::tvec2<valType> asech
GLM_FUNC_QUALIFIER detail::tvec2<valType> asech
(
detail::tvec2<valType> const & x
)
@ -468,7 +468,7 @@ inline detail::tvec2<valType> asech
}
template <typename valType>
inline detail::tvec3<valType> asech
GLM_FUNC_QUALIFIER detail::tvec3<valType> asech
(
detail::tvec3<valType> const & x
)
@ -480,7 +480,7 @@ inline detail::tvec3<valType> asech
}
template <typename valType>
inline detail::tvec4<valType> asech
GLM_FUNC_QUALIFIER detail::tvec4<valType> asech
(
detail::tvec4<valType> const & x
)
@ -494,7 +494,7 @@ inline detail::tvec4<valType> asech
// acsch
template <typename genType>
inline genType acsch
GLM_FUNC_QUALIFIER genType acsch
(
genType const & x
)
@ -505,7 +505,7 @@ inline genType acsch
}
template <typename valType>
inline detail::tvec2<valType> acsch
GLM_FUNC_QUALIFIER detail::tvec2<valType> acsch
(
detail::tvec2<valType> const & x
)
@ -516,7 +516,7 @@ inline detail::tvec2<valType> acsch
}
template <typename valType>
inline detail::tvec3<valType> acsch
GLM_FUNC_QUALIFIER detail::tvec3<valType> acsch
(
detail::tvec3<valType> const & x
)
@ -528,7 +528,7 @@ inline detail::tvec3<valType> acsch
}
template <typename valType>
inline detail::tvec4<valType> acsch
GLM_FUNC_QUALIFIER detail::tvec4<valType> acsch
(
detail::tvec4<valType> const & x
)
@ -542,7 +542,7 @@ inline detail::tvec4<valType> acsch
// acoth
template <typename genType>
inline genType acoth
GLM_FUNC_QUALIFIER genType acoth
(
genType const & x
)
@ -553,7 +553,7 @@ inline genType acoth
}
template <typename valType>
inline detail::tvec2<valType> acoth
GLM_FUNC_QUALIFIER detail::tvec2<valType> acoth
(
detail::tvec2<valType> const & x
)
@ -564,7 +564,7 @@ inline detail::tvec2<valType> acoth
}
template <typename valType>
inline detail::tvec3<valType> acoth
GLM_FUNC_QUALIFIER detail::tvec3<valType> acoth
(
detail::tvec3<valType> const & x
)
@ -576,7 +576,7 @@ inline detail::tvec3<valType> acoth
}
template <typename valType>
inline detail::tvec4<valType> acoth
GLM_FUNC_QUALIFIER detail::tvec4<valType> acoth
(
detail::tvec4<valType> const & x
)

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace rotate_vector
{
template <typename T>
inline detail::tvec2<T> rotate(
GLM_FUNC_QUALIFIER detail::tvec2<T> rotate(
const detail::tvec2<T>& v,
T angle)
{
@ -25,7 +25,7 @@ namespace rotate_vector
}
template <typename T>
inline detail::tvec3<T> rotate(
GLM_FUNC_QUALIFIER detail::tvec3<T> rotate(
const detail::tvec3<T>& v, T angle,
const detail::tvec3<T>& normal)
{
@ -33,7 +33,7 @@ namespace rotate_vector
}
/*
template <typename T>
inline detail::tvec3<T> rotateGTX(const detail::tvec3<T>& x, T angle, const detail::tvec3<T>& normal)
GLM_FUNC_QUALIFIER detail::tvec3<T> rotateGTX(const detail::tvec3<T>& x, T angle, const detail::tvec3<T>& normal)
{
const T Cos = cos(radians(angle));
const T Sin = sin(radians(angle));
@ -41,7 +41,7 @@ namespace rotate_vector
}
*/
template <typename T>
inline detail::tvec4<T> rotate(
GLM_FUNC_QUALIFIER detail::tvec4<T> rotate(
const detail::tvec4<T>& v,
T angle,
const detail::tvec3<T>& normal)
@ -50,7 +50,7 @@ namespace rotate_vector
}
template <typename T>
inline detail::tvec3<T> rotateX(
GLM_FUNC_QUALIFIER detail::tvec3<T> rotateX(
const detail::tvec3<T>& v,
T angle)
{
@ -63,7 +63,7 @@ namespace rotate_vector
}
template <typename T>
inline detail::tvec3<T> rotateY(
GLM_FUNC_QUALIFIER detail::tvec3<T> rotateY(
const detail::tvec3<T>& v,
T angle)
{
@ -76,7 +76,7 @@ namespace rotate_vector
}
template <typename T>
inline detail::tvec3<T> rotateZ(
GLM_FUNC_QUALIFIER detail::tvec3<T> rotateZ(
const detail::tvec3<T>& v,
T angle)
{
@ -89,7 +89,7 @@ namespace rotate_vector
}
template <typename T>
inline detail::tvec4<T> rotateX(
GLM_FUNC_QUALIFIER detail::tvec4<T> rotateX(
const detail::tvec4<T>& v,
T angle)
{
@ -102,7 +102,7 @@ namespace rotate_vector
}
template <typename T>
inline detail::tvec4<T> rotateY(
GLM_FUNC_QUALIFIER detail::tvec4<T> rotateY(
const detail::tvec4<T>& v,
T angle)
{
@ -115,7 +115,7 @@ namespace rotate_vector
}
template <typename T>
inline detail::tvec4<T> rotateZ(
GLM_FUNC_QUALIFIER detail::tvec4<T> rotateZ(
const detail::tvec4<T>& v,
T angle)
{
@ -128,7 +128,7 @@ namespace rotate_vector
}
template <typename T>
inline detail::tmat4x4<T> orientation(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> orientation(
const detail::tvec3<T>& Normal,
const detail::tvec3<T>& Up)
{

View File

@ -10,25 +10,25 @@
namespace glm{
namespace detail
{
inline fmat4x4SIMD::size_type fmat4x4SIMD::value_size()
GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::value_size()
{
return sizeof(value_type);
}
inline fmat4x4SIMD::size_type fmat4x4SIMD::col_size()
GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::col_size()
{
return 4;
}
inline fmat4x4SIMD::size_type fmat4x4SIMD::row_size()
GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::row_size()
{
return 4;
}
inline fmat4x4SIMD::fmat4x4SIMD()
GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD()
{}
inline fmat4x4SIMD::fmat4x4SIMD(float const & s)
GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s)
{
this->Data[0] = fvec4SIMD(s, 0, 0, 0);
this->Data[1] = fvec4SIMD(0, s, 0, 0);
@ -36,7 +36,7 @@ namespace detail
this->Data[3] = fvec4SIMD(0, 0, 0, s);
}
inline fmat4x4SIMD::fmat4x4SIMD
GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD
(
float const & x0, float const & y0, float const & z0, float const & w0,
float const & x1, float const & y1, float const & z1, float const & w1,
@ -50,7 +50,7 @@ namespace detail
this->Data[3] = fvec4SIMD(x3, y3, z3, w3);
}
inline fmat4x4SIMD::fmat4x4SIMD
GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD
(
fvec4SIMD const & v0,
fvec4SIMD const & v1,
@ -64,7 +64,7 @@ namespace detail
this->Data[3] = v3;
}
inline fmat4x4SIMD::fmat4x4SIMD
GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD
(
tmat4x4<float> const & m
)
@ -78,7 +78,7 @@ namespace detail
//////////////////////////////////////
// Accesses
inline fvec4SIMD & fmat4x4SIMD::operator[]
GLM_FUNC_QUALIFIER fvec4SIMD & fmat4x4SIMD::operator[]
(
fmat4x4SIMD::size_type i
)
@ -90,7 +90,7 @@ namespace detail
return this->Data[i];
}
inline fvec4SIMD const & fmat4x4SIMD::operator[]
GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[]
(
fmat4x4SIMD::size_type i
) const
@ -105,7 +105,7 @@ namespace detail
//////////////////////////////////////////////////////////////
// mat4 operators
inline fmat4x4SIMD& fmat4x4SIMD::operator=
GLM_FUNC_QUALIFIER fmat4x4SIMD& fmat4x4SIMD::operator=
(
fmat4x4SIMD const & m
)
@ -117,7 +117,7 @@ namespace detail
return *this;
}
inline fmat4x4SIMD & fmat4x4SIMD::operator+=
GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+=
(
fmat4x4SIMD const & m
)
@ -129,7 +129,7 @@ namespace detail
return *this;
}
inline fmat4x4SIMD & fmat4x4SIMD::operator-=
GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-=
(
fmat4x4SIMD const & m
)
@ -142,7 +142,7 @@ namespace detail
return *this;
}
inline fmat4x4SIMD & fmat4x4SIMD::operator*=
GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*=
(
fmat4x4SIMD const & m
)
@ -151,7 +151,7 @@ namespace detail
return *this;
}
inline fmat4x4SIMD & fmat4x4SIMD::operator/=
GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/=
(
fmat4x4SIMD const & m
)
@ -162,7 +162,7 @@ namespace detail
return *this;
}
inline fmat4x4SIMD & fmat4x4SIMD::operator+=
GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+=
(
float const & s
)
@ -175,7 +175,7 @@ namespace detail
return *this;
}
inline fmat4x4SIMD & fmat4x4SIMD::operator-=
GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-=
(
float const & s
)
@ -188,7 +188,7 @@ namespace detail
return *this;
}
inline fmat4x4SIMD & fmat4x4SIMD::operator*=
GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*=
(
float const & s
)
@ -201,7 +201,7 @@ namespace detail
return *this;
}
inline fmat4x4SIMD & fmat4x4SIMD::operator/=
GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/=
(
float const & s
)
@ -214,7 +214,7 @@ namespace detail
return *this;
}
inline fmat4x4SIMD & fmat4x4SIMD::operator++ ()
GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator++ ()
{
this->Data[0].Data = _mm_add_ps(this->Data[0].Data, one);
this->Data[1].Data = _mm_add_ps(this->Data[1].Data, one);
@ -223,7 +223,7 @@ namespace detail
return *this;
}
inline fmat4x4SIMD & fmat4x4SIMD::operator-- ()
GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-- ()
{
this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, one);
this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, one);
@ -237,7 +237,7 @@ namespace detail
namespace gtx{
namespace simd_mat4
{
inline detail::tmat4x4<float> mat4_cast
GLM_FUNC_QUALIFIER detail::tmat4x4<float> mat4_cast
(
detail::fmat4x4SIMD const & x
)
@ -250,7 +250,7 @@ namespace simd_mat4
return Result;
}
inline detail::fmat4x4SIMD matrixCompMult
GLM_FUNC_QUALIFIER detail::fmat4x4SIMD matrixCompMult
(
detail::fmat4x4SIMD const & x,
detail::fmat4x4SIMD const & y
@ -264,7 +264,7 @@ namespace simd_mat4
return result;
}
inline detail::fmat4x4SIMD outerProduct
GLM_FUNC_QUALIFIER detail::fmat4x4SIMD outerProduct
(
detail::fvec4SIMD const & c,
detail::fvec4SIMD const & r
@ -283,21 +283,21 @@ namespace simd_mat4
return result;
}
inline detail::fmat4x4SIMD transpose(detail::fmat4x4SIMD const & m)
GLM_FUNC_QUALIFIER detail::fmat4x4SIMD transpose(detail::fmat4x4SIMD const & m)
{
detail::fmat4x4SIMD result;
detail::sse_transpose_ps(&m[0].Data, &result[0].Data);
return result;
}
inline float determinant(detail::fmat4x4SIMD const & m)
GLM_FUNC_QUALIFIER float determinant(detail::fmat4x4SIMD const & m)
{
float Result;
_mm_store_ss(&Result, detail::sse_det_ps(&m[0].Data));
return Result;
}
inline detail::fmat4x4SIMD inverse(detail::fmat4x4SIMD const & m)
GLM_FUNC_QUALIFIER detail::fmat4x4SIMD inverse(detail::fmat4x4SIMD const & m)
{
detail::fmat4x4SIMD result;
detail::sse_inverse_ps(&m[0].Data, &result[0].Data);

View File

@ -20,34 +20,34 @@ namespace glm
//////////////////////////////////////
// Implicit basic constructors
inline fvec4SIMD::fvec4SIMD()
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD()
{}
inline fvec4SIMD::fvec4SIMD(__m128 const & Data) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) :
Data(Data)
{}
inline fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) :
Data(v.Data)
{}
inline fvec4SIMD::fvec4SIMD(tvec4<float> const & v) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(tvec4<float> const & v) :
Data(_mm_set_ps(v.w, v.z, v.y, v.x))
{}
//////////////////////////////////////
// Explicit basic constructors
inline fvec4SIMD::fvec4SIMD(float const & s) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s) :
Data(_mm_set1_ps(s))
{}
inline fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) :
// Data(_mm_setr_ps(x, y, z, w))
Data(_mm_set_ps(w, z, y, x))
{}
/*
inline fvec4SIMD::fvec4SIMD(float const v[4]) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const v[4]) :
Data(_mm_load_ps(v))
{}
*/
@ -59,98 +59,98 @@ namespace glm
//////////////////////////////////////
// Convertion vector constructors
inline fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) :
Data(_mm_set_ps(s2, s1, v.y, v.x))
{}
inline fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) :
Data(_mm_set_ps(s2, v.y, v.x, s1))
{}
inline fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) :
Data(_mm_set_ps(v.y, v.x, s2, s1))
{}
inline fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) :
Data(_mm_set_ps(s, v.z, v.y, v.x))
{}
inline fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) :
Data(_mm_set_ps(v.z, v.y, v.x, s))
{}
inline fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) :
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) :
Data(_mm_set_ps(v2.y, v2.x, v1.y, v1.x))
{}
//inline fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) :
//GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) :
// Data(_mm_cvtepi32_ps(v.Data))
//{}
//////////////////////////////////////
// Unary arithmetic operators
inline fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v)
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v)
{
this->Data = v.Data;
return *this;
}
inline fvec4SIMD& fvec4SIMD::operator+=(float const & s)
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(float const & s)
{
this->Data = _mm_add_ps(Data, _mm_set_ps1(s));
return *this;
}
inline fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v)
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v)
{
this->Data = _mm_add_ps(this->Data , v.Data);
return *this;
}
inline fvec4SIMD& fvec4SIMD::operator-=(float const & s)
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(float const & s)
{
this->Data = _mm_sub_ps(Data, _mm_set_ps1(s));
return *this;
}
inline fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v)
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v)
{
this->Data = _mm_sub_ps(this->Data , v.Data);
return *this;
}
inline fvec4SIMD& fvec4SIMD::operator*=(float const & s)
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(float const & s)
{
this->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s));
return *this;
}
inline fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v)
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v)
{
this->Data = _mm_mul_ps(this->Data , v.Data);
return *this;
}
inline fvec4SIMD& fvec4SIMD::operator/=(float const & s)
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(float const & s)
{
this->Data = _mm_div_ps(Data, _mm_set1_ps(s));
return *this;
}
inline fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v)
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v)
{
this->Data = _mm_div_ps(this->Data , v.Data);
return *this;
}
inline fvec4SIMD& fvec4SIMD::operator++()
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator++()
{
this->Data = _mm_add_ps(this->Data , glm::detail::one);
return *this;
}
inline fvec4SIMD& fvec4SIMD::operator--()
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator--()
{
this->Data = _mm_sub_ps(this->Data, glm::detail::one);
return *this;
@ -160,7 +160,7 @@ namespace glm
// Swizzle operators
template <comp X, comp Y, comp Z, comp W>
inline fvec4SIMD fvec4SIMD::swizzle() const
GLM_FUNC_QUALIFIER fvec4SIMD fvec4SIMD::swizzle() const
{
__m128 Data = _mm_shuffle_ps(
this->Data, this->Data,
@ -169,7 +169,7 @@ namespace glm
}
template <comp X, comp Y, comp Z, comp W>
inline fvec4SIMD& fvec4SIMD::swizzle()
GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::swizzle()
{
this->Data = _mm_shuffle_ps(
this->Data, this->Data,
@ -178,89 +178,89 @@ namespace glm
}
// operator+
inline fvec4SIMD operator+ (fvec4SIMD const & v, float s)
GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v, float s)
{
return fvec4SIMD(_mm_add_ps(v.Data, _mm_set1_ps(s)));
}
inline fvec4SIMD operator+ (float s, fvec4SIMD const & v)
GLM_FUNC_QUALIFIER fvec4SIMD operator+ (float s, fvec4SIMD const & v)
{
return fvec4SIMD(_mm_add_ps(_mm_set1_ps(s), v.Data));
}
inline fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2)
GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2)
{
return fvec4SIMD(_mm_add_ps(v1.Data, v2.Data));
}
//operator-
inline fvec4SIMD operator- (fvec4SIMD const & v, float s)
GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v, float s)
{
return fvec4SIMD(_mm_sub_ps(v.Data, _mm_set1_ps(s)));
}
inline fvec4SIMD operator- (float s, fvec4SIMD const & v)
GLM_FUNC_QUALIFIER fvec4SIMD operator- (float s, fvec4SIMD const & v)
{
return fvec4SIMD(_mm_sub_ps(_mm_set1_ps(s), v.Data));
}
inline fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2)
GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2)
{
return fvec4SIMD(_mm_sub_ps(v1.Data, v2.Data));
}
//operator*
inline fvec4SIMD operator* (fvec4SIMD const & v, float s)
GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, float s)
{
__m128 par0 = v.Data;
__m128 par1 = _mm_set1_ps(s);
return fvec4SIMD(_mm_mul_ps(par0, par1));
}
inline fvec4SIMD operator* (float s, fvec4SIMD const & v)
GLM_FUNC_QUALIFIER fvec4SIMD operator* (float s, fvec4SIMD const & v)
{
__m128 par0 = _mm_set1_ps(s);
__m128 par1 = v.Data;
return fvec4SIMD(_mm_mul_ps(par0, par1));
}
inline fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2)
GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2)
{
return fvec4SIMD(_mm_mul_ps(v1.Data, v2.Data));
}
//operator/
inline fvec4SIMD operator/ (fvec4SIMD const & v, float s)
GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v, float s)
{
__m128 par0 = v.Data;
__m128 par1 = _mm_set1_ps(s);
return fvec4SIMD(_mm_div_ps(par0, par1));
}
inline fvec4SIMD operator/ (float s, fvec4SIMD const & v)
GLM_FUNC_QUALIFIER fvec4SIMD operator/ (float s, fvec4SIMD const & v)
{
__m128 par0 = _mm_set1_ps(s);
__m128 par1 = v.Data;
return fvec4SIMD(_mm_div_ps(par0, par1));
}
inline fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2)
GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2)
{
return fvec4SIMD(_mm_div_ps(v1.Data, v2.Data));
}
// Unary constant operators
inline fvec4SIMD operator- (fvec4SIMD const & v)
GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v)
{
return fvec4SIMD(_mm_sub_ps(_mm_setzero_ps(), v.Data));
}
inline fvec4SIMD operator++ (fvec4SIMD const & v, int)
GLM_FUNC_QUALIFIER fvec4SIMD operator++ (fvec4SIMD const & v, int)
{
return fvec4SIMD(_mm_add_ps(v.Data, glm::detail::one));
}
inline fvec4SIMD operator-- (fvec4SIMD const & v, int)
GLM_FUNC_QUALIFIER fvec4SIMD operator-- (fvec4SIMD const & v, int)
{
return fvec4SIMD(_mm_sub_ps(v.Data, glm::detail::one));
}
@ -270,7 +270,7 @@ namespace glm
namespace gtx{
namespace simd_vec4
{
inline detail::tvec4<float> vec4_cast
GLM_FUNC_QUALIFIER detail::tvec4<float> vec4_cast
(
detail::fvec4SIMD const & x
)
@ -285,7 +285,7 @@ namespace glm
//{
// return max(-a, a);
//}
inline detail::fvec4SIMD abs
GLM_FUNC_QUALIFIER detail::fvec4SIMD abs
(
detail::fvec4SIMD const & x
)
@ -293,7 +293,7 @@ namespace glm
return detail::sse_abs_ps(x.Data);
}
inline detail::fvec4SIMD sign
GLM_FUNC_QUALIFIER detail::fvec4SIMD sign
(
detail::fvec4SIMD const & x
)
@ -301,7 +301,7 @@ namespace glm
return detail::sse_sgn_ps(x.Data);
}
inline detail::fvec4SIMD floor
GLM_FUNC_QUALIFIER detail::fvec4SIMD floor
(
detail::fvec4SIMD const & x
)
@ -309,7 +309,7 @@ namespace glm
return detail::sse_flr_ps(x.Data);
}
inline detail::fvec4SIMD trunc
GLM_FUNC_QUALIFIER detail::fvec4SIMD trunc
(
detail::fvec4SIMD const & x
)
@ -327,7 +327,7 @@ namespace glm
return _mm_or_ps(And0, And1);
}
inline detail::fvec4SIMD round
GLM_FUNC_QUALIFIER detail::fvec4SIMD round
(
detail::fvec4SIMD const & x
)
@ -335,7 +335,7 @@ namespace glm
return detail::sse_rnd_ps(x.Data);
}
//inline detail::fvec4SIMD roundEven
//GLM_FUNC_QUALIFIER detail::fvec4SIMD roundEven
//(
// detail::fvec4SIMD const & x
//)
@ -343,7 +343,7 @@ namespace glm
//}
inline detail::fvec4SIMD ceil
GLM_FUNC_QUALIFIER detail::fvec4SIMD ceil
(
detail::fvec4SIMD const & x
)
@ -351,7 +351,7 @@ namespace glm
return detail::sse_ceil_ps(x.Data);
}
inline detail::fvec4SIMD fract
GLM_FUNC_QUALIFIER detail::fvec4SIMD fract
(
detail::fvec4SIMD const & x
)
@ -359,7 +359,7 @@ namespace glm
return detail::sse_frc_ps(x.Data);
}
inline detail::fvec4SIMD mod
GLM_FUNC_QUALIFIER detail::fvec4SIMD mod
(
detail::fvec4SIMD const & x,
detail::fvec4SIMD const & y
@ -368,7 +368,7 @@ namespace glm
return detail::sse_mod_ps(x.Data, y.Data);
}
inline detail::fvec4SIMD mod
GLM_FUNC_QUALIFIER detail::fvec4SIMD mod
(
detail::fvec4SIMD const & x,
float const & y
@ -377,7 +377,7 @@ namespace glm
return detail::sse_mod_ps(x.Data, _mm_set1_ps(y));
}
//inline detail::fvec4SIMD modf
//GLM_FUNC_QUALIFIER detail::fvec4SIMD modf
//(
// detail::fvec4SIMD const & x,
// detail::fvec4SIMD & i
@ -386,7 +386,7 @@ namespace glm
//}
inline detail::fvec4SIMD min
GLM_FUNC_QUALIFIER detail::fvec4SIMD min
(
detail::fvec4SIMD const & x,
detail::fvec4SIMD const & y
@ -395,7 +395,7 @@ namespace glm
return _mm_min_ps(x.Data, y.Data);
}
inline detail::fvec4SIMD min
GLM_FUNC_QUALIFIER detail::fvec4SIMD min
(
detail::fvec4SIMD const & x,
float const & y
@ -404,7 +404,7 @@ namespace glm
return _mm_min_ps(x.Data, _mm_set1_ps(y));
}
inline detail::fvec4SIMD max
GLM_FUNC_QUALIFIER detail::fvec4SIMD max
(
detail::fvec4SIMD const & x,
detail::fvec4SIMD const & y
@ -413,7 +413,7 @@ namespace glm
return _mm_max_ps(x.Data, y.Data);
}
inline detail::fvec4SIMD max
GLM_FUNC_QUALIFIER detail::fvec4SIMD max
(
detail::fvec4SIMD const & x,
float const & y
@ -422,7 +422,7 @@ namespace glm
return _mm_max_ps(x.Data, _mm_set1_ps(y));
}
inline detail::fvec4SIMD clamp
GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp
(
detail::fvec4SIMD const & x,
detail::fvec4SIMD const & minVal,
@ -432,7 +432,7 @@ namespace glm
return detail::sse_clp_ps(x.Data, minVal.Data, maxVal.Data);
}
inline detail::fvec4SIMD clamp
GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp
(
detail::fvec4SIMD const & x,
float const & minVal,
@ -442,7 +442,7 @@ namespace glm
return detail::sse_clp_ps(x.Data, _mm_set1_ps(minVal), _mm_set1_ps(maxVal));
}
inline detail::fvec4SIMD mix
GLM_FUNC_QUALIFIER detail::fvec4SIMD mix
(
detail::fvec4SIMD const & x,
detail::fvec4SIMD const & y,
@ -454,7 +454,7 @@ namespace glm
return _mm_mul_ps(x.Data, Mul0);
}
inline detail::fvec4SIMD step
GLM_FUNC_QUALIFIER detail::fvec4SIMD step
(
detail::fvec4SIMD const & edge,
detail::fvec4SIMD const & x
@ -464,7 +464,7 @@ namespace glm
return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one);
}
inline detail::fvec4SIMD step
GLM_FUNC_QUALIFIER detail::fvec4SIMD step
(
float const & edge,
detail::fvec4SIMD const & x
@ -474,7 +474,7 @@ namespace glm
return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one);
}
inline detail::fvec4SIMD smoothstep
GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep
(
detail::fvec4SIMD const & edge0,
detail::fvec4SIMD const & edge1,
@ -484,7 +484,7 @@ namespace glm
return detail::sse_ssp_ps(edge0.Data, edge1.Data, x.Data);
}
inline detail::fvec4SIMD smoothstep
GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep
(
float const & edge0,
float const & edge1,
@ -494,17 +494,17 @@ namespace glm
return detail::sse_ssp_ps(_mm_set1_ps(edge0), _mm_set1_ps(edge1), x.Data);
}
//inline bvec4 isnan(detail::fvec4SIMD const & x)
//GLM_FUNC_QUALIFIER bvec4 isnan(detail::fvec4SIMD const & x)
//{
//}
//inline bvec4 isinf(detail::fvec4SIMD const & x)
//GLM_FUNC_QUALIFIER bvec4 isinf(detail::fvec4SIMD const & x)
//{
//}
//inline detail::ivec4SIMD floatBitsToInt
//GLM_FUNC_QUALIFIER detail::ivec4SIMD floatBitsToInt
//(
// detail::fvec4SIMD const & value
//)
@ -512,7 +512,7 @@ namespace glm
//}
//inline detail::fvec4SIMD intBitsToFloat
//GLM_FUNC_QUALIFIER detail::fvec4SIMD intBitsToFloat
//(
// detail::ivec4SIMD const & value
//)
@ -520,7 +520,7 @@ namespace glm
//}
inline detail::fvec4SIMD fma
GLM_FUNC_QUALIFIER detail::fvec4SIMD fma
(
detail::fvec4SIMD const & a,
detail::fvec4SIMD const & b,
@ -530,7 +530,7 @@ namespace glm
return _mm_add_ps(_mm_mul_ps(a.Data, b.Data), c.Data);
}
inline float length
GLM_FUNC_QUALIFIER float length
(
detail::fvec4SIMD const & x
)
@ -542,7 +542,7 @@ namespace glm
return Result;
}
inline float fastLength
GLM_FUNC_QUALIFIER float fastLength
(
detail::fvec4SIMD const & x
)
@ -554,7 +554,7 @@ namespace glm
return Result;
}
inline float niceLength
GLM_FUNC_QUALIFIER float niceLength
(
detail::fvec4SIMD const & x
)
@ -566,7 +566,7 @@ namespace glm
return Result;
}
inline detail::fvec4SIMD length4
GLM_FUNC_QUALIFIER detail::fvec4SIMD length4
(
detail::fvec4SIMD const & x
)
@ -574,7 +574,7 @@ namespace glm
return sqrt(dot4(x, x));
}
inline detail::fvec4SIMD fastLength4
GLM_FUNC_QUALIFIER detail::fvec4SIMD fastLength4
(
detail::fvec4SIMD const & x
)
@ -582,7 +582,7 @@ namespace glm
return fastSqrt(dot4(x, x));
}
inline detail::fvec4SIMD niceLength4
GLM_FUNC_QUALIFIER detail::fvec4SIMD niceLength4
(
detail::fvec4SIMD const & x
)
@ -590,7 +590,7 @@ namespace glm
return niceSqrt(dot4(x, x));
}
inline float distance
GLM_FUNC_QUALIFIER float distance
(
detail::fvec4SIMD const & p0,
detail::fvec4SIMD const & p1
@ -601,7 +601,7 @@ namespace glm
return Result;
}
inline detail::fvec4SIMD distance4
GLM_FUNC_QUALIFIER detail::fvec4SIMD distance4
(
detail::fvec4SIMD const & p0,
detail::fvec4SIMD const & p1
@ -610,7 +610,7 @@ namespace glm
return detail::sse_dst_ps(p0.Data, p1.Data);
}
inline float dot
GLM_FUNC_QUALIFIER float dot
(
detail::fvec4SIMD const & x,
detail::fvec4SIMD const & y
@ -621,7 +621,7 @@ namespace glm
return Result;
}
inline detail::fvec4SIMD dot4
GLM_FUNC_QUALIFIER detail::fvec4SIMD dot4
(
detail::fvec4SIMD const & x,
detail::fvec4SIMD const & y
@ -630,7 +630,7 @@ namespace glm
return detail::sse_dot_ps(x.Data, y.Data);
}
inline detail::fvec4SIMD cross
GLM_FUNC_QUALIFIER detail::fvec4SIMD cross
(
detail::fvec4SIMD const & x,
detail::fvec4SIMD const & y
@ -639,7 +639,7 @@ namespace glm
return detail::sse_xpd_ps(x.Data, y.Data);
}
inline detail::fvec4SIMD normalize
GLM_FUNC_QUALIFIER detail::fvec4SIMD normalize
(
detail::fvec4SIMD const & x
)
@ -650,7 +650,7 @@ namespace glm
return mul0;
}
inline detail::fvec4SIMD fastNormalize
GLM_FUNC_QUALIFIER detail::fvec4SIMD fastNormalize
(
detail::fvec4SIMD const & x
)
@ -661,7 +661,7 @@ namespace glm
return mul0;
}
inline detail::fvec4SIMD faceforward
GLM_FUNC_QUALIFIER detail::fvec4SIMD faceforward
(
detail::fvec4SIMD const & N,
detail::fvec4SIMD const & I,
@ -671,7 +671,7 @@ namespace glm
return detail::sse_ffd_ps(N.Data, I.Data, Nref.Data);
}
inline detail::fvec4SIMD reflect
GLM_FUNC_QUALIFIER detail::fvec4SIMD reflect
(
detail::fvec4SIMD const & I,
detail::fvec4SIMD const & N
@ -680,7 +680,7 @@ namespace glm
return detail::sse_rfe_ps(I.Data, N.Data);
}
inline detail::fvec4SIMD refract
GLM_FUNC_QUALIFIER detail::fvec4SIMD refract
(
detail::fvec4SIMD const & I,
detail::fvec4SIMD const & N,
@ -690,24 +690,24 @@ namespace glm
return detail::sse_rfa_ps(I.Data, N.Data, _mm_set1_ps(eta));
}
inline detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x)
GLM_FUNC_QUALIFIER detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x)
{
return _mm_mul_ps(inversesqrt(x.Data).Data, x.Data);
}
inline detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x)
GLM_FUNC_QUALIFIER detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x)
{
return _mm_sqrt_ps(x.Data);
}
inline detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x)
GLM_FUNC_QUALIFIER detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x)
{
return _mm_mul_ps(fastInversesqrt(x.Data).Data, x.Data);
}
// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration
// By Elan Ruskin, http://assemblyrequired.crashworks.org/
inline detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x)
GLM_FUNC_QUALIFIER detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x)
{
GLM_ALIGN(4) static const __m128 three = {3, 3, 3, 3}; // aligned consts for fast load
GLM_ALIGN(4) static const __m128 half = {0.5,0.5,0.5,0.5};
@ -718,7 +718,7 @@ namespace glm
return _mm_mul_ps(halfrecip, threeminus_xrr);
}
inline detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x)
GLM_FUNC_QUALIFIER detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x)
{
return _mm_rsqrt_ps(x.Data);
}

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace spline
{
template <typename genType>
inline genType catmullRom
GLM_FUNC_QUALIFIER genType catmullRom
(
genType const & v1,
genType const & v2,
@ -35,7 +35,7 @@ namespace spline
}
template <typename genType>
inline genType hermite
GLM_FUNC_QUALIFIER genType hermite
(
genType const & v1,
genType const & t1,
@ -57,7 +57,7 @@ namespace spline
}
template <typename genType>
inline genType cubic
GLM_FUNC_QUALIFIER genType cubic
(
genType const & v1,
genType const & v2,

View File

@ -13,7 +13,7 @@
namespace glm{
namespace detail
{
inline std::string format(const char* msg, ...)
GLM_FUNC_QUALIFIER std::string format(const char* msg, ...)
{
const int STRING_BUFFER = 4096;
char text[STRING_BUFFER];
@ -39,27 +39,27 @@ namespace string_cast
////////////////////////////////
// Scalars
inline std::string to_string(detail::thalf const & x)
GLM_FUNC_QUALIFIER std::string to_string(detail::thalf const & x)
{
return detail::format("half(%f)", float(x));
}
inline std::string to_string(float x)
GLM_FUNC_QUALIFIER std::string to_string(float x)
{
return detail::format("float(%f)", x);
}
inline std::string to_string(double x)
GLM_FUNC_QUALIFIER std::string to_string(double x)
{
return detail::format("double(%f)", x);
}
inline std::string to_string(int x)
GLM_FUNC_QUALIFIER std::string to_string(int x)
{
return detail::format("int(%d)", x);
}
inline std::string to_string(unsigned int x)
GLM_FUNC_QUALIFIER std::string to_string(unsigned int x)
{
return detail::format("uint(%d)", x);
}
@ -67,7 +67,7 @@ namespace string_cast
////////////////////////////////
// Bool vectors
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec2<bool> const & v
)
@ -77,7 +77,7 @@ namespace string_cast
v.y ? detail::True : detail::False);
}
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec3<bool> const & v
)
@ -88,7 +88,7 @@ namespace string_cast
v.z ? detail::True : detail::False);
}
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec4<bool> const & v
)
@ -104,7 +104,7 @@ namespace string_cast
// Half vectors
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec2<detail::thalf> const & v
)
@ -113,7 +113,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec3<detail::thalf> const & v
)
@ -122,7 +122,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec4<detail::thalf> const & v
)
@ -134,7 +134,7 @@ namespace string_cast
// Float vectors
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec2<float> const & v
)
@ -143,7 +143,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec3<float> const & v
)
@ -152,7 +152,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec4<float> const & v
)
@ -164,7 +164,7 @@ namespace string_cast
// Double vectors
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec2<double> const & v
)
@ -173,7 +173,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec3<double> const & v
)
@ -182,7 +182,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec4<double> const & v
)
@ -194,7 +194,7 @@ namespace string_cast
// Int vectors
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec2<int> const & v
)
@ -203,7 +203,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec3<int> const & v
)
@ -212,7 +212,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec4<int> const & v
)
@ -224,7 +224,7 @@ namespace string_cast
// Unsigned int vectors
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec2<unsigned int> const & v
)
@ -233,7 +233,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec3<unsigned int> const & v
)
@ -242,7 +242,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tvec4<unsigned int> const & v
)
@ -254,7 +254,7 @@ namespace string_cast
// Half matrices
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x2<detail::thalf> const & m
)
@ -266,7 +266,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x3<detail::thalf> const & m
)
@ -278,7 +278,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x4<detail::thalf> const & m
)
@ -290,7 +290,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x2<detail::thalf> const & m
)
@ -303,7 +303,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x3<detail::thalf> const & m
)
@ -316,7 +316,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x4<detail::thalf> const & m
)
@ -329,7 +329,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x2<detail::thalf> const & m
)
@ -343,7 +343,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x3<detail::thalf> const & m
)
@ -357,7 +357,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x4<detail::thalf> const & m
)
@ -374,7 +374,7 @@ namespace string_cast
// Float matrices
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x2<float> const & x
)
@ -385,7 +385,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x3<float> const & x
)
@ -396,7 +396,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x4<float> const & x
)
@ -407,7 +407,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x2<float> const & x
)
@ -419,7 +419,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x3<float> const & x
)
@ -431,7 +431,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x4<float> const & x
)
@ -443,7 +443,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x2<float> const & x
)
@ -456,7 +456,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x3<float> const & x
)
@ -469,7 +469,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x4<float> const & x
)
@ -485,7 +485,7 @@ namespace string_cast
// Double matrices
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x2<double> const & x
)
@ -496,7 +496,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x3<double> const & x
)
@ -507,7 +507,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat2x4<double> const & x
)
@ -518,7 +518,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x2<double> const & x
)
@ -530,7 +530,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x3<double> const & x
)
@ -542,7 +542,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat3x4<double> const & x
)
@ -554,7 +554,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x2<double> const & x
)
@ -567,7 +567,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x3<double> const & x
)
@ -580,7 +580,7 @@ namespace string_cast
}
template <>
inline std::string to_string
GLM_FUNC_QUALIFIER std::string to_string
(
detail::tmat4x4<double> const & x
)

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace transform
{
template <typename T>
inline detail::tmat4x4<T> translate(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> translate(
T x, T y, T z)
{
return gtc::matrix_transform::translate(
@ -21,7 +21,7 @@ namespace transform
}
template <typename T>
inline detail::tmat4x4<T> translate(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> translate(
detail::tmat4x4<T> const & m,
T x, T y, T z)
{
@ -30,7 +30,7 @@ namespace transform
}
template <typename T>
inline detail::tmat4x4<T> translate(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> translate(
detail::tvec3<T> const & v)
{
return gtc::matrix_transform::translate(
@ -38,7 +38,7 @@ namespace transform
}
template <typename T>
inline detail::tmat4x4<T> rotate(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> rotate(
T angle,
T x, T y, T z)
{
@ -47,7 +47,7 @@ namespace transform
}
template <typename T>
inline detail::tmat4x4<T> rotate(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> rotate(
T angle,
detail::tvec3<T> const & v)
{
@ -56,7 +56,7 @@ namespace transform
}
template <typename T>
inline detail::tmat4x4<T> rotate(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> rotate(
detail::tmat4x4<T> const & m,
T angle,
T x, T y, T z)
@ -66,14 +66,14 @@ namespace transform
}
template <typename T>
inline detail::tmat4x4<T> scale(T x, T y, T z)
GLM_FUNC_QUALIFIER detail::tmat4x4<T> scale(T x, T y, T z)
{
return gtc::matrix_transform::scale(
detail::tmat4x4<T>(1), detail::tvec3<T>(x, y, z));
}
template <typename T>
inline detail::tmat4x4<T> scale(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> scale(
detail::tmat4x4<T> const & m,
T x, T y, T z)
{
@ -82,7 +82,7 @@ namespace transform
}
template <typename T>
inline detail::tmat4x4<T> scale(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> scale(
detail::tvec3<T> const & v)
{
return gtc::matrix_transform::scale(

View File

@ -75,7 +75,7 @@ namespace glm
T x,
T y);
//template <typename T> inline detail::tmat4x4<T> shear(const detail::tmat4x4<T> & m, shearPlane, planePoint, angle)
//template <typename T> GLM_FUNC_QUALIFIER detail::tmat4x4<T> shear(const detail::tmat4x4<T> & m, shearPlane, planePoint, angle)
// Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
// - dot(PointOnPlane, normal) * OnPlaneVector 1

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace transform2
{
template <typename T>
inline detail::tmat3x3<T> shearX2D(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> shearX2D(
const detail::tmat3x3<T>& m,
T s)
{
@ -22,7 +22,7 @@ namespace transform2
}
template <typename T>
inline detail::tmat3x3<T> shearY2D(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> shearY2D(
const detail::tmat3x3<T>& m,
T s)
{
@ -32,7 +32,7 @@ namespace transform2
}
template <typename T>
inline detail::tmat4x4<T> shearX3D(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> shearX3D(
const detail::tmat4x4<T>& m,
T s,
T t)
@ -44,7 +44,7 @@ namespace transform2
}
template <typename T>
inline detail::tmat4x4<T> shearY3D(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> shearY3D(
const detail::tmat4x4<T>& m,
T s,
T t)
@ -56,7 +56,7 @@ namespace transform2
}
template <typename T>
inline detail::tmat4x4<T> shearZ3D(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> shearZ3D(
const detail::tmat4x4<T>& m,
T s,
T t)
@ -68,7 +68,7 @@ namespace transform2
}
template <typename T>
inline detail::tmat3x3<T> reflect2D(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> reflect2D(
const detail::tmat3x3<T>& m,
const detail::tvec3<T>& normal)
{
@ -81,7 +81,7 @@ namespace transform2
}
template <typename T>
inline detail::tmat4x4<T> reflect3D(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> reflect3D(
const detail::tmat4x4<T>& m,
const detail::tvec3<T>& normal)
{
@ -101,7 +101,7 @@ namespace transform2
}
template <typename T>
inline detail::tmat3x3<T> proj2D(
GLM_FUNC_QUALIFIER detail::tmat3x3<T> proj2D(
const detail::tmat3x3<T>& m,
const detail::tvec3<T>& normal)
{
@ -114,7 +114,7 @@ namespace transform2
}
template <typename T>
inline detail::tmat4x4<T> proj3D(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> proj3D(
const detail::tmat4x4<T>& m,
const detail::tvec3<T>& normal)
{
@ -132,7 +132,7 @@ namespace transform2
}
template <typename T>
inline detail::tmat4x4<T> scaleBias(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> scaleBias(
T scale,
T bias)
{
@ -145,7 +145,7 @@ namespace transform2
}
template <typename T>
inline detail::tmat4x4<T> scaleBias(
GLM_FUNC_QUALIFIER detail::tmat4x4<T> scaleBias(
const detail::tmat4x4<T>& m,
T scale,
T bias)

View File

@ -11,7 +11,7 @@ namespace glm{
namespace gtx{
namespace unsigned_int{
inline uint pow(uint x, uint y)
GLM_FUNC_QUALIFIER uint pow(uint x, uint y)
{
uint result = x;
for(uint i = 1; i < y; ++i)
@ -19,7 +19,7 @@ inline uint pow(uint x, uint y)
return result;
}
inline uint sqrt(uint x)
GLM_FUNC_QUALIFIER uint sqrt(uint x)
{
if(x <= 1) return x;
@ -35,7 +35,7 @@ inline uint sqrt(uint x)
return CurrentAnswer;
}
inline uint mod(uint x, uint y)
GLM_FUNC_QUALIFIER uint mod(uint x, uint y)
{
return x - y * (x / y);
}

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace vector_access{
template <typename valType>
inline void set
GLM_FUNC_QUALIFIER void set
(
detail::tvec2<valType>& v,
valType const & x,
@ -24,7 +24,7 @@ inline void set
}
template <typename valType>
inline void set
GLM_FUNC_QUALIFIER void set
(
detail::tvec3<valType>& v,
valType const & x,
@ -38,7 +38,7 @@ inline void set
}
template <typename valType>
inline void set
GLM_FUNC_QUALIFIER void set
(
detail::tvec4<valType>& v,
valType const & x,

View File

@ -12,7 +12,7 @@ namespace gtx{
namespace vector_angle{
template <typename genType>
inline typename genType::value_type angle
GLM_FUNC_QUALIFIER typename genType::value_type angle
(
genType const & x,
genType const & y
@ -23,7 +23,7 @@ inline typename genType::value_type angle
//! \todo epsilon is hard coded to 0.01
template <typename valType>
inline valType orientedAngle
GLM_FUNC_QUALIFIER valType orientedAngle
(
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y
@ -41,7 +41,7 @@ inline valType orientedAngle
//! \todo epsilon is hard coded to 0.01
template <typename valType>
inline valType orientedAngle
GLM_FUNC_QUALIFIER valType orientedAngle
(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y
@ -57,7 +57,7 @@ inline valType orientedAngle
//! \todo epsilon is hard coded to 0.01
template <typename valType>
inline valType orientedAngle
GLM_FUNC_QUALIFIER valType orientedAngle
(
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y
@ -72,7 +72,7 @@ inline valType orientedAngle
}
template <typename valType>
inline valType orientedAngleFromRef
GLM_FUNC_QUALIFIER valType orientedAngleFromRef
(
detail::tvec2<valType> const & x,
detail::tvec2<valType> const & y,
@ -88,7 +88,7 @@ inline valType orientedAngleFromRef
}
template <typename valType>
inline valType orientedAngleFromRef
GLM_FUNC_QUALIFIER valType orientedAngleFromRef
(
detail::tvec3<valType> const & x,
detail::tvec3<valType> const & y,
@ -104,7 +104,7 @@ inline valType orientedAngleFromRef
}
template <typename valType>
inline valType orientedAngleFromRef
GLM_FUNC_QUALIFIER valType orientedAngleFromRef
(
detail::tvec4<valType> const & x,
detail::tvec4<valType> const & y,

View File

@ -17,7 +17,7 @@ namespace gtx{
namespace vector_query
{
template <typename T>
inline bool areCollinear
GLM_FUNC_QUALIFIER bool areCollinear
(
detail::tvec2<T> const & v0,
detail::tvec2<T> const & v1,
@ -28,7 +28,7 @@ namespace vector_query
}
template <typename T>
inline bool areCollinear
GLM_FUNC_QUALIFIER bool areCollinear
(
detail::tvec3<T> const & v0,
detail::tvec3<T> const & v1,
@ -39,7 +39,7 @@ namespace vector_query
}
template <typename T>
inline bool areCollinear
GLM_FUNC_QUALIFIER bool areCollinear
(
detail::tvec4<T> const & v0,
detail::tvec4<T> const & v1,
@ -50,7 +50,7 @@ namespace vector_query
}
template <typename genType>
inline bool areOpposite
GLM_FUNC_QUALIFIER bool areOpposite
(
genType const & v0,
genType const & v1,
@ -62,7 +62,7 @@ namespace vector_query
}
template <typename genType>
inline bool areOrthogonal
GLM_FUNC_QUALIFIER bool areOrthogonal
(
genType const & v0,
genType const & v1,
@ -77,7 +77,7 @@ namespace vector_query
}
template <typename genType>
inline bool isNormalized
GLM_FUNC_QUALIFIER bool isNormalized
(
genType const & v,
typename genType::value_type const & epsilon
@ -87,7 +87,7 @@ namespace vector_query
}
template <typename genType>
inline bool isNull
GLM_FUNC_QUALIFIER bool isNull
(
genType const & v,
typename genType::value_type const & epsilon
@ -97,7 +97,7 @@ namespace vector_query
}
template <typename T>
inline bool isCompNull
GLM_FUNC_QUALIFIER bool isCompNull
(
T const & s,
T const & epsilon
@ -107,7 +107,7 @@ namespace vector_query
}
template <typename T>
inline detail::tvec2<bool> isCompNull
GLM_FUNC_QUALIFIER detail::tvec2<bool> isCompNull
(
detail::tvec2<T> const & v,
T const & epsilon)
@ -118,7 +118,7 @@ namespace vector_query
}
template <typename T>
inline detail::tvec3<bool> isCompNull
GLM_FUNC_QUALIFIER detail::tvec3<bool> isCompNull
(
detail::tvec3<T> const & v,
T const & epsilon
@ -131,7 +131,7 @@ namespace vector_query
}
template <typename T>
inline detail::tvec4<bool> isCompNull
GLM_FUNC_QUALIFIER detail::tvec4<bool> isCompNull
(
detail::tvec4<T> const & v,
T const & epsilon
@ -145,7 +145,7 @@ namespace vector_query
}
template <typename genType>
inline bool areOrthonormal
GLM_FUNC_QUALIFIER bool areOrthonormal
(
genType const & v0,
genType const & v1,
@ -156,7 +156,7 @@ namespace vector_query
}
template <typename genType>
inline bool areSimilar
GLM_FUNC_QUALIFIER bool areSimilar
(
genType const & v0,
genType const & v1,

View File

@ -12,19 +12,19 @@ namespace gtx{
namespace verbose_operator{
template <typename genType>
inline genType add(genType const & a, genType const & b)
GLM_FUNC_QUALIFIER genType add(genType const & a, genType const & b)
{
return a + b;
}
template <typename genType>
inline genType sub(genType const & a, genType const & b)
GLM_FUNC_QUALIFIER genType sub(genType const & a, genType const & b)
{
return a - b;
}
template <typename T>
inline detail::tmat2x2<T> mul
GLM_FUNC_QUALIFIER detail::tmat2x2<T> mul
(
detail::tmat2x2<T> const & a,
detail::tmat2x2<T> const & b
@ -34,7 +34,7 @@ inline detail::tmat2x2<T> mul
}
template <typename T>
inline detail::tmat3x3<T> mul
GLM_FUNC_QUALIFIER detail::tmat3x3<T> mul
(
detail::tmat3x3<T> const & a,
detail::tmat3x3<T> const & b
@ -44,7 +44,7 @@ inline detail::tmat3x3<T> mul
}
template <typename T>
inline detail::tmat4x4<T> mul
GLM_FUNC_QUALIFIER detail::tmat4x4<T> mul
(
detail::tmat4x4<T> const & a,
detail::tmat4x4<T> const & b
@ -54,7 +54,7 @@ inline detail::tmat4x4<T> mul
}
template <typename T>
inline detail::tvec2<T> mul
GLM_FUNC_QUALIFIER detail::tvec2<T> mul
(
detail::tmat2x2<T> const & m,
detail::tvec2<T> const & v
@ -64,7 +64,7 @@ inline detail::tvec2<T> mul
}
template <typename T>
inline detail::tvec3<T> mul
GLM_FUNC_QUALIFIER detail::tvec3<T> mul
(
detail::tmat3x3<T> const & m,
detail::tvec3<T> const & v)
@ -73,7 +73,7 @@ inline detail::tvec3<T> mul
}
template <typename T>
inline detail::tvec4<T> mul
GLM_FUNC_QUALIFIER detail::tvec4<T> mul
(
detail::tmat4x4<T> const & m,
detail::tvec4<T> const & v
@ -83,7 +83,7 @@ inline detail::tvec4<T> mul
}
template <typename T>
inline detail::tvec2<T> mul
GLM_FUNC_QUALIFIER detail::tvec2<T> mul
(
detail::tvec2<T> const & v,
detail::tmat2x2<T> const & m
@ -93,7 +93,7 @@ inline detail::tvec2<T> mul
}
template <typename T>
inline detail::tvec3<T> mul
GLM_FUNC_QUALIFIER detail::tvec3<T> mul
(
detail::tvec3<T> const & v,
detail::tmat3x3<T> const & m
@ -103,7 +103,7 @@ inline detail::tvec3<T> mul
}
template <typename T>
inline detail::tvec4<T> mul
GLM_FUNC_QUALIFIER detail::tvec4<T> mul
(
detail::tvec4<T> const & v,
detail::tmat4x4<T> const & m
@ -113,13 +113,13 @@ inline detail::tvec4<T> mul
}
template <typename genType>
inline genType div(genType const & a, genType const & b)
GLM_FUNC_QUALIFIER genType div(genType const & a, genType const & b)
{
return a / b;
}
template <typename genTypeT, typename genTypeU, typename genTypeV>
inline genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c)
GLM_FUNC_QUALIFIER genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c)
{
return a * b + c;
}

View File

@ -18,7 +18,7 @@ namespace wrap
// clamp
template <typename genType>
inline genType clamp
GLM_FUNC_QUALIFIER genType clamp
(
genType const & Texcoord
)
@ -27,7 +27,7 @@ namespace wrap
}
template <typename T>
inline detail::tvec2<T> clamp
GLM_FUNC_QUALIFIER detail::tvec2<T> clamp
(
detail::tvec2<T> const & Texcoord
)
@ -39,7 +39,7 @@ namespace wrap
}
template <typename T>
inline detail::tvec3<T> clamp
GLM_FUNC_QUALIFIER detail::tvec3<T> clamp
(
detail::tvec3<T> const & Texcoord
)
@ -51,7 +51,7 @@ namespace wrap
}
template <typename T>
inline detail::tvec4<T> clamp
GLM_FUNC_QUALIFIER detail::tvec4<T> clamp
(
detail::tvec4<T> const & Texcoord
)
@ -66,7 +66,7 @@ namespace wrap
// repeat
template <typename genType>
inline genType repeat
GLM_FUNC_QUALIFIER genType repeat
(
genType const & Texcoord
)
@ -75,7 +75,7 @@ namespace wrap
}
template <typename T>
inline detail::tvec2<T> repeat
GLM_FUNC_QUALIFIER detail::tvec2<T> repeat
(
detail::tvec2<T> const & Texcoord
)
@ -87,7 +87,7 @@ namespace wrap
}
template <typename T>
inline detail::tvec3<T> repeat
GLM_FUNC_QUALIFIER detail::tvec3<T> repeat
(
detail::tvec3<T> const & Texcoord
)
@ -99,7 +99,7 @@ namespace wrap
}
template <typename T>
inline detail::tvec4<T> repeat
GLM_FUNC_QUALIFIER detail::tvec4<T> repeat
(
detail::tvec4<T> const & Texcoord
)
@ -114,7 +114,7 @@ namespace wrap
// mirrorRepeat
template <typename genType>
inline genType mirrorRepeat
GLM_FUNC_QUALIFIER genType mirrorRepeat
(
genType const & Texcoord
)
@ -133,7 +133,7 @@ namespace wrap
}
template <typename T>
inline detail::tvec2<T> mirrorRepeat
GLM_FUNC_QUALIFIER detail::tvec2<T> mirrorRepeat
(
detail::tvec2<T> const & Texcoord
)
@ -145,7 +145,7 @@ namespace wrap
}
template <typename T>
inline detail::tvec3<T> mirrorRepeat
GLM_FUNC_QUALIFIER detail::tvec3<T> mirrorRepeat
(
detail::tvec3<T> const & Texcoord
)
@ -157,7 +157,7 @@ namespace wrap
}
template <typename T>
inline detail::tvec4<T> mirrorRepeat
GLM_FUNC_QUALIFIER detail::tvec4<T> mirrorRepeat
(
detail::tvec4<T> const & Texcoord
)