More consistent resolution of shadow warnings #595

master
Christophe Riccio ago%!(EXTRA string=8 years)
commit eda6c93276
  1. 4
      glm/detail/type_vec2.hpp
  2. 16
      glm/detail/type_vec2.inl
  3. 16
      glm/detail/type_vec3.hpp
  4. 64
      glm/detail/type_vec3.inl
  5. 32
      glm/detail/type_vec4.hpp
  6. 138
      glm/detail/type_vec4.inl
  7. 116
      glm/detail/type_vec4_simd.inl
  8. 12
      glm/gtc/quaternion.hpp
  9. 6
      glm/gtc/quaternion.inl

@ -92,7 +92,7 @@ namespace glm
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(ctor); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR vec(T s1, T s2); GLM_FUNC_DECL GLM_CONSTEXPR vec(T x, T y);
// -- Conversion constructors -- // -- Conversion constructors --
@ -100,7 +100,7 @@ namespace glm
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR vec(A x, B y); GLM_FUNC_DECL GLM_CONSTEXPR vec(A x, B y);
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const & v1, vec<1, B, P> const & v2); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& x, vec<1, B, P> const& y);
// -- Conversion vector constructors -- // -- Conversion vector constructors --

@ -39,24 +39,24 @@ namespace glm
{} {}
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(T s1, T s2) GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(T _x, T _y)
: x(s1), y(s2) : x(_x), y(_y)
{} {}
// -- Conversion scalar constructors -- // -- Conversion scalar constructors --
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(A a, B b) GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(A _x, B _y)
: x(static_cast<T>(a)) : x(static_cast<T>(_x))
, y(static_cast<T>(b)) , y(static_cast<T>(_y))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(vec<1, A, P> const & a, vec<1, B, P> const & b) GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y)
: x(static_cast<T>(a.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(b.x)) , y(static_cast<T>(_y.x))
{} {}
// -- Conversion vector constructors -- // -- Conversion vector constructors --

@ -97,25 +97,25 @@ namespace glm
// -- Conversion scalar constructors -- // -- Conversion scalar constructors --
/// 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 A, typename B, typename C> template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR vec(A a, B b, C c); GLM_FUNC_DECL GLM_CONSTEXPR vec(X x, Y y, Z z);
template<typename A, typename B, typename C> template<typename X, typename Y, typename Z>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const & a, vec<1, B, P> const & b, vec<1, C, P> const & c); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, P> const& _x, vec<1, Y, P> const& _y, vec<1, Z, P> 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, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const & a, B b); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> 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, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const & a, vec<1, B, Q> const & b); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const& _xy, vec<1, B, Q> 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, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(A a, vec<2, B, Q> const & b); GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, Q> 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, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const & a, vec<2, B, Q> const & b); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& _x, vec<2, B, Q> 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, precision Q> template<typename U, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, Q> const& v);

@ -39,68 +39,68 @@ namespace glm
{} {}
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(T a, T b, T c) GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(T _x, T _y, T _z)
: x(a), y(b), z(c) : x(_x), y(_y), z(_z)
{} {}
// -- Conversion scalar constructors -- // -- Conversion scalar constructors --
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, typename C> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(A a, B b, C c) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(X _x, Y _y, Z _z)
x(static_cast<T>(a)), : x(static_cast<T>(_x))
y(static_cast<T>(b)), , y(static_cast<T>(_y))
z(static_cast<T>(c)) , z(static_cast<T>(_z))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, typename C> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<1, A, P> const & a, vec<1, B, P> const & b, vec<1, C, P> const & c) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<1, X, P> const& _x, vec<1, Y, P> const& _y, vec<1, Z, P> const& _z)
x(static_cast<T>(a)), : x(static_cast<T>(_x))
y(static_cast<T>(b)), , y(static_cast<T>(_y))
z(static_cast<T>(c)) , z(static_cast<T>(_z))
{} {}
// -- Conversion vector constructors -- // -- Conversion vector constructors --
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<2, A, Q> const & a, B b) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<2, A, Q> const& _xy, B _z)
x(static_cast<T>(a.x)), : x(static_cast<T>(_xy.x))
y(static_cast<T>(a.y)), , y(static_cast<T>(_xy.y))
z(static_cast<T>(b)) , z(static_cast<T>(_z))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<2, A, Q> const & a, vec<1, B, Q> const & b) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z)
x(static_cast<T>(a.x)), : x(static_cast<T>(_xy.x))
y(static_cast<T>(a.y)), , y(static_cast<T>(_xy.y))
z(static_cast<T>(b.x)) , z(static_cast<T>(_z.x))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(A a, vec<2, B, Q> const & b) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(A _x, vec<2, B, Q> const& _yz)
x(static_cast<T>(a)), : x(static_cast<T>(_x))
y(static_cast<T>(b.x)), , y(static_cast<T>(_yz.x))
z(static_cast<T>(b.y)) , z(static_cast<T>(_yz.y))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<1, A, Q> const & a, vec<2, B, Q> const & b) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz)
x(static_cast<T>(a.x)), : x(static_cast<T>(_x.x))
y(static_cast<T>(b.x)), , y(static_cast<T>(_yz.x))
z(static_cast<T>(b.y)) , z(static_cast<T>(_yz.y))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename U, precision Q> template<typename U, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<3, U, Q> const & v) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<3, U, Q> 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))
{} {}
template<typename T, precision P> template<typename T, precision P>

@ -95,51 +95,51 @@ namespace glm
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit vec(ctor); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit vec(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit vec(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(T a, T b, T c, T d); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(T x, T y, T z, T w);
// -- Conversion scalar constructors -- // -- Conversion scalar 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, typename D> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(A a, B b, C c, D d); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(X _x, Y _y, Z _z, W _w);
template<typename A, typename B, typename C, typename D> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, P> const& a, vec<1, B, P> const& b, vec<1, C, P> const& c, vec<1, D, P> const& d); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, X, P> const& _x, vec<1, Y, P> const& _Y, vec<1, Z, P> const& _z, vec<1, W, P> 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, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const & a, B b, C c); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> 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, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const & a, vec<1, B, Q> const & b, vec<1, C, Q> const & c); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z, vec<1, C, Q> 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, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(A a, vec<2, B, Q> const & b, C c); GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, Q> 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, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const & a, vec<2, B, Q> const & b, vec<1, C, Q> const & c); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz, vec<1, C, Q> 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, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(A a, B b, vec<2, C, Q> const & c); GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, B _y, vec<2, C, Q> 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, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const & a, vec<1, B, Q> const & b, vec<2, C, Q> const & c); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y, vec<2, C, Q> 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, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, Q> const & a, B b); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, Q> 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, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, Q> const & a, vec<1, B, Q> const & b); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, Q> const& _xyz, vec<1, B, Q> 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, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(A a, vec<3, B, Q> const & b); GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<3, B, Q> 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, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const & a, vec<3, B, Q> const & b); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& _x, vec<3, B, Q> 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, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const & a, vec<2, B, Q> const & b); GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const& _xy, vec<2, B, Q> 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, precision Q> template<typename U, precision Q>

@ -188,129 +188,129 @@ namespace detail
{} {}
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(T a, T b, T c, T d) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(T _x, T _y, T _z, T _w)
: x(a), y(b), z(c), w(d) : x(_x), y(_y), z(_z), w(_w)
{} {}
// -- Conversion scalar constructors -- // -- Conversion scalar constructors --
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, typename C, typename D> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(A a, B b, C c, D d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(X _x, Y _y, Z _z, W _w)
x(static_cast<T>(a)), : x(static_cast<T>(_x))
y(static_cast<T>(b)), , y(static_cast<T>(_y))
z(static_cast<T>(c)), , z(static_cast<T>(_z))
w(static_cast<T>(d)) , w(static_cast<T>(_w))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, typename C, typename D> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<1, A, P> const & a, vec<1, B, P> const & b, vec<1, C, P> const & c, vec<1, D, P> const & d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<1, X, P> const& _x, vec<1, Y, P> const& _y, vec<1, Z, P> const& _z, vec<1, W, P> const& _w)
x(static_cast<T>(a.x)), : x(static_cast<T>(_x.x))
y(static_cast<T>(b.x)), , y(static_cast<T>(_y.x))
z(static_cast<T>(c.x)), , z(static_cast<T>(_z.x))
w(static_cast<T>(d.x)) , w(static_cast<T>(_w.x))
{} {}
// -- Conversion vector constructors -- // -- Conversion vector constructors --
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<2, A, Q> const & a, B b, C c) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<2, A, Q> const& _xy, B _z, C _w)
x(static_cast<T>(a.x)), : x(static_cast<T>(_xy.x))
y(static_cast<T>(a.y)), , y(static_cast<T>(_xy.y))
z(static_cast<T>(b)), , z(static_cast<T>(_z))
w(static_cast<T>(c)) , w(static_cast<T>(_w))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<2, A, Q> const & a, vec<1, B, Q> const & b, vec<1, C, Q> const & c) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z, vec<1, C, Q> const& _w)
x(static_cast<T>(a.x)), : x(static_cast<T>(_xy.x))
y(static_cast<T>(a.y)), , y(static_cast<T>(_xy.y))
z(static_cast<T>(b.x)), , z(static_cast<T>(_z.x))
w(static_cast<T>(c.x)) , w(static_cast<T>(_w.x))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(A s1, vec<2, B, Q> const & v, C s2) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(A _x, vec<2, B, Q> const& _yz, C _w)
x(static_cast<T>(s1)), : x(static_cast<T>(_x))
y(static_cast<T>(v.x)), , y(static_cast<T>(_yz.x))
z(static_cast<T>(v.y)), , z(static_cast<T>(_yz.y))
w(static_cast<T>(s2)) , w(static_cast<T>(_w))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<1, A, Q> const & a, vec<2, B, Q> const & b, vec<1, C, Q> const & c) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz, vec<1, C, Q> const& _w)
x(static_cast<T>(a.x)), : x(static_cast<T>(_x.x))
y(static_cast<T>(b.x)), , y(static_cast<T>(_yz.x))
z(static_cast<T>(b.y)), , z(static_cast<T>(_yz.y))
w(static_cast<T>(c.x)) , w(static_cast<T>(_w.x))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(A s1, B s2, vec<2, C, Q> const & v) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(A _x, B _y, vec<2, C, Q> const& _zw)
x(static_cast<T>(s1)), : x(static_cast<T>(_x))
y(static_cast<T>(s2)), , y(static_cast<T>(_y))
z(static_cast<T>(v.x)), , z(static_cast<T>(_zw.x))
w(static_cast<T>(v.y)) , w(static_cast<T>(_zw.y))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<1, A, Q> const & a, vec<1, B, Q> const & b, vec<2, C, Q> const & c) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y, vec<2, C, Q> const& _zw)
x(static_cast<T>(a.x)), : x(static_cast<T>(_x.x))
y(static_cast<T>(b.x)), , y(static_cast<T>(_y.x))
z(static_cast<T>(c.x)), , z(static_cast<T>(_zw.x))
w(static_cast<T>(c.y)) , w(static_cast<T>(_zw.y))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<3, A, Q> const & a, B b) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<3, A, Q> const& _xyz, B _w) :
x(static_cast<T>(a.x)), x(static_cast<T>(_xyz.x)),
y(static_cast<T>(a.y)), y(static_cast<T>(_xyz.y)),
z(static_cast<T>(a.z)), z(static_cast<T>(_xyz.z)),
w(static_cast<T>(b)) w(static_cast<T>(_w))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<3, A, Q> const & a, vec<1, B, Q> const & b) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<3, A, Q> const& _xyz, vec<1, B, Q> const& _w) :
x(static_cast<T>(a.x)), x(static_cast<T>(_xyz.x)),
y(static_cast<T>(a.y)), y(static_cast<T>(_xyz.y)),
z(static_cast<T>(a.z)), z(static_cast<T>(_xyz.z)),
w(static_cast<T>(b.x)) w(static_cast<T>(_w.x))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(A a, vec<3, B, Q> const & b) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(A _x, vec<3, B, Q> const& _yzw) :
x(static_cast<T>(a)), x(static_cast<T>(_x)),
y(static_cast<T>(b.x)), y(static_cast<T>(_yzw.x)),
z(static_cast<T>(b.y)), z(static_cast<T>(_yzw.y)),
w(static_cast<T>(b.z)) w(static_cast<T>(_yzw.z))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<1, A, Q> const & a, vec<3, B, Q> const & b) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<1, A, Q> const& _x, vec<3, B, Q> const& _yzw) :
x(static_cast<T>(a.x)), x(static_cast<T>(_x.x)),
y(static_cast<T>(b.x)), y(static_cast<T>(_yzw.x)),
z(static_cast<T>(b.y)), z(static_cast<T>(_yzw.y)),
w(static_cast<T>(b.z)) w(static_cast<T>(_yzw.z))
{} {}
template<typename T, precision P> template<typename T, precision P>
template<typename A, typename B, precision Q> template<typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<2, A, Q> const & a, vec<2, B, Q> const & b) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<2, A, Q> const& _xy, vec<2, B, Q> const& _zw) :
x(static_cast<T>(a.x)), x(static_cast<T>(_xy.x)),
y(static_cast<T>(a.y)), y(static_cast<T>(_xy.y)),
z(static_cast<T>(b.x)), z(static_cast<T>(_zw.x)),
w(static_cast<T>(b.y)) w(static_cast<T>(_zw.y))
{} {}
template<typename T, precision P> template<typename T, precision P>

@ -362,6 +362,7 @@ namespace detail
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
<<<<<<< HEAD
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(float s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(float s) :
data(_mm_set1_ps(s)) data(_mm_set1_ps(s))
@ -475,6 +476,121 @@ namespace detail
template<> template<>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(int32 a, int32 b, int32 c, int32 d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(int32 a, int32 b, int32 c, int32 d) :
data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a))) data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a)))
=======
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::tvec4(float _s) :
data(_mm_set1_ps(_s))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::tvec4(float _s) :
data(_mm_set1_ps(_s))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::tvec4(float _s) :
data(_mm_set1_ps(_s))
{}
# if GLM_ARCH & GLM_ARCH_AVX_BIT
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_lowp>::tvec4(double _s) :
data(_mm256_set1_pd(_s))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_mediump>::tvec4(double _s) :
data(_mm256_set1_pd(_s))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_highp>::tvec4(double _s) :
data(_mm256_set1_pd(_s))
{}
# endif
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_lowp>::tvec4(int32 _s) :
data(_mm_set1_epi32(_s))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_mediump>::tvec4(int32 _s) :
data(_mm_set1_epi32(_s))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_highp>::tvec4(int32 _s) :
data(_mm_set1_epi32(_s))
{}
# if GLM_ARCH & GLM_ARCH_AVX2_BIT
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_lowp>::tvec4(int64 _s) :
data(_mm256_set1_epi64x(_s))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_mediump>::tvec4(int64 _s) :
data(_mm256_set1_epi64x(_s))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_highp>::tvec4(int64 _s) :
data(_mm256_set1_epi64x(_s))
{}
# endif
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::tvec4(float _a, float _b, float c, float d) :
data(_mm_set_ps(d, c, _b, _a))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::tvec4(float _a, float _b, float c, float d) :
data(_mm_set_ps(d, c, _b, _a))
{}
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::tvec4(float _a, float _b, float c, float d) :
data(_mm_set_ps(d, c, _b, _a))
{}
template <>
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_lowp>::tvec4(int32 _a, int32 _b, int32 c, int32 d) :
data(_mm_set_epi32(d, c, _b, _a))
{}
template <>
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_mediump>::tvec4(int32 _a, int32 _b, int32 c, int32 d) :
data(_mm_set_epi32(d, c, _b, _a))
{}
template <>
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_highp>::tvec4(int32 _a, int32 _b, int32 c, int32 d) :
data(_mm_set_epi32(d, c, _b, _a))
{}
template <>
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::tvec4(int32 _a, int32 _b, int32 c, int32 d) :
data(_mm_castsi128_ps(_mm_set_epi32(d, c, _b, _a)))
{}
template <>
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::tvec4(int32 _a, int32 _b, int32 c, int32 d) :
data(_mm_castsi128_ps(_mm_set_epi32(d, c, _b, _a)))
{}
template <>
template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::tvec4(int32 _a, int32 _b, int32 c, int32 d) :
data(_mm_castsi128_ps(_mm_set_epi32(d, c, _b, _a)))
>>>>>>> 9e45b450625bcc6c883ac049257b36fef934b0ae
{} {}
}//namespace glm }//namespace glm

@ -85,8 +85,8 @@ namespace glm
// -- Explicit basic constructors -- // -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tquat(ctor); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tquat(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & s, vec<3, T, P> const & v); GLM_FUNC_DECL GLM_CONSTEXPR tquat(T s, vec<3, T, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & w, T const & x, T const & y, T const & z); GLM_FUNC_DECL GLM_CONSTEXPR tquat(T w, T x, T y, T z);
// -- Conversion constructors -- // -- Conversion constructors --
@ -109,15 +109,15 @@ namespace glm
/// Build a quaternion from euler angles (pitch, yaw, roll), in radians. /// Build a quaternion from euler angles (pitch, yaw, roll), in radians.
GLM_FUNC_DECL GLM_EXPLICIT tquat(vec<3, T, P> const& eulerAngles); GLM_FUNC_DECL GLM_EXPLICIT tquat(vec<3, T, P> const& eulerAngles);
GLM_FUNC_DECL GLM_EXPLICIT tquat(mat<3, 3, T, P> const & m); GLM_FUNC_DECL GLM_EXPLICIT tquat(mat<3, 3, T, P> const& q);
GLM_FUNC_DECL GLM_EXPLICIT tquat(mat<4, 4, T, P> const & m); GLM_FUNC_DECL GLM_EXPLICIT tquat(mat<4, 4, T, P> const& q);
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
GLM_FUNC_DECL tquat<T, P> & operator=(tquat<T, P> const & m) GLM_DEFAULT; GLM_FUNC_DECL tquat<T, P> & operator=(tquat<T, P> const& q) GLM_DEFAULT;
template<typename U> template<typename U>
GLM_FUNC_DECL tquat<T, P> & operator=(tquat<U, P> const & m); GLM_FUNC_DECL tquat<T, P> & operator=(tquat<U, P> const& q);
template<typename U> template<typename U>
GLM_FUNC_DECL tquat<T, P> & operator+=(tquat<U, P> const& q); GLM_FUNC_DECL tquat<T, P> & operator+=(tquat<U, P> const& q);
template<typename U> template<typename U>

@ -112,13 +112,13 @@ namespace detail
{} {}
template<typename T, precision P> template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(T const & s, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(T s, vec<3, T, P> 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, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(T const & w, T const & x, T const & y, T const & z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::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)
{} {}
// -- Conversion constructors -- // -- Conversion constructors --

Loading…
Cancel
Save