Use constexpr only with C++14 compiler

This commit is contained in:
Groove 2018-07-24 23:41:55 +02:00
parent 97e189606f
commit c3c8b73c57
60 changed files with 685 additions and 702 deletions

View file

@ -30,7 +30,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
/// @see qualifier
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 genType abs(genType x);
GLM_FUNC_DECL GLM_CONSTEXPR genType abs(genType x);
/// Returns x if x >= 0; otherwise, it returns -x.
///
@ -41,7 +41,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 vec<L, T, Q> abs(vec<L, T, Q> const& x);
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> abs(vec<L, T, Q> const& x);
/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
///

View file

@ -12,7 +12,7 @@ namespace detail
template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
struct functor1<vec, 1, R, T, Q>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<1, R, Q> call(R (*Func) (T x), vec<1, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<1, R, Q> call(R (*Func) (T x), vec<1, T, Q> const& v)
{
return vec<1, R, Q>(Func(v.x));
}
@ -21,7 +21,7 @@ namespace detail
template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
struct functor1<vec, 2, R, T, Q>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<2, R, Q> call(R (*Func) (T x), vec<2, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<2, R, Q> call(R (*Func) (T x), vec<2, T, Q> const& v)
{
return vec<2, R, Q>(Func(v.x), Func(v.y));
}
@ -30,7 +30,7 @@ namespace detail
template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
struct functor1<vec, 3, R, T, Q>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<3, R, Q> call(R (*Func) (T x), vec<3, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<3, R, Q> call(R (*Func) (T x), vec<3, T, Q> const& v)
{
return vec<3, R, Q>(Func(v.x), Func(v.y), Func(v.z));
}
@ -39,7 +39,7 @@ namespace detail
template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
struct functor1<vec, 4, R, T, Q>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<4, R, Q> call(R (*Func) (T x), vec<4, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<4, R, Q> call(R (*Func) (T x), vec<4, T, Q> const& v)
{
return vec<4, R, Q>(Func(v.x), Func(v.y), Func(v.z), Func(v.w));
}

View file

@ -13,7 +13,7 @@ namespace detail
template<typename genFIType>
struct compute_abs<genFIType, true>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 static genFIType call(genFIType x)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x)
{
GLM_STATIC_ASSERT(
std::numeric_limits<genFIType>::is_iec559 || std::numeric_limits<genFIType>::is_signed || GLM_UNRESTRICTED_GENTYPE,
@ -28,7 +28,7 @@ namespace detail
template<>
struct compute_abs<float, true>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 static float call(float x)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static float call(float x)
{
return fabsf(x);
}
@ -38,7 +38,7 @@ namespace detail
template<typename genFIType>
struct compute_abs<genFIType, false>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 static genFIType call(genFIType x)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x)
{
GLM_STATIC_ASSERT(
(!std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer) || GLM_UNRESTRICTED_GENTYPE,

View file

@ -10,7 +10,7 @@ namespace detail
template <typename T, bool isFloat>
struct compute_equal
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 static bool call(T a, T b)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b)
{
return a == b;
}
@ -19,7 +19,7 @@ namespace detail
template <typename T>
struct compute_equal<T, true>
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 static bool call(T a, T b)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b)
{
return detail::compute_abs<T, std::numeric_limits<T>::is_signed>::call(b - a) <= static_cast<T>(0);
//return std::memcmp(&a, &b, sizeof(T)) == 0;

View file

@ -30,7 +30,7 @@ namespace glm
// abs
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 int32 abs(int32 x)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR int32 abs(int32 x)
{
int32 const y = x >> 31;
return (x ^ y) - y;
@ -70,7 +70,7 @@ namespace detail
template<length_t L, typename T, qualifier Q, bool Aligned>
struct compute_abs_vector
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static vec<L, T, Q> call(vec<L, T, Q> const& x)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, T, Q> call(vec<L, T, Q> const& x)
{
return detail::functor1<vec, L, T, T, Q>::call(abs, x);
}
@ -266,13 +266,13 @@ namespace detail
}//namespace detail
template<typename genFIType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 genFIType abs(genFIType x)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genFIType abs(genFIType x)
{
return detail::compute_abs<genFIType, std::numeric_limits<genFIType>::is_signed>::call(x);
}
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 vec<L, T, Q> abs(vec<L, T, Q> const& x)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> abs(vec<L, T, Q> const& x)
{
return detail::compute_abs_vector<L, T, Q, detail::is_aligned<Q>::value>::call(x);
}

View file

@ -9,7 +9,7 @@ namespace glm
{
// radians
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType radians(genType degrees)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType radians(genType degrees)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'radians' only accept floating-point input");
@ -17,14 +17,14 @@ namespace glm
}
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<L, T, Q> radians(vec<L, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> radians(vec<L, T, Q> const& v)
{
return detail::functor1<vec, L, T, T, Q>::call(radians, v);
}
// degrees
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType degrees(genType radians)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType degrees(genType radians)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'degrees' only accept floating-point input");
@ -32,7 +32,7 @@ namespace glm
}
template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<L, T, Q> degrees(vec<L, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> degrees(vec<L, T, Q> const& v)
{
return detail::functor1<vec, L, T, T, Q>::call(degrees, v);
}

View file

@ -297,39 +297,21 @@
#endif
// N2235 Generalized Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
#if (GLM_COMPILER & GLM_COMPILER_CLANG) && !(GLM_ARCH & GLM_ARCH_SIMD_BIT)
# define GLM_HAS_CONSTEXPR_CXX11 __has_feature(cxx_constexpr)
#elif (GLM_LANG & GLM_LANG_CXX11_FLAG) && !(GLM_ARCH & GLM_ARCH_SIMD_BIT)
# define GLM_HAS_CONSTEXPR_CXX11 1
#else
// GCC 4.6 support constexpr but there is a compiler bug causing a crash
// Visual C++ has a bug #594 https://github.com/g-truc/glm/issues/594
# define GLM_HAS_CONSTEXPR_CXX11 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && !(GLM_ARCH & GLM_ARCH_SIMD_BIT) && (\
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14))))
#endif
#if GLM_HAS_CONSTEXPR_CXX11
# define GLM_CONSTEXPR_CXX11 constexpr
#else
# define GLM_CONSTEXPR_CXX11
#endif
// N3652 Extended Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html
#if (GLM_COMPILER & GLM_COMPILER_CLANG) && !(GLM_ARCH & GLM_ARCH_SIMD_BIT)
# define GLM_HAS_CONSTEXPR_CXX14 __has_feature(cxx_relaxed_constexpr)
# define GLM_HAS_CONSTEXPR __has_feature(cxx_relaxed_constexpr)
#elif (GLM_LANG & GLM_LANG_CXX14_FLAG) && !(GLM_ARCH & GLM_ARCH_SIMD_BIT)
# define GLM_HAS_CONSTEXPR_CXX14 1
# define GLM_HAS_CONSTEXPR 1
#else
# define GLM_HAS_CONSTEXPR_CXX14 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && !(GLM_ARCH & GLM_ARCH_SIMD_BIT) && GLM_HAS_INITIALIZER_LISTS && (\
# define GLM_HAS_CONSTEXPR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && !(GLM_ARCH & GLM_ARCH_SIMD_BIT) && GLM_HAS_INITIALIZER_LISTS && (\
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL17)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15))))
#endif
#if GLM_HAS_CONSTEXPR_CXX14
# define GLM_CONSTEXPR_CXX14 constexpr
#if GLM_HAS_CONSTEXPR
# define GLM_CONSTEXPR constexpr
#else
# define GLM_CONSTEXPR_CXX14
# define GLM_CONSTEXPR
#endif
//
@ -553,7 +535,7 @@ namespace glm
///////////////////////////////////////////////////////////////////////////////////
// countof
#if GLM_HAS_CONSTEXPR_CXX11
#if GLM_HAS_CONSTEXPR
namespace glm
{
template<typename T, std::size_t N>

View file

@ -27,50 +27,50 @@ namespace glm
// -- Accesses --
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 2; }
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
// -- Constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(mat<2, 2, T, P> const& m);
GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<2, 2, T, P> const& m);
GLM_FUNC_DECL explicit GLM_CONSTEXPR_CXX14 mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR mat(
T const& x1, T const& y1,
T const& x2, T const& y2);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
col_type const& v1,
col_type const& v2);
// -- Conversions --
template<typename U, typename V, typename M, typename N>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
U const& x1, V const& y1,
M const& x2, N const& y2);
template<typename U, typename V>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
vec<2, U, Q> const& v1,
vec<2, V, Q> const& v2);
// -- Matrix conversions --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 2, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
// -- Unary arithmetic operators --

View file

@ -9,7 +9,7 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat()
# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST
: value{col_type(1, 0), col_type(0, 1)}
# endif
@ -23,7 +23,7 @@ namespace glm
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 2, T, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(mat<2, 2, T, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{m[0], m[1]}
# endif
@ -35,7 +35,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(T scalar)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(T scalar)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(scalar, 0), col_type(0, scalar)}
# endif
@ -47,7 +47,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat
(
T const& x0, T const& y0,
T const& x1, T const& y1
@ -63,7 +63,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(col_type const& v0, col_type const& v1)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(col_type const& v0, col_type const& v1)
# if GLM_HAS_INITIALIZER_LISTS
: value{v0, v1}
# endif
@ -78,7 +78,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename X1, typename Y1, typename X2, typename Y2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat
(
X1 const& x1, Y1 const& y1,
X2 const& x2, Y2 const& y2
@ -95,7 +95,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename V1, typename V2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(vec<2, V1, Q> const& v1, vec<2, V2, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(vec<2, V1, Q> const& v1, vec<2, V2, Q> const& v2)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v1), col_type(v2)}
# endif
@ -110,7 +110,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 2, U, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(mat<2, 2, U, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -122,7 +122,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<3, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(mat<3, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -134,7 +134,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<4, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(mat<4, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -146,7 +146,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(mat<2, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -158,7 +158,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<3, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(mat<3, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -170,7 +170,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(mat<2, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -182,7 +182,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<4, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(mat<4, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -194,7 +194,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<3, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(mat<3, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -206,7 +206,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<4, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>::mat(mat<4, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -227,7 +227,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<2, 2, T, Q>::col_type const& mat<2, 2, T, Q>::operator[](typename mat<2, 2, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 2, T, Q>::col_type const& mat<2, 2, T, Q>::operator[](typename mat<2, 2, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View file

@ -28,50 +28,50 @@ namespace glm
// -- Accesses --
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 2; }
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
// -- Constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(mat<2, 3, T, P> const& m);
GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<2, 3, T, P> const& m);
GLM_FUNC_DECL explicit GLM_CONSTEXPR_CXX14 mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR mat(
T x0, T y0, T z0,
T x1, T y1, T z1);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
col_type const& v0,
col_type const& v1);
// -- Conversions --
template<typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2);
template<typename U, typename V>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
vec<3, U, Q> const& v1,
vec<3, V, Q> const& v2);
// -- Matrix conversions --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 3, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
// -- Unary arithmetic operators --

View file

@ -7,7 +7,7 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat()
# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST
: value{col_type(1, 0, 0), col_type(0, 1, 0)}
# endif
@ -21,7 +21,7 @@ namespace glm
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 3, T, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(mat<2, 3, T, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{m.value[0], m.value[1]}
# endif
@ -33,7 +33,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(T scalar)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(T scalar)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(scalar, 0, 0), col_type(0, scalar, 0)}
# endif
@ -45,7 +45,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat
(
T x0, T y0, T z0,
T x1, T y1, T z1
@ -61,7 +61,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(col_type const& v0, col_type const& v1)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(col_type const& v0, col_type const& v1)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1)}
# endif
@ -78,7 +78,7 @@ namespace glm
template<
typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat
(
X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2
@ -95,7 +95,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename V1, typename V2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(vec<3, V1, Q> const& v1, vec<3, V2, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(vec<3, V1, Q> const& v1, vec<3, V2, Q> const& v2)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v1), col_type(v2)}
# endif
@ -110,7 +110,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 3, U, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(mat<2, 3, U, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -122,7 +122,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(mat<2, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0)}
# endif
@ -134,7 +134,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<3, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(mat<3, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -146,7 +146,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<4, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(mat<4, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -158,7 +158,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(mat<2, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -170,7 +170,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<3, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(mat<3, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0)}
# endif
@ -182,7 +182,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<3, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(mat<3, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -194,7 +194,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<4, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(mat<4, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0)}
# endif
@ -206,7 +206,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<4, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>::mat(mat<4, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -227,7 +227,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<2, 3, T, Q>::col_type const& mat<2, 3, T, Q>::operator[](typename mat<2, 3, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 3, T, Q>::col_type const& mat<2, 3, T, Q>::operator[](typename mat<2, 3, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View file

@ -28,22 +28,22 @@ namespace glm
// -- Accesses --
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 2; }
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
// -- Constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(mat<2, 4, T, P> const& m);
GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<2, 4, T, P> const& m);
GLM_FUNC_DECL explicit GLM_CONSTEXPR_CXX14 mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR mat(
T x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
col_type const& v0,
col_type const& v1);
@ -52,28 +52,28 @@ namespace glm
template<
typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
X1 x1, Y1 y1, Z1 z1, W1 w1,
X2 x2, Y2 y2, Z2 z2, W2 w2);
template<typename U, typename V>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
vec<4, U, Q> const& v1,
vec<4, V, Q> const& v2);
// -- Matrix conversions --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 4, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
// -- Unary arithmetic operators --

View file

@ -7,7 +7,7 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat()
# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST
: value{col_type(1, 0, 0, 0), col_type(0, 1, 0, 0)}
# endif
@ -21,7 +21,7 @@ namespace glm
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 4, T, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(mat<2, 4, T, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{m[0], m[1]}
# endif
@ -33,7 +33,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(T s)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(T s)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(s, 0, 0, 0), col_type(0, s, 0, 0)}
# endif
@ -45,7 +45,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat
(
T x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1
@ -61,7 +61,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(col_type const& v0, col_type const& v1)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(col_type const& v0, col_type const& v1)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1)}
# endif
@ -78,7 +78,7 @@ namespace glm
template<
typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat
(
X1 x1, Y1 y1, Z1 z1, W1 w1,
X2 x2, Y2 y2, Z2 z2, W2 w2
@ -97,7 +97,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename V1, typename V2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(vec<4, V1, Q> const& v1, vec<4, V2, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(vec<4, V1, Q> const& v1, vec<4, V2, Q> const& v2)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v1), col_type(v2)}
# endif
@ -112,7 +112,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 4, U, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(mat<2, 4, U, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -124,7 +124,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(mat<2, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0, 0), col_type(m[1], 0, 0)}
# endif
@ -136,7 +136,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<3, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(mat<3, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0)}
# endif
@ -148,7 +148,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<4, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(mat<4, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -160,7 +160,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(mat<2, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0)}
# endif
@ -172,7 +172,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<3, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(mat<3, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0, 0), col_type(m[1], 0, 0)}
# endif
@ -184,7 +184,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<3, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(mat<3, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1])}
# endif
@ -196,7 +196,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<4, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(mat<4, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0, 0), col_type(m[1], 0, 0)}
# endif
@ -208,7 +208,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<4, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>::mat(mat<4, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0)}
# endif
@ -229,7 +229,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<2, 4, T, Q>::col_type const& mat<2, 4, T, Q>::operator[](typename mat<2, 4, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 4, T, Q>::col_type const& mat<2, 4, T, Q>::operator[](typename mat<2, 4, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View file

@ -28,23 +28,23 @@ namespace glm
// -- Accesses --
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 3; }
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
// -- Constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(mat<3, 2, T, P> const& m);
GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<3, 2, T, P> const& m);
GLM_FUNC_DECL explicit GLM_CONSTEXPR_CXX14 mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR mat(
T x0, T y0,
T x1, T y1,
T x2, T y2);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
col_type const& v0,
col_type const& v1,
col_type const& v2);
@ -55,13 +55,13 @@ namespace glm
typename X1, typename Y1,
typename X2, typename Y2,
typename X3, typename Y3>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
X1 x1, Y1 y1,
X2 x2, Y2 y2,
X3 x3, Y3 y3);
template<typename V1, typename V2, typename V3>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
vec<2, V1, Q> const& v1,
vec<2, V2, Q> const& v2,
vec<2, V3, Q> const& v3);
@ -69,16 +69,16 @@ namespace glm
// -- Matrix conversions --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 2, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
// -- Unary arithmetic operators --

View file

@ -7,7 +7,7 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat()
# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST
: value{col_type(1, 0), col_type(0, 1), col_type(0, 0)}
# endif
@ -22,7 +22,7 @@ namespace glm
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 2, T, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(mat<3, 2, T, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -35,7 +35,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(T s)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(T s)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(s, 0), col_type(0, s), col_type(0, 0)}
# endif
@ -48,7 +48,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat
(
T x0, T y0,
T x1, T y1,
@ -66,7 +66,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1), col_type(v2)}
# endif
@ -85,7 +85,7 @@ namespace glm
typename X0, typename Y0,
typename X1, typename Y1,
typename X2, typename Y2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat
(
X0 x0, Y0 y0,
X1 x1, Y1 y1,
@ -104,7 +104,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename V0, typename V1, typename V2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(vec<2, V0, Q> const& v0, vec<2, V1, Q> const& v1, vec<2, V2, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(vec<2, V0, Q> const& v0, vec<2, V1, Q> const& v1, vec<2, V2, Q> const& v2)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1), col_type(v2)}
# endif
@ -120,7 +120,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 2, U, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(mat<3, 2, U, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -133,7 +133,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<2, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(mat<2, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0)}
# endif
@ -146,7 +146,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(mat<3, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -159,7 +159,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<4, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(mat<4, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -172,7 +172,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<2, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(mat<2, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0)}
# endif
@ -185,7 +185,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<2, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(mat<2, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0)}
# endif
@ -198,7 +198,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(mat<3, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -211,7 +211,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<4, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(mat<4, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -224,7 +224,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<4, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>::mat(mat<4, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -246,7 +246,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<3, 2, T, Q>::col_type const& mat<3, 2, T, Q>::operator[](typename mat<3, 2, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 2, T, Q>::col_type const& mat<3, 2, T, Q>::operator[](typename mat<3, 2, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View file

@ -27,23 +27,23 @@ namespace glm
// -- Accesses --
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 3; }
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
// -- Constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(mat<3, 3, T, P> const& m);
GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<3, 3, T, P> const& m);
GLM_FUNC_DECL explicit GLM_CONSTEXPR_CXX14 mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR mat(
T x0, T y0, T z0,
T x1, T y1, T z1,
T x2, T y2, T z2);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
col_type const& v0,
col_type const& v1,
col_type const& v2);
@ -54,13 +54,13 @@ namespace glm
typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2,
X3 x3, Y3 y3, Z3 z3);
template<typename V1, typename V2, typename V3>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
vec<3, V1, Q> const& v1,
vec<3, V2, Q> const& v2,
vec<3, V3, Q> const& v3);
@ -68,16 +68,16 @@ namespace glm
// -- Matrix conversions --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 3, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
// -- Unary arithmetic operators --
@ -175,7 +175,7 @@ namespace glm
// -- Boolean operators --
template<typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 bool operator==(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
template<typename T, qualifier Q>
GLM_FUNC_DECL bool operator!=(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);

View file

@ -9,7 +9,7 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat()
# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST
: value{col_type(1, 0, 0), col_type(0, 1, 0), col_type(0, 0, 1)}
# endif
@ -24,7 +24,7 @@ namespace glm
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 3, T, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(mat<3, 3, T, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -37,7 +37,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(T s)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(T s)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(s, 0, 0), col_type(0, s, 0), col_type(0, 0, s)}
# endif
@ -50,7 +50,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat
(
T x0, T y0, T z0,
T x1, T y1, T z1,
@ -68,7 +68,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1), col_type(v2)}
# endif
@ -87,7 +87,7 @@ namespace glm
typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat
(
X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2,
@ -106,7 +106,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(vec<3, V1, Q> const& v1, vec<3, V2, Q> const& v2, vec<3, V3, Q> const& v3)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(vec<3, V1, Q> const& v1, vec<3, V2, Q> const& v2, vec<3, V3, Q> const& v3)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v1), col_type(v2), col_type(v3)}
# endif
@ -122,7 +122,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 3, U, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(mat<3, 3, U, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -135,7 +135,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<2, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(mat<2, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(0, 0, 1)}
# endif
@ -148,7 +148,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<4, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(mat<4, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -161,7 +161,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<2, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(mat<2, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0, 0, 1)}
# endif
@ -174,7 +174,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(mat<3, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(m[2], 1)}
# endif
@ -187,7 +187,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<2, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(mat<2, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0, 0, 1)}
# endif
@ -200,7 +200,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<4, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(mat<4, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(m[2], 1)}
# endif
@ -213,7 +213,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(mat<3, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -226,7 +226,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<4, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q>::mat(mat<4, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -248,7 +248,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<3, 3, T, Q>::col_type const& mat<3, 3, T, Q>::operator[](typename mat<3, 3, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 3, T, Q>::col_type const& mat<3, 3, T, Q>::operator[](typename mat<3, 3, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];
@ -591,7 +591,7 @@ namespace glm
// -- Boolean operators --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 bool operator==(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
{
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
}

View file

@ -28,23 +28,23 @@ namespace glm
// -- Accesses --
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 3; }
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
// -- Constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(mat<3, 4, T, P> const& m);
GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<3, 4, T, P> const& m);
GLM_FUNC_DECL explicit GLM_CONSTEXPR_CXX14 mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR mat(
T x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1,
T x2, T y2, T z2, T w2);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
col_type const& v0,
col_type const& v1,
col_type const& v2);
@ -55,13 +55,13 @@ namespace glm
typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
X1 x1, Y1 y1, Z1 z1, W1 w1,
X2 x2, Y2 y2, Z2 z2, W2 w2,
X3 x3, Y3 y3, Z3 z3, W3 w3);
template<typename V1, typename V2, typename V3>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
vec<4, V1, Q> const& v1,
vec<4, V2, Q> const& v2,
vec<4, V3, Q> const& v3);
@ -69,16 +69,16 @@ namespace glm
// -- Matrix conversions --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 4, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
// -- Unary arithmetic operators --

View file

@ -7,7 +7,7 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat()
# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST
: value{col_type(1, 0, 0, 0), col_type(0, 1, 0, 0), col_type(0, 0, 1, 0)}
# endif
@ -22,7 +22,7 @@ namespace glm
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 4, T, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(mat<3, 4, T, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -35,7 +35,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(T s)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(T s)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(s, 0, 0, 0), col_type(0, s, 0, 0), col_type(0, 0, s, 0)}
# endif
@ -48,7 +48,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat
(
T x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1,
@ -69,7 +69,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1), col_type(v2)}
# endif
@ -88,7 +88,7 @@ namespace glm
typename X0, typename Y0, typename Z0, typename W0,
typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat
(
X0 x0, Y0 y0, Z0 z0, W0 w0,
X1 x1, Y1 y1, Z1 z1, W1 w1,
@ -110,7 +110,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(vec<4, V1, Q> const& v0, vec<4, V2, Q> const& v1, vec<4, V3, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(vec<4, V1, Q> const& v0, vec<4, V2, Q> const& v1, vec<4, V3, Q> const& v2)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1), col_type(v2)}
# endif
@ -126,7 +126,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 4, U, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(mat<3, 4, U, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -139,7 +139,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<2, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(mat<2, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0, 0), col_type(m[1], 0, 0), col_type(0, 0, 1, 0)}
# endif
@ -152,7 +152,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(mat<3, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(m[2], 0)}
# endif
@ -165,7 +165,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<4, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(mat<4, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2])}
# endif
@ -178,7 +178,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<2, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(mat<2, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(0, 0, 1, 0)}
# endif
@ -191,7 +191,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(mat<3, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0, 0), col_type(m[1], 0, 0), col_type(m[2], 1, 0)}
# endif
@ -204,7 +204,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<2, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(mat<2, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0, 0, 1, 0)}
# endif
@ -217,7 +217,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<4, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(mat<4, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0, 0), col_type(m[1], 0, 0), col_type(m[2], 1, 0)}
# endif
@ -230,7 +230,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<4, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>::mat(mat<4, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(m[2], 0)}
# endif
@ -252,7 +252,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<3, 4, T, Q>::col_type const& mat<3, 4, T, Q>::operator[](typename mat<3, 4, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 4, T, Q>::col_type const& mat<3, 4, T, Q>::operator[](typename mat<3, 4, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View file

@ -28,24 +28,24 @@ namespace glm
// -- Accesses --
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 4; }
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
// -- Constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(mat<4, 2, T, P> const& m);
GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<4, 2, T, P> const& m);
GLM_FUNC_DECL explicit GLM_CONSTEXPR_CXX14 mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR mat(
T x0, T y0,
T x1, T y1,
T x2, T y2,
T x3, T y3);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
col_type const& v0,
col_type const& v1,
col_type const& v2,
@ -58,14 +58,14 @@ namespace glm
typename X1, typename Y1,
typename X2, typename Y2,
typename X3, typename Y3>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
X0 x0, Y0 y0,
X1 x1, Y1 y1,
X2 x2, Y2 y2,
X3 x3, Y3 y3);
template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
vec<2, V1, Q> const& v1,
vec<2, V2, Q> const& v2,
vec<2, V3, Q> const& v3,
@ -74,16 +74,16 @@ namespace glm
// -- Matrix conversions --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 2, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
// -- Unary arithmetic operators --

View file

@ -7,7 +7,7 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat()
# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST
: value{col_type(1, 0), col_type(0, 1), col_type(0, 0), col_type(0, 0)}
# endif
@ -23,7 +23,7 @@ namespace glm
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 2, T, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(mat<4, 2, T, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(m[3])}
# endif
@ -37,7 +37,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(T s)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(T s)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(s, 0), col_type(0, s), col_type(0, 0), col_type(0, 0)}
# endif
@ -51,7 +51,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat
(
T x0, T y0,
T x1, T y1,
@ -71,7 +71,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2, col_type const& v3)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2, col_type const& v3)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1), col_type(v2), col_type(v3)}
# endif
@ -92,7 +92,7 @@ namespace glm
typename X1, typename Y1,
typename X2, typename Y2,
typename X3, typename Y3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat
(
X0 x0, Y0 y0,
X1 x1, Y1 y1,
@ -113,7 +113,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename V0, typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(vec<2, V0, Q> const& v0, vec<2, V1, Q> const& v1, vec<2, V2, Q> const& v2, vec<2, V3, Q> const& v3)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(vec<2, V0, Q> const& v0, vec<2, V1, Q> const& v1, vec<2, V2, Q> const& v2, vec<2, V3, Q> const& v3)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1), col_type(v2), col_type(v3)}
# endif
@ -130,7 +130,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 2, U, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(mat<4, 2, U, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(m[3])}
# endif
@ -144,7 +144,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<2, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(mat<2, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0), col_type(0)}
# endif
@ -158,7 +158,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<3, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(mat<3, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(0)}
# endif
@ -172,7 +172,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(mat<4, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(m[3])}
# endif
@ -186,7 +186,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<2, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(mat<2, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0), col_type(0)}
# endif
@ -200,7 +200,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<3, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(mat<3, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(0)}
# endif
@ -214,7 +214,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<2, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(mat<2, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0), col_type(0)}
# endif
@ -228,7 +228,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(mat<4, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(m[3])}
# endif
@ -242,7 +242,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<3, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>::mat(mat<3, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(0)}
# endif
@ -265,7 +265,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<4, 2, T, Q>::col_type const& mat<4, 2, T, Q>::operator[](typename mat<4, 2, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 2, T, Q>::col_type const& mat<4, 2, T, Q>::operator[](typename mat<4, 2, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View file

@ -28,24 +28,24 @@ namespace glm
// -- Accesses --
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length() { return 4; }
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
// -- Constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(mat<4, 3, T, P> const& m);
GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<4, 3, T, P> const& m);
GLM_FUNC_DECL explicit GLM_CONSTEXPR_CXX14 mat(T const& x);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T const& x);
GLM_FUNC_DECL GLM_CONSTEXPR mat(
T const& x0, T const& y0, T const& z0,
T const& x1, T const& y1, T const& z1,
T const& x2, T const& y2, T const& z2,
T const& x3, T const& y3, T const& z3);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
col_type const& v0,
col_type const& v1,
col_type const& v2,
@ -58,14 +58,14 @@ namespace glm
typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3,
typename X4, typename Y4, typename Z4>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
X1 const& x1, Y1 const& y1, Z1 const& z1,
X2 const& x2, Y2 const& y2, Z2 const& z2,
X3 const& x3, Y3 const& y3, Z3 const& z3,
X4 const& x4, Y4 const& y4, Z4 const& z4);
template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
vec<3, V1, Q> const& v1,
vec<3, V2, Q> const& v2,
vec<3, V3, Q> const& v3,
@ -74,16 +74,16 @@ namespace glm
// -- Matrix conversions --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 3, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
// -- Unary arithmetic operators --

View file

@ -7,7 +7,7 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat()
# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST
: value{col_type(1, 0, 0), col_type(0, 1, 0), col_type(0, 0, 1), col_type(0, 0, 0)}
# endif
@ -23,7 +23,7 @@ namespace glm
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 3, T, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(mat<4, 3, T, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(m[3])}
# endif
@ -37,7 +37,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(T const& s)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(T const& s)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(s, 0, 0), col_type(0, s, 0), col_type(0, 0, s), col_type(0, 0, 0)}
# endif
@ -51,7 +51,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat
(
T const& x0, T const& y0, T const& z0,
T const& x1, T const& y1, T const& z1,
@ -71,7 +71,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2, col_type const& v3)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2, col_type const& v3)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1), col_type(v2), col_type(v3)}
# endif
@ -92,7 +92,7 @@ namespace glm
typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat
(
X0 const& x0, Y0 const& y0, Z0 const& z0,
X1 const& x1, Y1 const& y1, Z1 const& z1,
@ -113,7 +113,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(vec<3, V1, Q> const& v1, vec<3, V2, Q> const& v2, vec<3, V3, Q> const& v3, vec<3, V4, Q> const& v4)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(vec<3, V1, Q> const& v1, vec<3, V2, Q> const& v2, vec<3, V3, Q> const& v3, vec<3, V4, Q> const& v4)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v1), col_type(v2), col_type(v3), col_type(v4)}
# endif
@ -130,7 +130,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 3, U, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(mat<4, 3, U, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(m[3])}
# endif
@ -144,7 +144,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<2, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(mat<2, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(0, 0, 1), col_type(0)}
# endif
@ -158,7 +158,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<3, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(mat<3, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(0)}
# endif
@ -172,7 +172,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(mat<4, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(0)}
# endif
@ -186,7 +186,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<2, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(mat<2, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0, 0, 1), col_type(0)}
# endif
@ -200,7 +200,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<3, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(mat<3, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(m[2], 1), col_type(0)}
# endif
@ -214,7 +214,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<2, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(mat<2, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0, 0, 1), col_type(0)}
# endif
@ -228,7 +228,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(mat<4, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(m[2], 1), col_type(0)}
# endif
@ -242,7 +242,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<3, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>::mat(mat<3, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(0)}
# endif
@ -265,7 +265,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<4, 3, T, Q>::col_type const& mat<4, 3, T, Q>::operator[](typename mat<4, 3, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 3, T, Q>::col_type const& mat<4, 3, T, Q>::operator[](typename mat<4, 3, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View file

@ -27,24 +27,24 @@ namespace glm
// -- Accesses --
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 4;}
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
GLM_FUNC_DECL col_type & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 col_type const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
// -- Constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(mat<4, 4, T, P> const& m);
GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<4, 4, T, P> const& m);
GLM_FUNC_DECL explicit GLM_CONSTEXPR_CXX14 mat(T const& x);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T const& x);
GLM_FUNC_DECL GLM_CONSTEXPR mat(
T const& x0, T const& y0, T const& z0, T const& w0,
T const& x1, T const& y1, T const& z1, T const& w1,
T const& x2, T const& y2, T const& z2, T const& w2,
T const& x3, T const& y3, T const& z3, T const& w3);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
col_type const& v0,
col_type const& v1,
col_type const& v2,
@ -57,14 +57,14 @@ namespace glm
typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3,
typename X4, typename Y4, typename Z4, typename W4>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
X1 const& x1, Y1 const& y1, Z1 const& z1, W1 const& w1,
X2 const& x2, Y2 const& y2, Z2 const& z2, W2 const& w2,
X3 const& x3, Y3 const& y3, Z3 const& z3, W3 const& w3,
X4 const& x4, Y4 const& y4, Z4 const& z4, W4 const& w4);
template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 mat(
GLM_FUNC_DECL GLM_CONSTEXPR mat(
vec<4, V1, Q> const& v1,
vec<4, V2, Q> const& v2,
vec<4, V3, Q> const& v3,
@ -73,16 +73,16 @@ namespace glm
// -- Matrix conversions --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 4, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, U, P> const& m);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 mat(mat<4, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
// -- Unary arithmetic operators --

View file

@ -9,7 +9,7 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat()
# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST
: value{col_type(1, 0, 0, 0), col_type(0, 1, 0, 0), col_type(0, 0, 1, 0), col_type(0, 0, 0, 1)}
# endif
@ -25,7 +25,7 @@ namespace glm
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 4, T, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(mat<4, 4, T, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(m[3])}
# endif
@ -39,7 +39,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(T const& s)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(T const& s)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(s, 0, 0, 0), col_type(0, s, 0, 0), col_type(0, 0, s, 0), col_type(0, 0, 0, s)}
# endif
@ -53,7 +53,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat
(
T const& x0, T const& y0, T const& z0, T const& w0,
T const& x1, T const& y1, T const& z1, T const& w1,
@ -77,7 +77,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2, col_type const& v3)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(col_type const& v0, col_type const& v1, col_type const& v2, col_type const& v3)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v0), col_type(v1), col_type(v2), col_type(v3)}
# endif
@ -92,7 +92,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 4, U, P> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(mat<4, 4, U, P> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(m[3])}
# endif
@ -113,7 +113,7 @@ namespace glm
typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3,
typename X4, typename Y4, typename Z4, typename W4>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat
(
X1 const& x1, Y1 const& y1, Z1 const& z1, W1 const& w1,
X2 const& x2, Y2 const& y2, Z2 const& z2, W2 const& w2,
@ -154,7 +154,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(vec<4, V1, Q> const& v1, vec<4, V2, Q> const& v2, vec<4, V3, Q> const& v3, vec<4, V4, Q> const& v4)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(vec<4, V1, Q> const& v1, vec<4, V2, Q> const& v2, vec<4, V3, Q> const& v3, vec<4, V4, Q> const& v4)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(v1), col_type(v2), col_type(v3), col_type(v4)}
# endif
@ -175,7 +175,7 @@ namespace glm
// -- Matrix conversions --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<2, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(mat<2, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0, 0), col_type(m[1], 0, 0), col_type(0, 0, 1, 0), col_type(0, 0, 0, 1)}
# endif
@ -189,7 +189,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<3, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(mat<3, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(m[2], 0), col_type(0, 0, 0, 1)}
# endif
@ -203,7 +203,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<2, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(mat<2, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(0, 0, 1, 0), col_type(0, 0, 0, 1)}
# endif
@ -217,7 +217,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<3, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(mat<3, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0, 0), col_type(m[1], 0, 0), col_type(m[2], 1, 0), col_type(0, 0, 0, 1)}
# endif
@ -231,7 +231,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<2, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(mat<2, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(0, 0, 1, 0), col_type(0, 0, 0, 1)}
# endif
@ -245,7 +245,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 2, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(mat<4, 2, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0, 0), col_type(m[1], 0, 0), col_type(0, 0, 1, 0), col_type(0, 0, 0, 1)}
# endif
@ -259,7 +259,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<3, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(mat<3, 4, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0]), col_type(m[1]), col_type(m[2]), col_type(0, 0, 0, 1)}
# endif
@ -273,7 +273,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 3, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>::mat(mat<4, 3, T, Q> const& m)
# if GLM_HAS_INITIALIZER_LISTS
: value{col_type(m[0], 0), col_type(m[1], 0), col_type(m[2], 0), col_type(m[3], 1)}
# endif
@ -296,7 +296,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 typename mat<4, 4, T, Q>::col_type const& mat<4, 4, T, Q>::operator[](typename mat<4, 4, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 4, T, Q>::col_type const& mat<4, 4, T, Q>::operator[](typename mat<4, 4, T, Q>::length_type i) const
{
assert(i < this->length());
return this->value[i];

View file

@ -7,28 +7,28 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec()
# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE
: x(0)
# endif
{}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<1, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<1, T, Q> const& v)
: x(v.x)
{}
# endif
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<1, T, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<1, T, P> const& v)
: x(v.x)
{}
// -- Explicit basic constructors --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(T scalar)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(T scalar)
: x(scalar)
{}
@ -36,25 +36,25 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<1, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<1, U, P> const& v)
: x(static_cast<T>(v.x))
{}
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<2, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<2, U, P> const& v)
: x(static_cast<T>(v.x))
{}
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<3, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<3, U, P> const& v)
: x(static_cast<T>(v.x))
{}
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<4, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<4, U, P> const& v)
: x(static_cast<T>(v.x))
{}
@ -527,25 +527,25 @@ namespace glm
// -- Boolean operators --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 bool operator==(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
{
return detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x);
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 bool operator!=(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
{
return !(v1 == v2);
}
template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 vec<1, bool, Q> operator&&(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, bool, Q> operator&&(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2)
{
return vec<1, bool, Q>(v1.x && v2.x);
}
template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 vec<1, bool, Q> operator||(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, bool, Q> operator||(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2)
{
return vec<1, bool, Q>(v1.x || v2.x);
}

View file

@ -58,50 +58,50 @@ namespace glm
/// Return the count of components of the vector
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 2;}
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 2;}
GLM_FUNC_DECL T& operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 T const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;
// -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec const& v) GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<2, T, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, T, P> const& v);
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(T x, T y);
GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR vec(T x, T y);
// -- Conversion constructors --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(vec<1, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(vec<1, U, P> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(A x, B y);
GLM_FUNC_DECL GLM_CONSTEXPR vec(A x, B y);
template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, A, Q> const& x, B y);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& x, B y);
template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(A x, vec<1, B, Q> const& y);
GLM_FUNC_DECL GLM_CONSTEXPR vec(A x, vec<1, B, Q> const& y);
template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, A, Q> const& x, vec<1, B, Q> const& y);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& x, vec<1, B, Q> const& y);
// -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<3, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, P> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<4, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<2, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<2, U, P> const& v);
// -- Swizzle constructors --
# if GLM_SWIZZLE == GLM_SWIZZLE_OPERATOR
@ -356,16 +356,16 @@ namespace glm
// -- Boolean operators --
template<typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 bool operator==(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
template<typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 bool operator!=(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 vec<2, bool, Q> operator&&(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, bool, Q> operator&&(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2);
template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 vec<2, bool, Q> operator||(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, bool, Q> operator||(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2);
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

View file

@ -9,33 +9,33 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec()
# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE
: x(0), y(0)
# endif
{}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<2, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<2, T, Q> const& v)
: x(v.x), y(v.y)
{}
# endif
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<2, T, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<2, T, P> const& v)
: x(v.x), y(v.y)
{}
// -- Explicit basic constructors --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(T scalar)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(T scalar)
: x(scalar), y(scalar)
{}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(T _x, T _y)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(T _x, T _y)
: x(_x), y(_y)
{}
@ -43,35 +43,35 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<1, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<1, U, P> const& v)
: x(static_cast<T>(v.x))
, y(static_cast<T>(v.x))
{}
template<typename T, qualifier Q>
template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(A _x, B _y)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(A _x, B _y)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y))
{}
template<typename T, qualifier Q>
template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<1, A, Q> const& _x, B _y)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<1, A, Q> const& _x, B _y)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y))
{}
template<typename T, qualifier Q>
template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(A _x, vec<1, B, Q> const& _y)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(A _x, vec<1, B, Q> const& _y)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y.x))
{}
template<typename T, qualifier Q>
template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x))
{}
@ -80,21 +80,21 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<2, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<2, U, P> const& v)
: x(static_cast<T>(v.x))
, y(static_cast<T>(v.y))
{}
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<3, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<3, U, P> const& v)
: x(static_cast<T>(v.x))
, y(static_cast<T>(v.y))
{}
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<4, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<4, U, P> const& v)
: x(static_cast<T>(v.x))
, y(static_cast<T>(v.y))
{}
@ -109,7 +109,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 T const& vec<2, T, Q>::operator[](typename vec<2, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR T const& vec<2, T, Q>::operator[](typename vec<2, T, Q>::length_type i) const
{
assert(i >= 0 && i < this->length());
return (&x)[i];
@ -873,7 +873,7 @@ namespace glm
// -- Boolean operators --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 bool operator==(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2)
{
return
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x) &&
@ -881,19 +881,19 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 bool operator!=(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2)
{
return !(v1 == v2);
}
template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 vec<2, bool, Q> operator&&(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, bool, Q> operator&&(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2)
{
return vec<2, bool, Q>(v1.x && v2.x, v1.y && v2.y);
}
template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 vec<2, bool, Q> operator||(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, bool, Q> operator||(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2)
{
return vec<2, bool, Q>(v1.x || v2.x, v1.y || v2.y);
}

View file

@ -59,67 +59,67 @@ namespace glm
/// Return the count of components of the vector
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 3;}
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 3;}
GLM_FUNC_DECL T & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 T const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;
// -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec const& v) GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<3, T, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, T, P> const& v);
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(T a, T b, T c);
GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR vec(T a, T b, T c);
// -- Conversion scalar constructors --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(vec<1, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(vec<1, U, P> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X x, Y y, Z z);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X x, Y y, Z z);
template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, Y _y, Z _z);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z);
template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, vec<1, Y, Q> const& _y, Z _z);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z);
template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z);
template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, Y _y, vec<1, Z, Q> const& _z);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z);
template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z);
template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z);
template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z);
// -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<2, A, P> const& _xy, B _z);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(A _x, vec<2, B, P> const& _yz);
GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<4, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<3, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, P> const& v);
// -- Swizzle constructors --
# if GLM_SWIZZLE == GLM_SWIZZLE_OPERATOR
@ -386,16 +386,16 @@ namespace glm
// -- Boolean operators --
template<typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 bool operator==(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
template<typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 bool operator!=(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 vec<3, bool, Q> operator&&(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, bool, Q> operator&&(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2);
template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 vec<3, bool, Q> operator||(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, bool, Q> operator||(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2);
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

View file

@ -7,33 +7,33 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec()
# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE
: x(0), y(0), z(0)
# endif
{}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<3, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<3, T, Q> const& v)
: x(v.x), y(v.y), z(v.z)
{}
# endif
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<3, T, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<3, T, P> const& v)
: x(v.x), y(v.y), z(v.z)
{}
// -- Explicit basic constructors --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(T scalar)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(T scalar)
: x(scalar), y(scalar), z(scalar)
{}
template <typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(T _x, T _y, T _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(T _x, T _y, T _z)
: x(_x), y(_y), z(_z)
{}
@ -41,7 +41,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<1, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<1, U, P> const& v)
: x(static_cast<T>(v.x))
, y(static_cast<T>(v.x))
, z(static_cast<T>(v.x))
@ -49,7 +49,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(X _x, Y _y, Z _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(X _x, Y _y, Z _z)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z))
@ -57,7 +57,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, Z _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, Z _z)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z))
@ -65,7 +65,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, Z _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, Z _z)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z))
@ -73,7 +73,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z))
@ -81,7 +81,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(X _x, Y _y, vec<1, Z, Q> const& _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(X _x, Y _y, vec<1, Z, Q> const& _z)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z.x))
@ -89,7 +89,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z.x))
@ -97,7 +97,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x))
@ -105,7 +105,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x))
@ -115,7 +115,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<2, A, P> const& _xy, B _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<2, A, P> const& _xy, B _z)
: x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z))
@ -123,7 +123,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z)
: x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z.x))
@ -131,7 +131,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(A _x, vec<2, B, P> const& _yz)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(A _x, vec<2, B, P> const& _yz)
: x(static_cast<T>(_x))
, y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y))
@ -139,7 +139,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y))
@ -147,7 +147,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<3, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<3, U, P> const& v)
: x(static_cast<T>(v.x))
, y(static_cast<T>(v.y))
, z(static_cast<T>(v.z))
@ -155,7 +155,7 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<4, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<4, U, P> const& v)
: x(static_cast<T>(v.x))
, y(static_cast<T>(v.y))
, z(static_cast<T>(v.z))
@ -171,7 +171,7 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 T const& vec<3, T, Q>::operator[](typename vec<3, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR T const& vec<3, T, Q>::operator[](typename vec<3, T, Q>::length_type i) const
{
assert(i >= 0 && i < this->length());
return (&x)[i];
@ -1021,7 +1021,7 @@ namespace glm
// -- Boolean operators --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 bool operator==(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
{
return
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x) &&
@ -1030,19 +1030,19 @@ namespace glm
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 bool operator!=(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
{
return !(v1 == v2);
}
template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 vec<3, bool, Q> operator&&(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, bool, Q> operator&&(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2)
{
return vec<3, bool, Q>(v1.x && v2.x, v1.y && v2.y, v1.z && v2.z);
}
template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 vec<3, bool, Q> operator||(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, bool, Q> operator||(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2)
{
return vec<3, bool, Q>(v1.x || v2.x, v1.y || v2.y, v1.z || v2.z);
}

View file

@ -60,117 +60,117 @@ namespace glm
/// Return the count of components of the vector
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 4;}
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
GLM_FUNC_DECL T & operator[](length_type i);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 T const& operator[](length_type i) const;
GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;
// -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<4, T, Q> const& v) GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<4, T, Q> const& v) GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<4, T, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<4, T, P> const& v);
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(T x, T y, T z, T w);
GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR vec(T x, T y, T z, T w);
// -- Conversion scalar constructors --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(vec<1, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(vec<1, U, P> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, Y _y, Z _z, W _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, Z _z, W _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, W _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, W _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, W _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, W _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, Y _y, Z _z, vec<1, W, Q> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z, vec<1, W, Q> const& _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _Y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _Y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
// -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<2, A, P> const& _xy, B _z, C _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z, C _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, C _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, C _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<2, A, P> const& _xy, B _z, vec<1, C, P> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z, vec<1, C, P> const& _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, vec<1, C, P> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, vec<1, C, P> const& _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(A _x, vec<2, B, P> const& _yz, C _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz, C _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, C _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, C _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(A _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(A _x, B _y, vec<2, C, P> const& _zw);
GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, B _y, vec<2, C, P> const& _zw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, A, P> const& _x, B _y, vec<2, C, P> const& _zw);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, B _y, vec<2, C, P> const& _zw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(A _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw);
GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<3, A, P> const& _xyz, B _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, P> const& _xyz, B _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<3, A, P> const& _xyz, vec<1, B, P> const& _w);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, P> const& _xyz, vec<1, B, P> const& _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(A _x, vec<3, B, P> const& _yzw);
GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<3, B, P> const& _yzw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, A, P> const& _x, vec<3, B, P> const& _yzw);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<3, B, P> const& _yzw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<2, A, P> const& _xy, vec<2, B, P> const& _zw);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<2, B, P> const& _zw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<4, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
// -- Swizzle constructors --
# if GLM_SWIZZLE == GLM_SWIZZLE_OPERATOR
@ -461,16 +461,16 @@ namespace glm
// -- Boolean operators --
template<typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 bool operator==(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
template<typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 bool operator!=(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 vec<4, bool, Q> operator&&(vec<4, bool, Q> const& v1, vec<4, bool, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> operator&&(vec<4, bool, Q> const& v1, vec<4, bool, Q> const& v2);
template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 vec<4, bool, Q> operator||(vec<4, bool, Q> const& v1, vec<4, bool, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> operator||(vec<4, bool, Q> const& v1, vec<4, bool, Q> const& v2);
}//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE

View file

@ -127,7 +127,7 @@ namespace detail
template<typename T, qualifier Q, int IsInt, std::size_t Size, bool Aligned>
struct compute_vec4_equal
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 static bool call(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
{
return
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x) &&
@ -140,7 +140,7 @@ namespace detail
template<typename T, qualifier Q, int IsInt, std::size_t Size, bool Aligned>
struct compute_vec4_nequal
{
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 static bool call(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
{
return !compute_vec4_equal<T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(v1, v2);
}
@ -160,33 +160,33 @@ namespace detail
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec()
# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE
: x(0), y(0), z(0), w(0)
# endif
{}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<4, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<4, T, Q> const& v)
: x(v.x), y(v.y), z(v.z), w(v.w)
{}
# endif
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<4, T, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<4, T, P> const& v)
: x(v.x), y(v.y), z(v.z), w(v.w)
{}
// -- Explicit basic constructors --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(T scalar)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(T scalar)
: x(scalar), y(scalar), z(scalar), w(scalar)
{}
template <typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(T _x, T _y, T _z, T _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(T _x, T _y, T _z, T _w)
: x(_x), y(_y), z(_z), w(_w)
{}
@ -194,7 +194,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, U, P> const& v)
: x(static_cast<T>(v.x))
, y(static_cast<T>(v.x))
, z(static_cast<T>(v.x))
@ -203,7 +203,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(X _x, Y _y, Z _z, W _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(X _x, Y _y, Z _z, W _w)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z))
@ -212,7 +212,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z))
@ -221,7 +221,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z))
@ -230,7 +230,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, W _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, W _w)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z))
@ -239,7 +239,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z.x))
@ -248,7 +248,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, W _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, W _w)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z.x))
@ -257,7 +257,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x))
@ -266,7 +266,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x))
@ -275,7 +275,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, Z _z, vec<1, W, Q> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, Z _z, vec<1, W, Q> const& _w)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z))
@ -284,7 +284,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z))
@ -293,7 +293,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z))
@ -302,7 +302,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(X _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(X _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z.x))
@ -311,7 +311,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_z.x))
@ -320,7 +320,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x))
@ -329,7 +329,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x))
@ -340,7 +340,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<2, A, P> const& _xy, B _z, C _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<2, A, P> const& _xy, B _z, C _w)
: x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z))
@ -349,7 +349,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, C _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, C _w)
: x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z.x))
@ -358,7 +358,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<2, A, P> const& _xy, B _z, vec<1, C, P> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<2, A, P> const& _xy, B _z, vec<1, C, P> const& _w)
: x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z))
@ -367,7 +367,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, vec<1, C, P> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, vec<1, C, P> const& _w)
: x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z.x))
@ -376,7 +376,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(A _x, vec<2, B, P> const& _yz, C _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(A _x, vec<2, B, P> const& _yz, C _w)
: x(static_cast<T>(_x))
, y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y))
@ -385,7 +385,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, C _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, C _w)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y))
@ -394,7 +394,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(A _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(A _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w)
: x(static_cast<T>(_x))
, y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y))
@ -403,7 +403,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y))
@ -412,7 +412,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(A _x, B _y, vec<2, C, P> const& _zw)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(A _x, B _y, vec<2, C, P> const& _zw)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_zw.x))
@ -421,7 +421,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, A, P> const& _x, B _y, vec<2, C, P> const& _zw)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, A, P> const& _x, B _y, vec<2, C, P> const& _zw)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y))
, z(static_cast<T>(_zw.x))
@ -430,7 +430,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(A _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(A _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw)
: x(static_cast<T>(_x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_zw.x))
@ -439,7 +439,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x))
, z(static_cast<T>(_zw.x))
@ -448,7 +448,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<3, A, P> const& _xyz, B _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<3, A, P> const& _xyz, B _w)
: x(static_cast<T>(_xyz.x))
, y(static_cast<T>(_xyz.y))
, z(static_cast<T>(_xyz.z))
@ -457,7 +457,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<3, A, P> const& _xyz, vec<1, B, P> const& _w)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<3, A, P> const& _xyz, vec<1, B, P> const& _w)
: x(static_cast<T>(_xyz.x))
, y(static_cast<T>(_xyz.y))
, z(static_cast<T>(_xyz.z))
@ -466,7 +466,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(A _x, vec<3, B, P> const& _yzw)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(A _x, vec<3, B, P> const& _yzw)
: x(static_cast<T>(_x))
, y(static_cast<T>(_yzw.x))
, z(static_cast<T>(_yzw.y))
@ -475,7 +475,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<3, B, P> const& _yzw)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<3, B, P> const& _yzw)
: x(static_cast<T>(_x.x))
, y(static_cast<T>(_yzw.x))
, z(static_cast<T>(_yzw.y))
@ -484,7 +484,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<2, A, P> const& _xy, vec<2, B, P> const& _zw)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<2, A, P> const& _xy, vec<2, B, P> const& _zw)
: x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y))
, z(static_cast<T>(_zw.x))
@ -493,7 +493,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<4, U, P> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q>::vec(vec<4, U, P> const& v)
: x(static_cast<T>(v.x))
, y(static_cast<T>(v.y))
, z(static_cast<T>(v.z))
@ -510,7 +510,7 @@ namespace detail
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 T const& vec<4, T, Q>::operator[](typename vec<4, T, Q>::length_type i) const
GLM_FUNC_QUALIFIER GLM_CONSTEXPR T const& vec<4, T, Q>::operator[](typename vec<4, T, Q>::length_type i) const
{
assert(i >= 0 && i < this->length());
return (&x)[i];
@ -1118,25 +1118,25 @@ namespace detail
// -- Boolean operators --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 bool operator==(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
{
return detail::compute_vec4_equal<T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(v1, v2);
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 bool operator!=(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
{
return detail::compute_vec4_nequal<T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(v1, v2);
}
template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 vec<4, bool, Q> operator&&(vec<4, bool, Q> const& v1, vec<4, bool, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, bool, Q> operator&&(vec<4, bool, Q> const& v1, vec<4, bool, Q> const& v2)
{
return vec<4, bool, Q>(v1.x && v2.x, v1.y && v2.y, v1.z && v2.z, v1.w && v2.w);
}
template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 vec<4, bool, Q> operator||(vec<4, bool, Q> const& v1, vec<4, bool, Q> const& v2)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, bool, Q> operator||(vec<4, bool, Q> const& v1, vec<4, bool, Q> const& v2)
{
return vec<4, bool, Q>(v1.x || v2.x, v1.y || v2.y, v1.z || v2.z, v1.w || v2.w);
}

View file

@ -347,117 +347,117 @@ namespace detail
# if GLM_USE_ALIGNED_GENTYPES == GLM_ENABLE
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_lowp>::vec(float _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_lowp>::vec(float _s) :
data(_mm_set1_ps(_s))
{}
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_mediump>::vec(float _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_mediump>::vec(float _s) :
data(_mm_set1_ps(_s))
{}
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_highp>::vec(float _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_highp>::vec(float _s) :
data(_mm_set1_ps(_s))
{}
# if GLM_ARCH & GLM_ARCH_AVX_BIT
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, double, aligned_lowp>::vec(double _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, double, aligned_lowp>::vec(double _s) :
data(_mm256_set1_pd(_s))
{}
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, double, aligned_mediump>::vec(double _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, double, aligned_mediump>::vec(double _s) :
data(_mm256_set1_pd(_s))
{}
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, double, aligned_highp>::vec(double _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, double, aligned_highp>::vec(double _s) :
data(_mm256_set1_pd(_s))
{}
# endif
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_lowp>::vec(int32 _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, int32, aligned_lowp>::vec(int32 _s) :
data(_mm_set1_epi32(_s))
{}
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_mediump>::vec(int32 _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, int32, aligned_mediump>::vec(int32 _s) :
data(_mm_set1_epi32(_s))
{}
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_highp>::vec(int32 _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, int32, aligned_highp>::vec(int32 _s) :
data(_mm_set1_epi32(_s))
{}
# if GLM_ARCH & GLM_ARCH_AVX2_BIT
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int64, aligned_lowp>::vec(int64 _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, int64, aligned_lowp>::vec(int64 _s) :
data(_mm256_set1_epi64x(_s))
{}
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int64, aligned_mediump>::vec(int64 _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, int64, aligned_mediump>::vec(int64 _s) :
data(_mm256_set1_epi64x(_s))
{}
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int64, aligned_highp>::vec(int64 _s) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, int64, aligned_highp>::vec(int64 _s) :
data(_mm256_set1_epi64x(_s))
{}
# endif
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_lowp>::vec(float _x, float _y, float _z, float _w) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_lowp>::vec(float _x, float _y, float _z, float _w) :
data(_mm_set_ps(_w, _z, _y, _x))
{}
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_mediump>::vec(float _x, float _y, float _z, float _w) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_mediump>::vec(float _x, float _y, float _z, float _w) :
data(_mm_set_ps(_w, _z, _y, _x))
{}
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_highp>::vec(float _x, float _y, float _z, float _w) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_highp>::vec(float _x, float _y, float _z, float _w) :
data(_mm_set_ps(_w, _z, _y, _x))
{}
template<>
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_lowp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, int32, aligned_lowp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
data(_mm_set_epi32(_w, _z, _y, _x))
{}
template<>
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_mediump>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, int32, aligned_mediump>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
data(_mm_set_epi32(_w, _z, _y, _x))
{}
template<>
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_highp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, int32, aligned_highp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
data(_mm_set_epi32(_w, _z, _y, _x))
{}
template<>
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_lowp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_lowp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
data(_mm_castsi128_ps(_mm_set_epi32(_w, _z, _y, _x)))
{}
template<>
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_mediump>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_mediump>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
data(_mm_castsi128_ps(_mm_set_epi32(_w, _z, _y, _x)))
{}
template<>
template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_highp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_highp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
data(_mm_castsi128_ps(_mm_set_epi32(_w, _z, _y, _x)))
{}
#endif// GLM_USE_ALIGNED_GENTYPES == GLM_ENABLE

View file

@ -76,37 +76,37 @@ namespace glm
/// Return the count of components of the vector
typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 1;}
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 1;}
GLM_FUNC_DECL T & operator[](length_type i);
GLM_FUNC_DECL T const& operator[](length_type i) const;
// -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec const& v) GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, T, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, T, P> const& v);
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
// -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<2, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<2, U, P> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<3, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, P> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<4, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<1, U, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<1, U, P> const& v);
// -- Swizzle constructors --
/*
@ -282,16 +282,16 @@ namespace glm
// -- Boolean operators --
template<typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 bool operator==(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
template<typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 bool operator!=(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 vec<1, bool, Q> operator&&(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, bool, Q> operator&&(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2);
template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 vec<1, bool, Q> operator||(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2);
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, bool, Q> operator||(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2);
/// 1 component vector of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
///

View file

@ -27,147 +27,147 @@ namespace glm
/// Return the epsilon constant for floating point types.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType epsilon();
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon();
/// Return 0.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType zero();
GLM_FUNC_DECL GLM_CONSTEXPR genType zero();
/// Return 1.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType one();
GLM_FUNC_DECL GLM_CONSTEXPR genType one();
/// Return the pi constant.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType pi();
/// Return pi * 2.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType two_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi();
/// Return square root of pi.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType root_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType root_pi();
/// Return pi / 2.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType half_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType half_pi();
/// Return pi / 2 * 3.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType three_over_two_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType three_over_two_pi();
/// Return pi / 4.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType quarter_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType quarter_pi();
/// Return 1 / pi.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType one_over_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_pi();
/// Return 1 / (pi * 2).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType one_over_two_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_two_pi();
/// Return 2 / pi.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType two_over_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_pi();
/// Return 4 / pi.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType four_over_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType four_over_pi();
/// Return 2 / sqrt(pi).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType two_over_root_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_root_pi();
/// Return 1 / sqrt(2).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType one_over_root_two();
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_root_two();
/// Return sqrt(pi / 2).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType root_half_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType root_half_pi();
/// Return sqrt(2 * pi).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType root_two_pi();
GLM_FUNC_DECL GLM_CONSTEXPR genType root_two_pi();
/// Return sqrt(ln(4)).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType root_ln_four();
GLM_FUNC_DECL GLM_CONSTEXPR genType root_ln_four();
/// Return e constant.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType e();
GLM_FUNC_DECL GLM_CONSTEXPR genType e();
/// Return Euler's constant.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType euler();
GLM_FUNC_DECL GLM_CONSTEXPR genType euler();
/// Return sqrt(2).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType root_two();
GLM_FUNC_DECL GLM_CONSTEXPR genType root_two();
/// Return sqrt(3).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType root_three();
GLM_FUNC_DECL GLM_CONSTEXPR genType root_three();
/// Return sqrt(5).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType root_five();
GLM_FUNC_DECL GLM_CONSTEXPR genType root_five();
/// Return ln(2).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType ln_two();
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_two();
/// Return ln(10).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType ln_ten();
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ten();
/// Return ln(ln(2)).
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType ln_ln_two();
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ln_two();
/// Return 1 / 3.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType third();
GLM_FUNC_DECL GLM_CONSTEXPR genType third();
/// Return 2 / 3.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType two_thirds();
GLM_FUNC_DECL GLM_CONSTEXPR genType two_thirds();
/// Return the golden ratio constant.
/// @see gtc_constants
template<typename genType>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 genType golden_ratio();
GLM_FUNC_DECL GLM_CONSTEXPR genType golden_ratio();
/// @}
} //namespace glm

View file

@ -6,175 +6,175 @@
namespace glm
{
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType epsilon()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon()
{
return std::numeric_limits<genType>::epsilon();
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType zero()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType zero()
{
return genType(0);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType one()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one()
{
return genType(1);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi()
{
return genType(3.14159265358979323846264338327950288);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType two_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_pi()
{
return genType(6.28318530717958647692528676655900576);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType root_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_pi()
{
return genType(1.772453850905516027);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType half_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType half_pi()
{
return genType(1.57079632679489661923132169163975144);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType three_over_two_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType three_over_two_pi()
{
return genType(4.71238898038468985769396507491925432);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType quarter_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType quarter_pi()
{
return genType(0.785398163397448309615660845819875721);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType one_over_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one_over_pi()
{
return genType(0.318309886183790671537767526745028724);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType one_over_two_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one_over_two_pi()
{
return genType(0.159154943091895335768883763372514362);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType two_over_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_over_pi()
{
return genType(0.636619772367581343075535053490057448);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType four_over_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType four_over_pi()
{
return genType(1.273239544735162686151070106980114898);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType two_over_root_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_over_root_pi()
{
return genType(1.12837916709551257389615890312154517);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType one_over_root_two()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType one_over_root_two()
{
return genType(0.707106781186547524400844362104849039);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType root_half_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_half_pi()
{
return genType(1.253314137315500251);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType root_two_pi()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_two_pi()
{
return genType(2.506628274631000502);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType root_ln_four()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_ln_four()
{
return genType(1.17741002251547469);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType e()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType e()
{
return genType(2.71828182845904523536);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType euler()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType euler()
{
return genType(0.577215664901532860606);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType root_two()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_two()
{
return genType(1.41421356237309504880168872420969808);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType root_three()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_three()
{
return genType(1.73205080756887729352744634150587236);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType root_five()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType root_five()
{
return genType(2.23606797749978969640917366873127623);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType ln_two()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType ln_two()
{
return genType(0.693147180559945309417232121458176568);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType ln_ten()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType ln_ten()
{
return genType(2.30258509299404568401799145468436421);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType ln_ln_two()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType ln_ln_two()
{
return genType(-0.3665129205816643);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType third()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType third()
{
return genType(0.3333333333333333333333333333333333333333);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType two_thirds()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType two_thirds()
{
return genType(0.666666666666666666666666666666666666667);
}
template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 genType golden_ratio()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType golden_ratio()
{
return genType(1.61803398874989484820458683436563811);
}

View file

@ -52,27 +52,27 @@ namespace glm
typedef length_t length_type;
/// Return the count of components of a quaternion
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 4;}
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
GLM_FUNC_DECL T & operator[](length_type i);
GLM_FUNC_DECL T const& operator[](length_type i) const;
// -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 tquat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 tquat(tquat<T, Q> const& q) GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR tquat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR tquat(tquat<T, Q> const& q) GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 tquat(tquat<T, P> const& q);
GLM_FUNC_DECL GLM_CONSTEXPR tquat(tquat<T, P> const& q);
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 tquat(T s, vec<3, T, Q> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 tquat(T w, T x, T y, T z);
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T s, vec<3, T, Q> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T w, T x, T y, T z);
// -- Conversion constructors --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT tquat(tquat<U, P> const& q);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tquat(tquat<U, P> const& q);
/// Explicit conversion operators
# if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS

View file

@ -86,33 +86,33 @@ namespace detail
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat()
# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE
: x(0), y(0), z(0), w(1)
# endif
{}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat(tquat<T, Q> const& q)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat(tquat<T, Q> const& q)
: x(q.x), y(q.y), z(q.z), w(q.w)
{}
# endif
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat(tquat<T, P> const& q)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat(tquat<T, P> const& q)
: x(q.x), y(q.y), z(q.z), w(q.w)
{}
// -- Explicit basic constructors --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat(T s, vec<3, T, Q> const& v)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat(T s, vec<3, T, Q> const& v)
: x(v.x), y(v.y), z(v.z), w(s)
{}
template <typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat(T _w, T _x, T _y, T _z)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat(T _w, T _x, T _y, T _z)
: x(_x), y(_y), z(_z), w(_w)
{}
@ -120,7 +120,7 @@ namespace detail
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat(tquat<U, P> const& q)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat(tquat<U, P> const& q)
: x(static_cast<T>(q.x))
, y(static_cast<T>(q.y))
, z(static_cast<T>(q.z))

View file

@ -49,31 +49,31 @@ namespace glm
typedef length_t length_type;
/// Return the count of components of a dual quaternion
GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 2;}
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 2;}
GLM_FUNC_DECL part_type & operator[](length_type i);
GLM_FUNC_DECL part_type const& operator[](length_type i) const;
// -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 tdualquat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 tdualquat(tdualquat<T, Q> const& d) GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tdualquat<T, Q> const& d) GLM_DEFAULT;
template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 tdualquat(tdualquat<T, P> const& d);
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tdualquat<T, P> const& d);
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 tdualquat(tquat<T, Q> const& real);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 tdualquat(tquat<T, Q> const& orientation, vec<3, T, Q> const& translation);
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 tdualquat(tquat<T, Q> const& real, tquat<T, Q> const& dual);
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, Q> const& real);
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, Q> const& orientation, vec<3, T, Q> const& translation);
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, Q> const& real, tquat<T, Q> const& dual);
// -- Conversion constructors --
template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX14 GLM_EXPLICIT tdualquat(tdualquat<U, P> const& q);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tdualquat(tdualquat<U, P> const& q);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 tdualquat(mat<2, 4, T, Q> const& holder_mat);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR_CXX14 tdualquat(mat<3, 4, T, Q> const& aug_mat);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR tdualquat(mat<2, 4, T, Q> const& holder_mat);
GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR tdualquat(mat<3, 4, T, Q> const& aug_mat);
// -- Unary arithmetic operators --

View file

@ -26,7 +26,7 @@ namespace glm
# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 tdualquat<T, Q>::tdualquat()
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat()
# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE
: real(tquat<T, Q>())
, dual(tquat<T, Q>(0, 0, 0, 0))
@ -34,7 +34,7 @@ namespace glm
{}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 tdualquat<T, Q>::tdualquat(tdualquat<T, Q> const& d)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tdualquat<T, Q> const& d)
: real(d.real)
, dual(d.dual)
{}
@ -42,7 +42,7 @@ namespace glm
template<typename T, qualifier Q>
template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 tdualquat<T, Q>::tdualquat(tdualquat<T, P> const& d)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tdualquat<T, P> const& d)
: real(d.real)
, dual(d.dual)
{}
@ -50,12 +50,12 @@ namespace glm
// -- Explicit basic constructors --
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 tdualquat<T, Q>::tdualquat(tquat<T, Q> const& r)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tquat<T, Q> const& r)
: real(r), dual(tquat<T, Q>(0, 0, 0, 0))
{}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 tdualquat<T, Q>::tdualquat(tquat<T, Q> const& q, vec<3, T, Q> const& p)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tquat<T, Q> const& q, vec<3, T, Q> const& p)
: real(q), dual(
T(-0.5) * ( p.x*q.x + p.y*q.y + p.z*q.z),
T(+0.5) * ( p.x*q.w + p.y*q.z - p.z*q.y),
@ -64,7 +64,7 @@ namespace glm
{}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 tdualquat<T, Q>::tdualquat(tquat<T, Q> const& r, tquat<T, Q> const& d)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tquat<T, Q> const& r, tquat<T, Q> const& d)
: real(r), dual(d)
{}
@ -72,19 +72,19 @@ namespace glm
template<typename T, qualifier Q>
template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 tdualquat<T, Q>::tdualquat(tdualquat<U, P> const& q)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tdualquat<U, P> const& q)
: real(q.real)
, dual(q.dual)
{}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 tdualquat<T, Q>::tdualquat(mat<2, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(mat<2, 4, T, Q> const& m)
{
*this = dualquat_cast(m);
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 tdualquat<T, Q>::tdualquat(mat<3, 4, T, Q> const& m)
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(mat<3, 4, T, Q> const& m)
{
*this = dualquat_cast(m);
}

View file

@ -33,7 +33,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml">GLSL radians man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec<L, T, Q> radians(vec<L, T, Q> const& degrees);
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> radians(vec<L, T, Q> const& degrees);
/// Converts radians to degrees and returns the result.
///
@ -44,7 +44,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml">GLSL degrees man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec<L, T, Q> degrees(vec<L, T, Q> const& radians);
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> degrees(vec<L, T, Q> const& radians);
/// The standard trigonometric sine function.
/// The values returned by this function will range from [-1, 1].

View file

@ -68,6 +68,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
- Anonymous unions require C++ language extensions
- Fixed ortho #790
- Fixed Visual C++ 2013 warnings in vector relational code #782
- Fixed ICC build errors with constexpr #704
### [GLM 0.9.9.0](https://github.com/g-truc/glm/releases/tag/0.9.9.0) - 2018-05-22
#### Features:

View file

@ -10,7 +10,7 @@ struct _swizzle
struct vec2
{
GLM_CONSTEXPR_CXX11 vec2() :
GLM_CONSTEXPR vec2() :
x(0), y(0)
{}

View file

@ -1291,13 +1291,13 @@ namespace ldexp_
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::abs(1.0f) > 0.0f, "GLM: Failed constexpr");
static_assert(glm::abs(glm::vec1(1.0f)) != glm::vec1(0.0f), "GLM: Failed constexpr");
static_assert(glm::abs(glm::vec2(1.0f)) != glm::vec2(0.0f), "GLM: Failed constexpr");
static_assert(glm::abs(glm::vec3(1.0f)) != glm::vec3(0.0f), "GLM: Failed constexpr");
static_assert(glm::abs(glm::vec4(1.0f)) != glm::vec4(0.0f), "GLM: Failed constexpr");
#endif // GLM_HAS_CONSTEXPR_CXX14
#endif // GLM_HAS_CONSTEXPR
return 0;
}

View file

@ -157,7 +157,7 @@ int test_size()
int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::mat2x2::length() == 2, "GLM: Failed constexpr");
#endif

View file

@ -122,7 +122,7 @@ int test_size()
int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::mat2x3::length() == 2, "GLM: Failed constexpr");
#endif

View file

@ -124,7 +124,7 @@ static int test_size()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::mat2x4::length() == 2, "GLM: Failed constexpr");
#endif

View file

@ -126,7 +126,7 @@ static int test_size()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::mat3x2::length() == 3, "GLM: Failed constexpr");
#endif

View file

@ -185,10 +185,10 @@ static int test_size()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::mat3x3::length() == 3, "GLM: Failed constexpr");
GLM_CONSTEXPR_CXX11 glm::mat3x3 const Z(0.0f);
GLM_CONSTEXPR glm::mat3x3 const Z(0.0f);
static_assert(Z[0] == glm::vec3(0.0f), "GLM: Failed constexpr");
static_assert(Z == glm::mat3x3(0.0f), "GLM: Failed constexpr");
#endif

View file

@ -128,7 +128,7 @@ static int test_size()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::mat3x4::length() == 3, "GLM: Failed constexpr");
#endif

View file

@ -130,7 +130,7 @@ static int test_size()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::mat4x2::length() == 4, "GLM: Failed constexpr");
#endif

View file

@ -130,7 +130,7 @@ static int test_size()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::mat4x3::length() == 4, "GLM: Failed constexpr");
#endif

View file

@ -323,7 +323,7 @@ static int test_constexpr()
{
glm::mat4 const I(1.0f);
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::mat4::length() == 4, "GLM: Failed constexpr");
#endif

View file

@ -145,7 +145,7 @@ static int test_swizzle()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::vec1::length() == 1, "GLM: Failed constexpr");
static_assert(glm::vec1(1.0f).x > 0.0f, "GLM: Failed constexpr");
#endif

View file

@ -299,7 +299,7 @@ static int test_size()
Error += glm::vec2::length() == 2 ? 0 : 1;
Error += glm::dvec2::length() == 2 ? 0 : 1;
GLM_CONSTEXPR_CXX11 std::size_t Length = glm::vec2::length();
GLM_CONSTEXPR std::size_t Length = glm::vec2::length();
Error += Length == 2 ? 0 : 1;
return Error;
@ -334,7 +334,7 @@ static int test_operator_increment()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::vec2::length() == 2, "GLM: Failed constexpr");
static_assert(glm::vec2(1.0f).x > 0.0f, "GLM: Failed constexpr");
static_assert(glm::vec2(1.0f, -1.0f).x > 0.0f, "GLM: Failed constexpr");

View file

@ -307,7 +307,7 @@ int test_vec3_size()
Error += glm::vec3::length() == 3 ? 0 : 1;
Error += glm::dvec3::length() == 3 ? 0 : 1;
GLM_CONSTEXPR_CXX11 std::size_t Length = glm::vec3::length();
GLM_CONSTEXPR std::size_t Length = glm::vec3::length();
Error += Length == 3 ? 0 : 1;
return Error;
@ -595,7 +595,7 @@ static int test_swizzle()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::vec3::length() == 3, "GLM: Failed constexpr");
static_assert(glm::vec3(1.0f).x > 0.0f, "GLM: Failed constexpr");
static_assert(glm::vec3(1.0f) == glm::vec3(1.0f), "GLM: Failed constexpr");

View file

@ -749,7 +749,7 @@ static int test_inheritance()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX14
#if GLM_HAS_CONSTEXPR
static_assert(glm::vec4::length() == 4, "GLM: Failed constexpr");
static_assert(glm::vec4(1.0f).x > 0.0f, "GLM: Failed constexpr");
static_assert(glm::vec4(1.0f) == glm::vec4(1.0f), "GLM: Failed constexpr");

View file

@ -76,7 +76,7 @@ static int test_vec1_size()
Error += glm::vec1::length() == 1 ? 0 : 1;
Error += glm::dvec1::length() == 1 ? 0 : 1;
GLM_CONSTEXPR_CXX11 std::size_t Length = glm::vec1::length();
GLM_CONSTEXPR std::size_t Length = glm::vec1::length();
Error += Length == 1 ? 0 : 1;
return Error;
@ -134,7 +134,7 @@ static int test_bvec1_ctor()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX11
#if GLM_HAS_CONSTEXPR
static_assert(glm::vec1::length() == 1, "GLM: Failed constexpr");
static_assert(glm::vec1(1.0f).x > 0.0f, "GLM: Failed constexpr");
#endif

View file

@ -309,7 +309,7 @@ int test_size()
static int test_constexpr()
{
#if GLM_HAS_CONSTEXPR_CXX11
#if GLM_HAS_CONSTEXPR
static_assert(glm::quat::length() == 4, "GLM: Failed constexpr");
static_assert(glm::quat(1.0f, glm::vec3(0.0f)).w > 0.0f, "GLM: Failed constexpr");
#endif

View file

@ -95,7 +95,7 @@ static int test_ctor()
{
int Error = 0;
# if GLM_HAS_CONSTEXPR_CXX11
# if GLM_HAS_CONSTEXPR
{
constexpr glm::aligned_ivec4 v(1);
@ -122,7 +122,7 @@ static int test_ctor()
Error += v.z == 1 ? 0 : 1;
Error += v.w == 1 ? 0 : 1;
}
# endif//GLM_HAS_CONSTEXPR_CXX11
# endif//GLM_HAS_CONSTEXPR
return Error;
}