Redesigned constexpr support which requires disable GLM SIMD on Visual C++ #783

This commit is contained in:
Groove 2018-07-09 21:44:28 +02:00
parent cdcc9467d0
commit 398e66ac32
43 changed files with 638 additions and 645 deletions

View File

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

View File

@ -441,6 +441,43 @@
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA70)))) ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA70))))
#endif #endif
// N2235 Generalized Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
#if GLM_COMPILER & GLM_COMPILER_CLANG
# define GLM_HAS_CONSTEXPR_CXX11 __has_feature(cxx_constexpr)
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
# define GLM_HAS_CONSTEXPR_CXX11 1
#else
# define GLM_HAS_CONSTEXPR_CXX11 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14) && (GLM_ARCH == GLM_ARCH_PURE)))) // Visual C++ has a bug #594 https://github.com/g-truc/glm/issues/594
#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
# define GLM_HAS_CONSTEXPR_CXX14 __has_feature(cxx_relaxed_constexpr)
#elif GLM_LANG & GLM_LANG_CXX14_FLAG
# define GLM_HAS_CONSTEXPR_CXX14 1
#else
# define GLM_HAS_CONSTEXPR_CXX14 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC50)) || \
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL17)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14) && (GLM_ARCH == GLM_ARCH_PURE))))
#endif
#if GLM_HAS_CONSTEXPR_CXX14
# define GLM_CONSTEXPR_CXX14 constexpr
#else
# define GLM_CONSTEXPR_CXX14
#endif
//
#define GLM_HAS_ONLY_XYZW ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER < GLM_COMPILER_GCC46)) #define GLM_HAS_ONLY_XYZW ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER < GLM_COMPILER_GCC46))
#if GLM_HAS_ONLY_XYZW #if GLM_HAS_ONLY_XYZW
# pragma message("GLM: GCC older than 4.6 has a bug presenting the use of rgba and stpq components") # pragma message("GLM: GCC older than 4.6 has a bug presenting the use of rgba and stpq components")
@ -511,7 +548,6 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
// nullptr // nullptr
//
#if GLM_LANG & GLM_LANG_CXX0X_FLAG #if GLM_LANG & GLM_LANG_CXX0X_FLAG
# define GLM_HAS_NULLPTR 1 # define GLM_HAS_NULLPTR 1
#else #else
@ -735,41 +771,7 @@
# define GLM_DEFAULT_CTOR # define GLM_DEFAULT_CTOR
#endif #endif
#if GLM_HAS_CONSTEXPR || GLM_HAS_CONSTEXPR_PARTIAL ///////////////////////////////////////////////////////////////////////////////////
# define GLM_CONSTEXPR constexpr
# if ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER <= GLM_COMPILER_VC14)) // Visual C++ has a bug #594 https://github.com/g-truc/glm/issues/594
# define GLM_CONSTEXPR_CTOR
# else
# define GLM_CONSTEXPR_CTOR constexpr
# endif
#else
# define GLM_CONSTEXPR
# define GLM_CONSTEXPR_CTOR
#endif
#if GLM_HAS_CONSTEXPR
# define GLM_RELAXED_CONSTEXPR constexpr
#else
# define GLM_RELAXED_CONSTEXPR const
#endif
#if GLM_LANG >= GLM_LANG_CXX14
# if ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER <= GLM_COMPILER_VC14)) // Visual C++ < 2017 does not support extended const expressions https://msdn.microsoft.com/en-us/library/hh567368.aspx https://github.com/g-truc/glm/issues/749
# define GLM_CONSTEXPR_CXX14
# else
# define GLM_CONSTEXPR_CXX14 GLM_CONSTEXPR
# endif
# define GLM_CONSTEXPR_CTOR_CXX14 GLM_CONSTEXPR_CTOR
#else
# define GLM_CONSTEXPR_CXX14
# define GLM_CONSTEXPR_CTOR_CXX14
#endif
#if GLM_ARCH == GLM_ARCH_PURE
# define GLM_CONSTEXPR_SIMD GLM_CONSTEXPR_CTOR
#else
# define GLM_CONSTEXPR_SIMD
#endif
#ifdef GLM_FORCE_EXPLICIT_CTOR #ifdef GLM_FORCE_EXPLICIT_CTOR
# define GLM_EXPLICIT explicit # define GLM_EXPLICIT explicit

View File

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

View File

@ -9,7 +9,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat()
{ {
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
this->value[0] = col_type(1, 0); this->value[0] = col_type(1, 0);
@ -20,7 +20,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -29,21 +29,21 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 2, T, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 2, T, P> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0); this->value[0] = col_type(scalar, 0);
this->value[1] = col_type(0, scalar); this->value[1] = col_type(0, scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat
( (
T const& x0, T const& y0, T const& x0, T const& y0,
T const& x1, T const& y1 T const& x1, T const& y1
@ -54,7 +54,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(col_type const& v0, col_type const& v1) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(col_type const& v0, col_type const& v1)
{ {
this->value[0] = v0; this->value[0] = v0;
this->value[1] = v1; this->value[1] = v1;
@ -64,7 +64,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X1, typename Y1, typename X2, typename Y2> template<typename X1, typename Y1, typename X2, typename Y2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat
( (
X1 const& x1, Y1 const& y1, X1 const& x1, Y1 const& y1,
X2 const& x2, Y2 const& y2 X2 const& x2, Y2 const& y2
@ -76,7 +76,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2> template<typename V1, typename V2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(vec<2, V1, Q> const& v1, vec<2, V2, Q> const& 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)
{ {
this->value[0] = col_type(v1); this->value[0] = col_type(v1);
this->value[1] = col_type(v2); this->value[1] = col_type(v2);
@ -86,63 +86,63 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 2, U, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 2, U, P> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<3, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<4, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<4, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<3, 2, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<2, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<4, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<4, 2, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<3, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<3, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 2, T, Q>::mat(mat<4, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat(mat<4, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);

View File

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

View File

@ -7,7 +7,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat()
{ {
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
this->value[0] = col_type(1, 0, 0); this->value[0] = col_type(1, 0, 0);
@ -18,7 +18,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 3, T, Q> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -27,21 +27,21 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 3, T, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 3, T, P> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0, 0); this->value[0] = col_type(scalar, 0, 0);
this->value[1] = col_type(0, scalar, 0); this->value[1] = col_type(0, scalar, 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat
( (
T x0, T y0, T z0, T x0, T y0, T z0,
T x1, T y1, T z1 T x1, T y1, T z1
@ -52,7 +52,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(col_type const& v0, col_type const& v1) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(col_type const& v0, col_type const& v1)
{ {
this->value[0] = v0; this->value[0] = v0;
this->value[1] = v1; this->value[1] = v1;
@ -64,7 +64,7 @@ namespace glm
template< template<
typename X1, typename Y1, typename Z1, typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2> typename X2, typename Y2, typename Z2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat
( (
X1 x1, Y1 y1, Z1 z1, X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2 X2 x2, Y2 y2, Z2 z2
@ -76,7 +76,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2> template<typename V1, typename V2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(vec<3, V1, Q> const& v1, vec<3, V2, Q> const& 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)
{ {
this->value[0] = col_type(v1); this->value[0] = col_type(v1);
this->value[1] = col_type(v2); this->value[1] = col_type(v2);
@ -86,63 +86,63 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 3, U, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 3, U, P> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<3, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<4, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<4, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<2, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<3, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<3, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<3, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<4, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<4, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 3, T, Q>::mat(mat<4, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat(mat<4, 3, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];

View File

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

View File

@ -7,7 +7,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat()
{ {
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
this->value[0] = col_type(1, 0, 0, 0); this->value[0] = col_type(1, 0, 0, 0);
@ -18,7 +18,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 4, T, Q> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -27,14 +27,14 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 4, T, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 4, T, P> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(T scalar)
{ {
value_type const Zero(0); value_type const Zero(0);
this->value[0] = col_type(scalar, Zero, Zero, Zero); this->value[0] = col_type(scalar, Zero, Zero, Zero);
@ -42,7 +42,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat
( (
T x0, T y0, T z0, T w0, T x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1 T x1, T y1, T z1, T w1
@ -53,7 +53,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(col_type const& v0, col_type const& v1) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(col_type const& v0, col_type const& v1)
{ {
this->value[0] = v0; this->value[0] = v0;
this->value[1] = v1; this->value[1] = v1;
@ -65,7 +65,7 @@ namespace glm
template< template<
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2> typename X2, typename Y2, typename Z2, typename W2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat
( (
X1 x1, Y1 y1, Z1 z1, W1 w1, X1 x1, Y1 y1, Z1 z1, W1 w1,
X2 x2, Y2 y2, Z2 z2, W2 w2 X2 x2, Y2 y2, Z2 z2, W2 w2
@ -77,7 +77,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2> template<typename V1, typename V2>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(vec<4, V1, Q> const& v1, vec<4, V2, Q> const& 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)
{ {
this->value[0] = col_type(v1); this->value[0] = col_type(v1);
this->value[1] = col_type(v2); this->value[1] = col_type(v2);
@ -87,63 +87,63 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 4, U, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 4, U, P> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<3, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<4, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<4, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<2, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<3, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<3, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<3, 4, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<4, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<4, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<2, 4, T, Q>::mat(mat<4, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat(mat<4, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);

View File

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

View File

@ -7,7 +7,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat()
{ {
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
this->value[0] = col_type(1, 0); this->value[0] = col_type(1, 0);
@ -19,7 +19,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 2, T, Q> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -29,7 +29,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 2, T, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 2, T, P> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -37,7 +37,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0); this->value[0] = col_type(scalar, 0);
this->value[1] = col_type(0, scalar); this->value[1] = col_type(0, scalar);
@ -45,7 +45,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat
( (
T x0, T y0, T x0, T y0,
T x1, T y1, T x1, T y1,
@ -58,7 +58,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat
( (
col_type const& v0, col_type const& v0,
col_type const& v1, col_type const& v1,
@ -77,7 +77,7 @@ namespace glm
typename X1, typename Y1, typename X1, typename Y1,
typename X2, typename Y2, typename X2, typename Y2,
typename X3, typename Y3> typename X3, typename Y3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat
( (
X1 x1, Y1 y1, X1 x1, Y1 y1,
X2 x2, Y2 y2, X2 x2, Y2 y2,
@ -91,7 +91,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3> template<typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat
( (
vec<2, V1, Q> const& v1, vec<2, V1, Q> const& v1,
vec<2, V2, Q> const& v2, vec<2, V2, Q> const& v2,
@ -107,7 +107,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 2, U, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 2, U, P> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -115,7 +115,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
@ -123,7 +123,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -131,7 +131,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<4, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<4, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -139,7 +139,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<2, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<2, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -147,7 +147,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<2, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -155,7 +155,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<3, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -163,7 +163,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<4, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<4, 2, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
@ -171,7 +171,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 2, T, Q>::mat(mat<4, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat(mat<4, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);

View File

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

View File

@ -9,7 +9,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat()
{ {
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
this->value[0] = col_type(1, 0, 0); this->value[0] = col_type(1, 0, 0);
@ -21,7 +21,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 3, T, Q> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -31,7 +31,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 3, T, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 3, T, P> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -39,7 +39,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0, 0); this->value[0] = col_type(scalar, 0, 0);
this->value[1] = col_type(0, scalar, 0); this->value[1] = col_type(0, scalar, 0);
@ -47,7 +47,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat
( (
T x0, T y0, T z0, T x0, T y0, T z0,
T x1, T y1, T z1, T x1, T y1, T z1,
@ -60,7 +60,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat
( (
col_type const& v0, col_type const& v0,
col_type const& v1, col_type const& v1,
@ -79,7 +79,7 @@ namespace glm
typename X1, typename Y1, typename Z1, typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2, typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3> typename X3, typename Y3, typename Z3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat
( (
X1 x1, Y1 y1, Z1 z1, X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2, X2 x2, Y2 y2, Z2 z2,
@ -93,7 +93,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3> template<typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat
( (
vec<3, V1, Q> const& v1, vec<3, V1, Q> const& v1,
vec<3, V2, Q> const& v2, vec<3, V2, Q> const& v2,
@ -109,7 +109,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 3, U, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 3, U, P> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -117,7 +117,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
@ -125,7 +125,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<4, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<4, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -133,7 +133,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<2, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<2, 3, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
@ -141,7 +141,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
@ -149,7 +149,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<2, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -157,7 +157,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<4, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<4, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
@ -165,7 +165,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<3, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -173,7 +173,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 3, T, Q>::mat(mat<4, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat(mat<4, 3, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];

View File

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

View File

@ -7,7 +7,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat()
{ {
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
this->value[0] = col_type(1, 0, 0, 0); this->value[0] = col_type(1, 0, 0, 0);
@ -19,7 +19,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 4, T, Q> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -29,7 +29,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 4, T, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 4, T, P> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -37,7 +37,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0, 0, 0); this->value[0] = col_type(scalar, 0, 0, 0);
this->value[1] = col_type(0, scalar, 0, 0); this->value[1] = col_type(0, scalar, 0, 0);
@ -45,7 +45,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat
( (
T x0, T y0, T z0, T w0, T x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1, T x1, T y1, T z1, T w1,
@ -58,7 +58,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat
( (
col_type const& v0, col_type const& v0,
col_type const& v1, col_type const& v1,
@ -77,7 +77,7 @@ namespace glm
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2, typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3> typename X3, typename Y3, typename Z3, typename W3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat
( (
X1 x1, Y1 y1, Z1 z1, W1 w1, X1 x1, Y1 y1, Z1 z1, W1 w1,
X2 x2, Y2 y2, Z2 z2, W2 w2, X2 x2, Y2 y2, Z2 z2, W2 w2,
@ -91,7 +91,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3> template<typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat
( (
vec<4, V1, Q> const& v1, vec<4, V1, Q> const& v1,
vec<4, V2, Q> const& v2, vec<4, V2, Q> const& v2,
@ -107,7 +107,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 4, U, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 4, U, P> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -115,7 +115,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
@ -123,7 +123,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
@ -131,7 +131,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<4, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<4, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -139,7 +139,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<2, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<2, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
@ -147,7 +147,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<3, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
@ -155,7 +155,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<2, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -163,7 +163,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<4, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<4, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
@ -171,7 +171,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<3, 4, T, Q>::mat(mat<4, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat(mat<4, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);

View File

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

View File

@ -7,7 +7,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat()
{ {
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
this->value[0] = col_type(1, 0); this->value[0] = col_type(1, 0);
@ -20,7 +20,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 2, T, Q> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -31,7 +31,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 2, T, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 2, T, P> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -40,7 +40,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0); this->value[0] = col_type(scalar, 0);
this->value[1] = col_type(0, scalar); this->value[1] = col_type(0, scalar);
@ -49,7 +49,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat
( (
T x0, T y0, T x0, T y0,
T x1, T y1, T x1, T y1,
@ -64,7 +64,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat
( (
col_type const& v0, col_type const& v0,
col_type const& v1, col_type const& v1,
@ -86,7 +86,7 @@ namespace glm
typename X2, typename Y2, typename X2, typename Y2,
typename X3, typename Y3, typename X3, typename Y3,
typename X4, typename Y4> typename X4, typename Y4>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat
( (
X1 x1, Y1 y1, X1 x1, Y1 y1,
X2 x2, Y2 y2, X2 x2, Y2 y2,
@ -102,7 +102,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3, typename V4> template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat
( (
vec<2, V1, Q> const& v1, vec<2, V1, Q> const& v1,
vec<2, V2, Q> const& v2, vec<2, V2, Q> const& v2,
@ -120,7 +120,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 2, U, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 2, U, P> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -129,7 +129,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -138,7 +138,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<3, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -147,7 +147,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -156,7 +156,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<2, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<2, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -165,7 +165,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<3, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -174,7 +174,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<2, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -183,7 +183,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<4, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -192,7 +192,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 2, T, Q>::mat(mat<3, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat(mat<3, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);

View File

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

View File

@ -7,7 +7,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat()
{ {
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
this->value[0] = col_type(1, 0, 0); this->value[0] = col_type(1, 0, 0);
@ -20,7 +20,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 3, T, Q> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -31,7 +31,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 3, T, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 3, T, P> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
@ -40,7 +40,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(T const& s) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(T const& s)
{ {
this->value[0] = col_type(s, 0, 0); this->value[0] = col_type(s, 0, 0);
this->value[1] = col_type(0, s, 0); this->value[1] = col_type(0, s, 0);
@ -49,7 +49,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat
( (
T const& x0, T const& y0, T const& z0, T const& x0, T const& y0, T const& z0,
T const& x1, T const& y1, T const& z1, T const& x1, T const& y1, T const& z1,
@ -64,7 +64,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat
( (
col_type const& v0, col_type const& v0,
col_type const& v1, col_type const& v1,
@ -86,7 +86,7 @@ namespace glm
typename X2, typename Y2, typename Z2, typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3, typename X3, typename Y3, typename Z3,
typename X4, typename Y4, typename Z4> typename X4, typename Y4, typename Z4>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat
( (
X1 const& x1, Y1 const& y1, Z1 const& z1, X1 const& x1, Y1 const& y1, Z1 const& z1,
X2 const& x2, Y2 const& y2, Z2 const& z2, X2 const& x2, Y2 const& y2, Z2 const& z2,
@ -102,7 +102,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3, typename V4> template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat
( (
vec<3, V1, Q> const& v1, vec<3, V1, Q> const& v1,
vec<3, V2, Q> const& v2, vec<3, V2, Q> const& v2,
@ -120,7 +120,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 3, U, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 3, U, P> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -129,7 +129,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
@ -138,7 +138,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<3, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -147,7 +147,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -156,7 +156,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<2, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<2, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -165,7 +165,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<3, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
@ -174,7 +174,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<2, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -183,7 +183,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<4, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
@ -192,7 +192,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 3, T, Q>::mat(mat<3, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat(mat<3, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);

View File

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

View File

@ -9,7 +9,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat()
{ {
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
this->value[0] = col_type(1, 0, 0, 0); this->value[0] = col_type(1, 0, 0, 0);
@ -22,7 +22,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 4, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
@ -33,7 +33,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 4, T, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 4, T, P> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
@ -42,7 +42,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(T const& s) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(T const& s)
{ {
this->value[0] = col_type(s, 0, 0, 0); this->value[0] = col_type(s, 0, 0, 0);
this->value[1] = col_type(0, s, 0, 0); this->value[1] = col_type(0, s, 0, 0);
@ -51,7 +51,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat
( (
T const& x0, T const& y0, T const& z0, T const& w0, 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& x1, T const& y1, T const& z1, T const& w1,
@ -66,7 +66,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat
( (
col_type const& v0, col_type const& v0,
col_type const& v1, col_type const& v1,
@ -82,7 +82,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 4, U, P> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 4, U, P> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
@ -98,7 +98,7 @@ namespace glm
typename X2, typename Y2, typename Z2, typename W2, typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3, typename X3, typename Y3, typename Z3, typename W3,
typename X4, typename Y4, typename Z4, typename W4> typename X4, typename Y4, typename Z4, typename W4>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat
( (
X1 const& x1, Y1 const& y1, Z1 const& z1, W1 const& w1, X1 const& x1, Y1 const& y1, Z1 const& z1, W1 const& w1,
X2 const& x2, Y2 const& y2, Z2 const& z2, W2 const& w2, X2 const& x2, Y2 const& y2, Z2 const& z2, W2 const& w2,
@ -134,7 +134,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3, typename V4> template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat
( (
vec<4, V1, Q> const& v1, vec<4, V1, Q> const& v1,
vec<4, V2, Q> const& v2, vec<4, V2, Q> const& v2,
@ -156,7 +156,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
@ -165,7 +165,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<3, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
@ -174,7 +174,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<2, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<2, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
@ -183,7 +183,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<3, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
@ -192,7 +192,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<2, 4, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
@ -201,7 +201,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 2, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
@ -210,7 +210,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<3, 4, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<3, 4, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
@ -219,7 +219,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 3, T, Q> const& m) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat(mat<4, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);

View File

@ -7,7 +7,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, Q>::vec() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec()
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
: x(0) : x(0)
# endif # endif
@ -16,21 +16,21 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, Q>::vec(vec<1, T, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<1, T, Q> const& v)
: x(v.x) : x(v.x)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, Q>::vec(vec<1, T, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<1, T, P> const& v)
: x(v.x) : x(v.x)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, Q>::vec(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(T scalar)
: x(scalar) : x(scalar)
{} {}
@ -38,25 +38,25 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, Q>::vec(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<1, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, Q>::vec(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<2, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, Q>::vec(vec<3, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<3, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, Q>::vec(vec<4, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec(vec<4, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
{} {}

View File

@ -79,50 +79,50 @@ namespace glm
/// Return the count of components of the vector /// Return the count of components of the vector
typedef length_t length_type; typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 2;} GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 2;}
GLM_FUNC_DECL T& operator[](length_type i); GLM_FUNC_DECL T& operator[](length_type i);
GLM_FUNC_DECL T const& operator[](length_type i) const; GLM_FUNC_DECL T const& operator[](length_type i) const;
// -- Implicit basic constructors -- // -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec() GLM_DEFAULT_CTOR; GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec() GLM_DEFAULT_CTOR;
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec const& v) GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec const& v) GLM_DEFAULT;
template<qualifier P> template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, T, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<2, T, P> const& v);
// -- Explicit basic constructors -- // -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(T x, T y); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(T x, T y);
// -- Conversion constructors -- // -- Conversion constructors --
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(vec<1, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A x, B y); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(A x, B y);
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, Q> const& x, B y); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, A, Q> const& x, B y);
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A x, vec<1, B, Q> const& y); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(A x, vec<1, B, Q> const& y);
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, Q> const& x, vec<1, B, Q> const& y); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, A, Q> const& x, vec<1, B, Q> const& y);
// -- Conversion vector constructors -- // -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<3, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<2, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<2, U, P> const& v);
// -- Swizzle constructors -- // -- Swizzle constructors --
# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) # if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)

View File

@ -7,7 +7,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec()
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
: x(0), y(0) : x(0), y(0)
# endif # endif
@ -16,26 +16,26 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(vec<2, T, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<2, T, Q> const& v)
: x(v.x), y(v.y) : x(v.x), y(v.y)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(vec<2, T, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<2, T, P> const& v)
: x(v.x), y(v.y) : x(v.x), y(v.y)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(T scalar)
: x(scalar), y(scalar) : x(scalar), y(scalar)
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(T _x, T _y) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(T _x, T _y)
: x(_x), y(_y) : x(_x), y(_y)
{} {}
@ -43,35 +43,35 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<1, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.x)) , y(static_cast<T>(v.x))
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(A _x, B _y) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(A _x, B _y)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(vec<1, A, Q> const& _x, B _y) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<1, A, Q> const& _x, B _y)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(A _x, vec<1, B, Q> const& _y) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(A _x, vec<1, B, Q> const& _y)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
{} {}
@ -80,21 +80,21 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<2, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.y)) , y(static_cast<T>(v.y))
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(vec<3, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<3, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.y)) , y(static_cast<T>(v.y))
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, Q>::vec(vec<4, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec(vec<4, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.y)) , y(static_cast<T>(v.y))
{} {}

View File

@ -79,67 +79,67 @@ namespace glm
/// Return the count of components of the vector /// Return the count of components of the vector
typedef length_t length_type; typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 3;} GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 3;}
GLM_FUNC_DECL T & operator[](length_type i); GLM_FUNC_DECL T & operator[](length_type i);
GLM_FUNC_DECL T const& operator[](length_type i) const; GLM_FUNC_DECL T const& operator[](length_type i) const;
// -- Implicit basic constructors -- // -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec() GLM_DEFAULT_CTOR; GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec() GLM_DEFAULT_CTOR;
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec const& v) GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec const& v) GLM_DEFAULT;
template<qualifier P> template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<3, T, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<3, T, P> const& v);
// -- Explicit basic constructors -- // -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(T a, T b, T c); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(T a, T b, T c);
// -- Conversion scalar constructors -- // -- Conversion scalar constructors --
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(vec<1, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(vec<1, U, P> const& v);
/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(X x, Y y, Z z); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X x, Y y, Z z);
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, X, Q> const& _x, Y _y, Z _z); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, Y _y, Z _z);
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(X _x, vec<1, Y, Q> const& _y, Z _z); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, vec<1, Y, Q> const& _y, Z _z);
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z);
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(X _x, Y _y, vec<1, Z, Q> const& _z); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, Y _y, vec<1, Z, Q> const& _z);
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z);
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z);
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _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);
// -- Conversion vector constructors -- // -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, P> const& _xy, B _z); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<2, B, P> const& _yz); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<3, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<3, U, P> const& v);
// -- Swizzle constructors -- // -- Swizzle constructors --
# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) # if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)

View File

@ -7,7 +7,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec()
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
: x(0), y(0), z(0) : x(0), y(0), z(0)
# endif # endif
@ -16,26 +16,26 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<3, T, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<3, T, Q> const& v)
: x(v.x), y(v.y), z(v.z) : x(v.x), y(v.y), z(v.z)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<3, T, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<3, T, P> const& v)
: x(v.x), y(v.y), z(v.z) : x(v.x), y(v.y), z(v.z)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(T scalar)
: x(scalar), y(scalar), z(scalar) : x(scalar), y(scalar), z(scalar)
{} {}
template <typename T, qualifier Q> template <typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(T _x, T _y, T _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(T _x, T _y, T _z)
: x(_x), y(_y), z(_z) : x(_x), y(_y), z(_z)
{} {}
@ -43,7 +43,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<1, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.x)) , y(static_cast<T>(v.x))
, z(static_cast<T>(v.x)) , z(static_cast<T>(v.x))
@ -51,7 +51,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(X _x, Y _y, Z _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(X _x, Y _y, Z _z)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -59,7 +59,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, Z _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, Z _z)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -67,7 +67,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, Z _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, Z _z)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -75,7 +75,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _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)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -83,7 +83,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(X _x, Y _y, vec<1, Z, Q> const& _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(X _x, Y _y, vec<1, Z, Q> const& _z)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -91,7 +91,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _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)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -99,7 +99,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _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)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -107,7 +107,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_CXX11 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)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -117,7 +117,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<2, A, P> const& _xy, B _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<2, A, P> const& _xy, B _z)
: x(static_cast<T>(_xy.x)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -125,7 +125,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z)
: x(static_cast<T>(_xy.x)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -133,7 +133,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(A _x, vec<2, B, P> const& _yz) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(A _x, vec<2, B, P> const& _yz)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_yz.x)) , y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y)) , z(static_cast<T>(_yz.y))
@ -141,7 +141,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_yz.x)) , y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y)) , z(static_cast<T>(_yz.y))
@ -149,7 +149,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<3, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<3, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.y)) , y(static_cast<T>(v.y))
, z(static_cast<T>(v.z)) , z(static_cast<T>(v.z))
@ -157,7 +157,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, Q>::vec(vec<4, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec(vec<4, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.y)) , y(static_cast<T>(v.y))
, z(static_cast<T>(v.z)) , z(static_cast<T>(v.z))

View File

@ -82,117 +82,117 @@ namespace glm
/// Return the count of components of the vector /// Return the count of components of the vector
typedef length_t length_type; typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;} GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 4;}
GLM_FUNC_DECL T & operator[](length_type i); GLM_FUNC_DECL T & operator[](length_type i);
GLM_FUNC_DECL T const& operator[](length_type i) const; GLM_FUNC_DECL T const& operator[](length_type i) const;
// -- Implicit basic constructors -- // -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec() GLM_DEFAULT_CTOR; GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec() GLM_DEFAULT_CTOR;
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(vec<4, T, Q> const& v) GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<4, T, Q> const& v) GLM_DEFAULT;
template<qualifier P> template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(vec<4, T, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<4, T, P> const& v);
// -- Explicit basic constructors -- // -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit vec(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(T x, T y, T z, T w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(T x, T y, T z, T w);
// -- Conversion scalar constructors -- // -- Conversion scalar constructors --
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(vec<1, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(X _x, Y _y, Z _z, W _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, Y _y, Z _z, W _w);
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w);
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w);
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, W _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w);
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, W _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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_CXX11 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, X, Q> const& _x, Y _y, Z _z, vec<1, W, Q> const& _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(X _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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_CXX11 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(X _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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_CXX11 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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_CXX11 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> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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_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);
// -- Conversion vector constructors -- // -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, P> const& _xy, B _z, C _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, C _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, P> const& _xy, B _z, vec<1, C, P> const& _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, vec<1, C, P> const& _w); 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);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<2, B, P> const& _yz, C _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, C _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w); 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);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, B _y, vec<2, C, P> const& _zw); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, P> const& _x, B _y, vec<2, C, P> const& _zw); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// 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> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw); 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);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<3, A, P> const& _xyz, B _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<3, A, P> const& _xyz, vec<1, B, P> const& _w); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<3, B, P> const& _yzw); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, P> const& _x, vec<3, B, P> const& _yzw); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, P> const& _xy, vec<2, B, P> const& _zw); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<4, U, P> const& v);
// -- Swizzle constructors -- // -- Swizzle constructors --
# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) # if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)

View File

@ -160,7 +160,7 @@ namespace detail
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, Q>::vec() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec()
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
: x(0), y(0), z(0), w(0) : x(0), y(0), z(0), w(0)
# endif # endif
@ -169,26 +169,26 @@ namespace detail
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, Q>::vec(vec<4, T, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<4, T, Q> const& v)
: x(v.x), y(v.y), z(v.z), w(v.w) : x(v.x), y(v.y), z(v.z), w(v.w)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, Q>::vec(vec<4, T, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<4, T, P> const& v)
: x(v.x), y(v.y), z(v.z), w(v.w) : x(v.x), y(v.y), z(v.z), w(v.w)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, Q>::vec(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(T scalar)
: x(scalar), y(scalar), z(scalar), w(scalar) : x(scalar), y(scalar), z(scalar), w(scalar)
{} {}
template <typename T, qualifier Q> template <typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, Q>::vec(T _x, T _y, T _z, T _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(T _x, T _y, T _z, T _w)
: x(_x), y(_y), z(_z), w(_w) : x(_x), y(_y), z(_z), w(_w)
{} {}
@ -196,7 +196,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.x)) , y(static_cast<T>(v.x))
, z(static_cast<T>(v.x)) , z(static_cast<T>(v.x))
@ -205,7 +205,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, Q>::vec(X _x, Y _y, Z _z, W _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(X _x, Y _y, Z _z, W _w)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -214,7 +214,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -223,7 +223,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -232,7 +232,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_CXX11 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)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -241,7 +241,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -250,7 +250,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_CXX11 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)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -259,7 +259,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_CXX11 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)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -268,7 +268,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_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)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -277,7 +277,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_CXX11 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)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -286,7 +286,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_CXX11 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)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -295,7 +295,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_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)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -304,7 +304,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_CXX11 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)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -313,7 +313,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_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)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -322,7 +322,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_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)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -331,7 +331,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_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)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -342,7 +342,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<2, A, P> const& _xy, B _z, C _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<2, A, P> const& _xy, B _z, C _w)
: x(static_cast<T>(_xy.x)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -351,7 +351,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, C _w) 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)
: x(static_cast<T>(_xy.x)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -360,7 +360,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<2, A, P> const& _xy, B _z, vec<1, C, P> const& _w) 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)
: x(static_cast<T>(_xy.x)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
@ -369,7 +369,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_CXX11 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)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
@ -378,7 +378,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(A _x, vec<2, B, P> const& _yz, C _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(A _x, vec<2, B, P> const& _yz, C _w)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_yz.x)) , y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y)) , z(static_cast<T>(_yz.y))
@ -387,7 +387,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, C _w) 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)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_yz.x)) , y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y)) , z(static_cast<T>(_yz.y))
@ -396,7 +396,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(A _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w) 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)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_yz.x)) , y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y)) , z(static_cast<T>(_yz.y))
@ -405,7 +405,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_CXX11 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)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_yz.x)) , y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y)) , z(static_cast<T>(_yz.y))
@ -414,7 +414,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(A _x, B _y, vec<2, C, P> const& _zw) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(A _x, B _y, vec<2, C, P> const& _zw)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_zw.x)) , z(static_cast<T>(_zw.x))
@ -423,7 +423,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<1, A, P> const& _x, B _y, vec<2, C, P> const& _zw) 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)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
, z(static_cast<T>(_zw.x)) , z(static_cast<T>(_zw.x))
@ -432,7 +432,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(A _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw) 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)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_zw.x)) , z(static_cast<T>(_zw.x))
@ -441,7 +441,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, typename C, qualifier P> template<typename A, typename B, typename C, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR 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_CXX11 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)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
, z(static_cast<T>(_zw.x)) , z(static_cast<T>(_zw.x))
@ -450,7 +450,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<3, A, P> const& _xyz, B _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<3, A, P> const& _xyz, B _w)
: x(static_cast<T>(_xyz.x)) : x(static_cast<T>(_xyz.x))
, y(static_cast<T>(_xyz.y)) , y(static_cast<T>(_xyz.y))
, z(static_cast<T>(_xyz.z)) , z(static_cast<T>(_xyz.z))
@ -459,7 +459,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<3, A, P> const& _xyz, vec<1, B, P> const& _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<3, A, P> const& _xyz, vec<1, B, P> const& _w)
: x(static_cast<T>(_xyz.x)) : x(static_cast<T>(_xyz.x))
, y(static_cast<T>(_xyz.y)) , y(static_cast<T>(_xyz.y))
, z(static_cast<T>(_xyz.z)) , z(static_cast<T>(_xyz.z))
@ -468,7 +468,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(A _x, vec<3, B, P> const& _yzw) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(A _x, vec<3, B, P> const& _yzw)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_yzw.x)) , y(static_cast<T>(_yzw.x))
, z(static_cast<T>(_yzw.y)) , z(static_cast<T>(_yzw.y))
@ -477,7 +477,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<3, B, P> const& _yzw) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<1, A, P> const& _x, vec<3, B, P> const& _yzw)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_yzw.x)) , y(static_cast<T>(_yzw.x))
, z(static_cast<T>(_yzw.y)) , z(static_cast<T>(_yzw.y))
@ -486,7 +486,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename A, typename B, qualifier P> template<typename A, typename B, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<2, A, P> const& _xy, vec<2, B, P> const& _zw) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<2, A, P> const& _xy, vec<2, B, P> const& _zw)
: x(static_cast<T>(_xy.x)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
, z(static_cast<T>(_zw.x)) , z(static_cast<T>(_zw.x))
@ -495,7 +495,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, Q>::vec(vec<4, U, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec(vec<4, U, P> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.y)) , y(static_cast<T>(v.y))
, z(static_cast<T>(v.z)) , z(static_cast<T>(v.z))

View File

@ -340,117 +340,117 @@ namespace detail
}//namespace detail }//namespace detail
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(float _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_lowp>::vec(float _s) :
data(_mm_set1_ps(_s)) data(_mm_set1_ps(_s))
{} {}
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec(float _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_mediump>::vec(float _s) :
data(_mm_set1_ps(_s)) data(_mm_set1_ps(_s))
{} {}
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(float _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_highp>::vec(float _s) :
data(_mm_set1_ps(_s)) data(_mm_set1_ps(_s))
{} {}
# if GLM_ARCH & GLM_ARCH_AVX_BIT # if GLM_ARCH & GLM_ARCH_AVX_BIT
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, double, aligned_lowp>::vec(double _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, double, aligned_lowp>::vec(double _s) :
data(_mm256_set1_pd(_s)) data(_mm256_set1_pd(_s))
{} {}
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, double, aligned_mediump>::vec(double _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, double, aligned_mediump>::vec(double _s) :
data(_mm256_set1_pd(_s)) data(_mm256_set1_pd(_s))
{} {}
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, double, aligned_highp>::vec(double _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, double, aligned_highp>::vec(double _s) :
data(_mm256_set1_pd(_s)) data(_mm256_set1_pd(_s))
{} {}
# endif # endif
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_lowp>::vec(int32 _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_lowp>::vec(int32 _s) :
data(_mm_set1_epi32(_s)) data(_mm_set1_epi32(_s))
{} {}
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_mediump>::vec(int32 _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_mediump>::vec(int32 _s) :
data(_mm_set1_epi32(_s)) data(_mm_set1_epi32(_s))
{} {}
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_highp>::vec(int32 _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_highp>::vec(int32 _s) :
data(_mm_set1_epi32(_s)) data(_mm_set1_epi32(_s))
{} {}
# if GLM_ARCH & GLM_ARCH_AVX2_BIT # if GLM_ARCH & GLM_ARCH_AVX2_BIT
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int64, aligned_lowp>::vec(int64 _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int64, aligned_lowp>::vec(int64 _s) :
data(_mm256_set1_epi64x(_s)) data(_mm256_set1_epi64x(_s))
{} {}
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int64, aligned_mediump>::vec(int64 _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int64, aligned_mediump>::vec(int64 _s) :
data(_mm256_set1_epi64x(_s)) data(_mm256_set1_epi64x(_s))
{} {}
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int64, aligned_highp>::vec(int64 _s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int64, aligned_highp>::vec(int64 _s) :
data(_mm256_set1_epi64x(_s)) data(_mm256_set1_epi64x(_s))
{} {}
# endif # endif
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(float _x, float _y, float _z, float _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_lowp>::vec(float _x, float _y, float _z, float _w) :
data(_mm_set_ps(_w, _z, _y, _x)) data(_mm_set_ps(_w, _z, _y, _x))
{} {}
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec(float _x, float _y, float _z, float _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_mediump>::vec(float _x, float _y, float _z, float _w) :
data(_mm_set_ps(_w, _z, _y, _x)) data(_mm_set_ps(_w, _z, _y, _x))
{} {}
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(float _x, float _y, float _z, float _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, float, aligned_highp>::vec(float _x, float _y, float _z, float _w) :
data(_mm_set_ps(_w, _z, _y, _x)) data(_mm_set_ps(_w, _z, _y, _x))
{} {}
template<> template<>
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_lowp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_lowp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
data(_mm_set_epi32(_w, _z, _y, _x)) data(_mm_set_epi32(_w, _z, _y, _x))
{} {}
template<> template<>
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_mediump>::vec(int32 _x, int32 _y, int32 _z, int32 _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_mediump>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
data(_mm_set_epi32(_w, _z, _y, _x)) data(_mm_set_epi32(_w, _z, _y, _x))
{} {}
template<> template<>
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_highp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, int32, aligned_highp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) :
data(_mm_set_epi32(_w, _z, _y, _x)) data(_mm_set_epi32(_w, _z, _y, _x))
{} {}
template<> template<>
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 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))) data(_mm_castsi128_ps(_mm_set_epi32(_w, _z, _y, _x)))
{} {}
template<> template<>
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec(int32 _x, int32 _y, int32 _z, int32 _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 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))) data(_mm_castsi128_ps(_mm_set_epi32(_w, _z, _y, _x)))
{} {}
template<> template<>
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(int32 _x, int32 _y, int32 _z, int32 _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 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))) data(_mm_castsi128_ps(_mm_set_epi32(_w, _z, _y, _x)))
{} {}
}//namespace glm }//namespace glm

View File

@ -94,37 +94,37 @@ namespace glm
/// Return the count of components of the vector /// Return the count of components of the vector
typedef length_t length_type; typedef length_t length_type;
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 1;} GLM_FUNC_DECL static GLM_CONSTEXPR_CXX11 length_type length(){return 1;}
GLM_FUNC_DECL T & operator[](length_type i); GLM_FUNC_DECL T & operator[](length_type i);
GLM_FUNC_DECL T const& operator[](length_type i) const; GLM_FUNC_DECL T const& operator[](length_type i) const;
// -- Implicit basic constructors -- // -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec() GLM_DEFAULT_CTOR; GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec() GLM_DEFAULT_CTOR;
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec const& v) GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec const& v) GLM_DEFAULT;
template<qualifier P> template<qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, T, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 vec(vec<1, T, P> const& v);
// -- Explicit basic constructors -- // -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 explicit vec(T scalar);
// -- Conversion vector constructors -- // -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<2, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<3, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 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) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<1, U, P> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CXX11 GLM_EXPLICIT vec(vec<1, U, P> const& v);
// -- Swizzle constructors -- // -- Swizzle constructors --
/* /*

View File

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

View File

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

View File

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

View File

@ -87,7 +87,7 @@ namespace detail
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat()
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
: x(0), y(0), z(0), w(1) : x(0), y(0), z(0), w(1)
# endif # endif
@ -96,26 +96,26 @@ namespace detail
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat(tquat<T, Q> const& q) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat(tquat<T, Q> const& q)
: x(q.x), y(q.y), z(q.z), w(q.w) : x(q.x), y(q.y), z(q.z), w(q.w)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat(tquat<T, P> const& q) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat(tquat<T, P> const& q)
: x(q.x), y(q.y), z(q.z), w(q.w) : x(q.x), y(q.y), z(q.z), w(q.w)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat(T s, vec<3, T, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat(T s, vec<3, T, Q> const& v)
: x(v.x), y(v.y), z(v.z), w(s) : x(v.x), y(v.y), z(v.z), w(s)
{} {}
template <typename T, qualifier Q> template <typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat(T _w, T _x, T _y, T _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat(T _w, T _x, T _y, T _z)
: x(_x), y(_y), z(_z), w(_w) : x(_x), y(_y), z(_z), w(_w)
{} {}
@ -123,7 +123,7 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, Q>::tquat(tquat<U, P> const& q) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat<T, Q>::tquat(tquat<U, P> const& q)
: x(static_cast<T>(q.x)) : x(static_cast<T>(q.x))
, y(static_cast<T>(q.y)) , y(static_cast<T>(q.y))
, z(static_cast<T>(q.z)) , z(static_cast<T>(q.z))

View File

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

View File

@ -26,7 +26,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tdualquat<T, Q>::tdualquat()
# ifdef GLM_FORCE_CTOR_INIT # ifdef GLM_FORCE_CTOR_INIT
: real(tquat<T, Q>()) : real(tquat<T, Q>())
, dual(tquat<T, Q>(0, 0, 0, 0)) , dual(tquat<T, Q>(0, 0, 0, 0))
@ -36,7 +36,7 @@ namespace glm
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tdualquat<T, Q> const& d) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tdualquat<T, Q>::tdualquat(tdualquat<T, Q> const& d)
: real(d.real) : real(d.real)
, dual(d.dual) , dual(d.dual)
{} {}
@ -44,7 +44,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<qualifier P> template<qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tdualquat<T, P> const& d) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tdualquat<T, Q>::tdualquat(tdualquat<T, P> const& d)
: real(d.real) : real(d.real)
, dual(d.dual) , dual(d.dual)
{} {}
@ -52,12 +52,12 @@ namespace glm
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tquat<T, Q> const& r) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tdualquat<T, Q>::tdualquat(tquat<T, Q> const& r)
: real(r), dual(tquat<T, Q>(0, 0, 0, 0)) : real(r), dual(tquat<T, Q>(0, 0, 0, 0))
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tquat<T, Q> const& q, vec<3, T, Q> const& p) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tdualquat<T, Q>::tdualquat(tquat<T, Q> const& q, vec<3, T, Q> const& p)
: real(q), dual( : real(q), dual(
T(-0.5) * ( p.x*q.x + p.y*q.y + p.z*q.z), 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), T(+0.5) * ( p.x*q.w + p.y*q.z - p.z*q.y),
@ -66,7 +66,7 @@ namespace glm
{} {}
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tquat<T, Q> const& r, tquat<T, Q> const& d) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tdualquat<T, Q>::tdualquat(tquat<T, Q> const& r, tquat<T, Q> const& d)
: real(r), dual(d) : real(r), dual(d)
{} {}
@ -74,7 +74,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U, qualifier P> template<typename U, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, Q>::tdualquat(tdualquat<U, P> const& q) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tdualquat<T, Q>::tdualquat(tdualquat<U, P> const& q)
: real(q.real) : real(q.real)
, dual(q.dual) , dual(q.dual)
{} {}

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

View File

@ -57,6 +57,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
#### Improvements: #### Improvements:
- Added missing vec1 based constructors - Added missing vec1 based constructors
- Redesigned constexpr support which requires disable GLM SIMD on Visual C++ #783
#### Fixes: #### Fixes:
- Fixed build problems due to printf and std::clock_t #778 - Fixed build problems due to printf and std::clock_t #778

View File

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

View File

@ -107,10 +107,8 @@ int test_vec1_size()
Error += glm::vec1::length() == 1 ? 0 : 1; Error += glm::vec1::length() == 1 ? 0 : 1;
Error += glm::dvec1::length() == 1 ? 0 : 1; Error += glm::dvec1::length() == 1 ? 0 : 1;
# if GLM_HAS_CONSTEXPR_PARTIAL GLM_CONSTEXPR_CXX11 std::size_t Length = glm::vec1::length();
constexpr std::size_t Length = glm::vec1::length();
Error += Length == 1 ? 0 : 1; Error += Length == 1 ? 0 : 1;
# endif
return Error; return Error;
} }

View File

@ -312,10 +312,8 @@ int test_vec2_size()
Error += glm::vec2::length() == 2 ? 0 : 1; Error += glm::vec2::length() == 2 ? 0 : 1;
Error += glm::dvec2::length() == 2 ? 0 : 1; Error += glm::dvec2::length() == 2 ? 0 : 1;
# if GLM_HAS_CONSTEXPR_PARTIAL GLM_CONSTEXPR_CXX11 std::size_t Length = glm::vec2::length();
constexpr std::size_t Length = glm::vec2::length(); Error += Length == 2 ? 0 : 1;
Error += Length == 2 ? 0 : 1;
# endif
return Error; return Error;
} }

View File

@ -328,10 +328,8 @@ int test_vec3_size()
Error += glm::vec3::length() == 3 ? 0 : 1; Error += glm::vec3::length() == 3 ? 0 : 1;
Error += glm::dvec3::length() == 3 ? 0 : 1; Error += glm::dvec3::length() == 3 ? 0 : 1;
# if GLM_HAS_CONSTEXPR_PARTIAL GLM_CONSTEXPR_CXX11 std::size_t Length = glm::vec3::length();
constexpr std::size_t Length = glm::vec3::length();
Error += Length == 3 ? 0 : 1; Error += Length == 3 ? 0 : 1;
# endif
return Error; return Error;
} }

View File

@ -518,10 +518,8 @@ static int test_vec4_size()
Error += glm::vec4::length() == 4 ? 0 : 1; Error += glm::vec4::length() == 4 ? 0 : 1;
Error += glm::dvec4::length() == 4 ? 0 : 1; Error += glm::dvec4::length() == 4 ? 0 : 1;
# if GLM_HAS_CONSTEXPR_PARTIAL GLM_CONSTEXPR_CXX11 std::size_t Length = glm::vec4::length();
constexpr std::size_t Length = glm::vec4::length();
Error += Length == 4 ? 0 : 1; Error += Length == 4 ? 0 : 1;
# endif
return Error; return Error;
} }

View File

@ -76,10 +76,8 @@ int test_vec1_size()
Error += glm::vec1::length() == 1 ? 0 : 1; Error += glm::vec1::length() == 1 ? 0 : 1;
Error += glm::dvec1::length() == 1 ? 0 : 1; Error += glm::dvec1::length() == 1 ? 0 : 1;
# if GLM_HAS_CONSTEXPR_PARTIAL GLM_CONSTEXPR_CXX11 std::size_t Length = glm::vec1::length();
constexpr std::size_t Length = glm::vec1::length();
Error += Length == 1 ? 0 : 1; Error += Length == 1 ? 0 : 1;
# endif
return Error; return Error;
} }