mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
More consistent resolution of shadow warnings #595
This commit is contained in:
commit
eda6c93276
@ -83,9 +83,9 @@ namespace glm
|
|||||||
// -- Implicit basic constructors --
|
// -- Implicit basic constructors --
|
||||||
|
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR;
|
GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const & v) GLM_DEFAULT;
|
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT;
|
||||||
template<precision Q>
|
template<precision Q>
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, T, Q> const & v);
|
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, T, Q> const& v);
|
||||||
|
|
||||||
// -- Explicit basic constructors --
|
// -- Explicit basic constructors --
|
||||||
|
|
||||||
@ -96,17 +96,17 @@ namespace glm
|
|||||||
|
|
||||||
/// 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<2, U, Q> const & v);
|
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<2, U, Q> 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, precision Q>
|
template<typename U, precision Q>
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, Q> const & v);
|
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, Q> 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, 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);
|
||||||
|
|
||||||
/// 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<1, U, Q> const & v);
|
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<1, U, Q> const& v);
|
||||||
|
|
||||||
// -- Swizzle constructors --
|
// -- Swizzle constructors --
|
||||||
/*
|
/*
|
||||||
@ -123,23 +123,23 @@ namespace glm
|
|||||||
GLM_FUNC_DECL vec & operator=(vec const & v) GLM_DEFAULT;
|
GLM_FUNC_DECL vec & operator=(vec const & v) GLM_DEFAULT;
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator+=(U scalar);
|
GLM_FUNC_DECL vec & operator+=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator+=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator+=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator-=(U scalar);
|
GLM_FUNC_DECL vec & operator-=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator-=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator-=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator*=(U scalar);
|
GLM_FUNC_DECL vec & operator*=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator*=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator*=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator/=(U scalar);
|
GLM_FUNC_DECL vec & operator/=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator/=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator/=(vec<1, U, P> const& v);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
@ -153,56 +153,56 @@ namespace glm
|
|||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator%=(U scalar);
|
GLM_FUNC_DECL vec & operator%=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator&=(U scalar);
|
GLM_FUNC_DECL vec & operator&=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator|=(U scalar);
|
GLM_FUNC_DECL vec & operator|=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator^=(U scalar);
|
GLM_FUNC_DECL vec & operator^=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator<<=(U scalar);
|
GLM_FUNC_DECL vec & operator<<=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator>>=(U scalar);
|
GLM_FUNC_DECL vec & operator>>=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const& v);
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- Unary operators --
|
// -- Unary operators --
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const & v);
|
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v);
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const & v);
|
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const& v);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const & v, T scalar);
|
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v, T scalar);
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL vec<1, T, P> operator+(T scalar, vec<1, T, P> const & v);
|
GLM_FUNC_DECL vec<1, T, P> operator+(T scalar, vec<1, T, P> const& v);
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
|
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v1, vec<1, T, P> const& v2);
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const & v, T scalar);
|
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const & v, T scalar);
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL vec<1, T, P> operator-(T scalar, vec<1, T, P> const & v);
|
GLM_FUNC_DECL vec<1, T, P> operator-(T scalar, vec<1, T, P> const& v);
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL vec<1, T, P> operator- (vec<1, T, P> const & v1, vec<1, T, P> const & v2);
|
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const& v1, vec<1, T, P> const & v2);
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL vec<1, T, P> operator*(vec<1, T, P> const & v, T scalar);
|
GLM_FUNC_DECL vec<1, T, P> operator*(vec<1, T, P> const & v, T scalar);
|
||||||
|
@ -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,20 +100,20 @@ 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 --
|
||||||
|
|
||||||
/// 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<3, U, Q> const & v);
|
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, Q> 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, 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);
|
||||||
|
|
||||||
/// 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<2, U, Q> const & v);
|
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<2, U, Q> 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)
|
||||||
@ -129,31 +129,31 @@ namespace glm
|
|||||||
GLM_FUNC_DECL vec& operator=(vec const & v) GLM_DEFAULT;
|
GLM_FUNC_DECL vec& operator=(vec const & v) GLM_DEFAULT;
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator=(vec<2, U, P> const & v);
|
GLM_FUNC_DECL vec& operator=(vec<2, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator+=(U scalar);
|
GLM_FUNC_DECL vec& operator+=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator+=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec& operator+=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator+=(vec<2, U, P> const & v);
|
GLM_FUNC_DECL vec& operator+=(vec<2, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator-=(U scalar);
|
GLM_FUNC_DECL vec& operator-=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator-=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec& operator-=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator-=(vec<2, U, P> const & v);
|
GLM_FUNC_DECL vec& operator-=(vec<2, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator*=(U scalar);
|
GLM_FUNC_DECL vec& operator*=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator*=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec& operator*=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator*=(vec<2, U, P> const & v);
|
GLM_FUNC_DECL vec& operator*=(vec<2, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator/=(U scalar);
|
GLM_FUNC_DECL vec& operator/=(U scalar);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator/=(vec<1, U, P> const & v);
|
GLM_FUNC_DECL vec& operator/=(vec<1, U, P> const& v);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL vec& operator/=(vec<2, U, P> const & v);
|
GLM_FUNC_DECL vec& operator/=(vec<2, U, P> const& v);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
|
@ -16,14 +16,14 @@ namespace glm
|
|||||||
|
|
||||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(vec<2, T, P> const & v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(vec<2, T, P> 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, precision P>
|
template<typename T, precision P>
|
||||||
template<precision Q>
|
template<precision Q>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(vec<2, T, Q> const & v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(vec<2, T, Q> const& v)
|
||||||
: x(v.x), y(v.y)
|
: x(v.x), y(v.y)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -39,45 +39,45 @@ 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 --
|
||||||
|
|
||||||
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<2, T, P>::vec(vec<2, U, Q> const & v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(vec<2, 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))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
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<2, T, P>::vec(vec<3, U, Q> const & v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, 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))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
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<2, T, P>::vec(vec<4, U, Q> const & v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, P>::vec(vec<4, 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))
|
||||||
{}
|
{}
|
||||||
@ -102,7 +102,7 @@ namespace glm
|
|||||||
|
|
||||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator=(vec<2, T, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator=(vec<2, T, P> const& v)
|
||||||
{
|
{
|
||||||
this->x = v.x;
|
this->x = v.x;
|
||||||
this->y = v.y;
|
this->y = v.y;
|
||||||
@ -112,7 +112,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x = static_cast<T>(v.x);
|
this->x = static_cast<T>(v.x);
|
||||||
this->y = static_cast<T>(v.y);
|
this->y = static_cast<T>(v.y);
|
||||||
@ -130,7 +130,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator+=(vec<1, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator+=(vec<1, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x += static_cast<T>(v.x);
|
this->x += static_cast<T>(v.x);
|
||||||
this->y += static_cast<T>(v.x);
|
this->y += static_cast<T>(v.x);
|
||||||
@ -139,7 +139,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator+=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator+=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x += static_cast<T>(v.x);
|
this->x += static_cast<T>(v.x);
|
||||||
this->y += static_cast<T>(v.y);
|
this->y += static_cast<T>(v.y);
|
||||||
@ -157,7 +157,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator-=(vec<1, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator-=(vec<1, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x -= static_cast<T>(v.x);
|
this->x -= static_cast<T>(v.x);
|
||||||
this->y -= static_cast<T>(v.x);
|
this->y -= static_cast<T>(v.x);
|
||||||
@ -166,7 +166,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator-=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator-=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x -= static_cast<T>(v.x);
|
this->x -= static_cast<T>(v.x);
|
||||||
this->y -= static_cast<T>(v.y);
|
this->y -= static_cast<T>(v.y);
|
||||||
@ -184,7 +184,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator*=(vec<1, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator*=(vec<1, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x *= static_cast<T>(v.x);
|
this->x *= static_cast<T>(v.x);
|
||||||
this->y *= static_cast<T>(v.x);
|
this->y *= static_cast<T>(v.x);
|
||||||
@ -193,7 +193,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator*=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator*=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x *= static_cast<T>(v.x);
|
this->x *= static_cast<T>(v.x);
|
||||||
this->y *= static_cast<T>(v.y);
|
this->y *= static_cast<T>(v.y);
|
||||||
@ -211,7 +211,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator/=(vec<1, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator/=(vec<1, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x /= static_cast<T>(v.x);
|
this->x /= static_cast<T>(v.x);
|
||||||
this->y /= static_cast<T>(v.x);
|
this->y /= static_cast<T>(v.x);
|
||||||
@ -220,7 +220,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator/=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator/=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x /= static_cast<T>(v.x);
|
this->x /= static_cast<T>(v.x);
|
||||||
this->y /= static_cast<T>(v.y);
|
this->y /= static_cast<T>(v.y);
|
||||||
@ -274,7 +274,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator%=(vec<1, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator%=(vec<1, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x %= static_cast<T>(v.x);
|
this->x %= static_cast<T>(v.x);
|
||||||
this->y %= static_cast<T>(v.x);
|
this->y %= static_cast<T>(v.x);
|
||||||
@ -283,7 +283,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator%=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator%=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x %= static_cast<T>(v.x);
|
this->x %= static_cast<T>(v.x);
|
||||||
this->y %= static_cast<T>(v.y);
|
this->y %= static_cast<T>(v.y);
|
||||||
@ -301,7 +301,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator&=(vec<1, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator&=(vec<1, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x &= static_cast<T>(v.x);
|
this->x &= static_cast<T>(v.x);
|
||||||
this->y &= static_cast<T>(v.x);
|
this->y &= static_cast<T>(v.x);
|
||||||
@ -310,7 +310,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator&=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator&=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x &= static_cast<T>(v.x);
|
this->x &= static_cast<T>(v.x);
|
||||||
this->y &= static_cast<T>(v.y);
|
this->y &= static_cast<T>(v.y);
|
||||||
@ -328,7 +328,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator|=(vec<1, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator|=(vec<1, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x |= static_cast<T>(v.x);
|
this->x |= static_cast<T>(v.x);
|
||||||
this->y |= static_cast<T>(v.x);
|
this->y |= static_cast<T>(v.x);
|
||||||
@ -337,7 +337,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator|=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator|=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x |= static_cast<T>(v.x);
|
this->x |= static_cast<T>(v.x);
|
||||||
this->y |= static_cast<T>(v.y);
|
this->y |= static_cast<T>(v.y);
|
||||||
@ -355,7 +355,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator^=(vec<1, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator^=(vec<1, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x ^= static_cast<T>(v.x);
|
this->x ^= static_cast<T>(v.x);
|
||||||
this->y ^= static_cast<T>(v.x);
|
this->y ^= static_cast<T>(v.x);
|
||||||
@ -364,7 +364,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator^=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator^=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x ^= static_cast<T>(v.x);
|
this->x ^= static_cast<T>(v.x);
|
||||||
this->y ^= static_cast<T>(v.y);
|
this->y ^= static_cast<T>(v.y);
|
||||||
@ -382,7 +382,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator<<=(vec<1, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator<<=(vec<1, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x <<= static_cast<T>(v.x);
|
this->x <<= static_cast<T>(v.x);
|
||||||
this->y <<= static_cast<T>(v.x);
|
this->y <<= static_cast<T>(v.x);
|
||||||
@ -391,7 +391,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator<<=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator<<=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x <<= static_cast<T>(v.x);
|
this->x <<= static_cast<T>(v.x);
|
||||||
this->y <<= static_cast<T>(v.y);
|
this->y <<= static_cast<T>(v.y);
|
||||||
@ -409,7 +409,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator>>=(vec<1, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator>>=(vec<1, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x >>= static_cast<T>(v.x);
|
this->x >>= static_cast<T>(v.x);
|
||||||
this->y >>= static_cast<T>(v.x);
|
this->y >>= static_cast<T>(v.x);
|
||||||
@ -418,7 +418,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator>>=(vec<2, U, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator>>=(vec<2, U, P> const& v)
|
||||||
{
|
{
|
||||||
this->x >>= static_cast<T>(v.x);
|
this->x >>= static_cast<T>(v.x);
|
||||||
this->y >>= static_cast<T>(v.y);
|
this->y >>= static_cast<T>(v.y);
|
||||||
@ -428,13 +428,13 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const& v)
|
||||||
{
|
{
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<2, T, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<2, T, P> const& v)
|
||||||
{
|
{
|
||||||
return vec<2, T, P>(
|
return vec<2, T, P>(
|
||||||
-v.x,
|
-v.x,
|
||||||
@ -444,7 +444,7 @@ namespace glm
|
|||||||
// -- Binary arithmetic operators --
|
// -- Binary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const & v, T scalar)
|
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const& v, T scalar)
|
||||||
{
|
{
|
||||||
return vec<2, T, P>(
|
return vec<2, T, P>(
|
||||||
v.x + scalar,
|
v.x + scalar,
|
||||||
@ -452,7 +452,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const & v1, vec<1, T, P> const & v2)
|
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const& v1, vec<1, T, P> const& v2)
|
||||||
{
|
{
|
||||||
return vec<2, T, P>(
|
return vec<2, T, P>(
|
||||||
v1.x + v2.x,
|
v1.x + v2.x,
|
||||||
@ -460,7 +460,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(T scalar, vec<2, T, P> const & v)
|
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(T scalar, vec<2, T, P> const& v)
|
||||||
{
|
{
|
||||||
return vec<2, T, P>(
|
return vec<2, T, P>(
|
||||||
scalar + v.x,
|
scalar + v.x,
|
||||||
@ -468,7 +468,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<1, T, P> const & v1, vec<2, T, P> const & v2)
|
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<1, T, P> const& v1, vec<2, T, P> const& v2)
|
||||||
{
|
{
|
||||||
return vec<2, T, P>(
|
return vec<2, T, P>(
|
||||||
v1.x + v2.x,
|
v1.x + v2.x,
|
||||||
|
@ -97,32 +97,32 @@ 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);
|
||||||
|
|
||||||
/// 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<3, U, Q> const & v);
|
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, Q> 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)
|
||||||
|
@ -38,74 +38,74 @@ namespace glm
|
|||||||
: x(scalar), y(scalar), z(scalar)
|
: x(scalar), y(scalar), z(scalar)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
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>
|
||||||
template<typename U, precision Q>
|
template<typename U, precision Q>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<4, U, Q> const & v) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, P>::vec(vec<4, 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))
|
||||||
|
@ -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>
|
||||||
|
@ -187,135 +187,135 @@ namespace detail
|
|||||||
: x(scalar), y(scalar), z(scalar), w(scalar)
|
: x(scalar), y(scalar), z(scalar), w(scalar)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
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>
|
||||||
template<typename U, precision Q>
|
template<typename U, precision Q>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<4, U, Q> const & v) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, P>::vec(vec<4, 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)),
|
||||||
@ -325,14 +325,14 @@ namespace detail
|
|||||||
// -- Component accesses --
|
// -- Component accesses --
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T & vec<4, T, P>::operator[](typename vec<4, T, P>::length_type i)
|
GLM_FUNC_QUALIFIER T& vec<4, T, P>::operator[](typename vec<4, T, P>::length_type i)
|
||||||
{
|
{
|
||||||
assert(i >= 0 && i < this->length());
|
assert(i >= 0 && i < this->length());
|
||||||
return (&x)[i];
|
return (&x)[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T const & vec<4, T, P>::operator[](typename vec<4, T, P>::length_type i) const
|
GLM_FUNC_QUALIFIER T const& vec<4, T, P>::operator[](typename vec<4, T, P>::length_type i) const
|
||||||
{
|
{
|
||||||
assert(i >= 0 && i < this->length());
|
assert(i >= 0 && i < this->length());
|
||||||
return (&x)[i];
|
return (&x)[i];
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -78,20 +78,20 @@ namespace glm
|
|||||||
// -- Implicit basic constructors --
|
// -- Implicit basic constructors --
|
||||||
|
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR tquat() GLM_DEFAULT_CTOR;
|
GLM_FUNC_DECL GLM_CONSTEXPR tquat() GLM_DEFAULT_CTOR;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR tquat(tquat<T, P> const & q) GLM_DEFAULT;
|
GLM_FUNC_DECL GLM_CONSTEXPR tquat(tquat<T, P> const& q) GLM_DEFAULT;
|
||||||
template<precision Q>
|
template<precision Q>
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR tquat(tquat<T, Q> const & q);
|
GLM_FUNC_DECL GLM_CONSTEXPR tquat(tquat<T, Q> const& q);
|
||||||
|
|
||||||
// -- 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 --
|
||||||
|
|
||||||
template<typename U, precision Q>
|
template<typename U, precision Q>
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tquat(tquat<U, Q> const & q);
|
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tquat(tquat<U, Q> const& q);
|
||||||
|
|
||||||
/// Explicit conversion operators
|
/// Explicit conversion operators
|
||||||
# if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
|
# if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
|
||||||
@ -108,22 +108,22 @@ namespace glm
|
|||||||
GLM_FUNC_DECL tquat(vec<3, T, P> const & u, vec<3, T, P> const & v);
|
GLM_FUNC_DECL tquat(vec<3, T, P> const & u, vec<3, T, P> const & v);
|
||||||
|
|
||||||
/// 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>
|
||||||
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>
|
||||||
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>
|
||||||
GLM_FUNC_DECL tquat<T, P> & operator*=(U s);
|
GLM_FUNC_DECL tquat<T, P> & operator*=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
@ -133,10 +133,10 @@ namespace glm
|
|||||||
// -- Unary bit operators --
|
// -- Unary bit operators --
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL tquat<T, P> operator+(tquat<T, P> const & q);
|
GLM_FUNC_DECL tquat<T, P> operator+(tquat<T, P> const& q);
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_DECL tquat<T, P> operator-(tquat<T, P> const & q);
|
GLM_FUNC_DECL tquat<T, P> operator-(tquat<T, P> const& q);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ namespace detail
|
|||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
template<precision Q>
|
template<precision Q>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tquat<T, Q> const & q)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::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)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -112,20 +112,20 @@ 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 --
|
||||||
|
|
||||||
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 tquat<T, P>::tquat(tquat<U, Q> const & q)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tquat<U, Q> 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))
|
||||||
@ -151,7 +151,7 @@ namespace detail
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(vec<3, T, P> const & u, vec<3, T, P> const & v)
|
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(vec<3, T, P> const& u, vec<3, T, P> const& v)
|
||||||
{
|
{
|
||||||
vec<3, T, P> const LocalW(cross(u, v));
|
vec<3, T, P> const LocalW(cross(u, v));
|
||||||
T Dot = detail::compute_dot<vec<3, T, P>, T, detail::is_aligned<P>::value>::call(u, v);
|
T Dot = detail::compute_dot<vec<3, T, P>, T, detail::is_aligned<P>::value>::call(u, v);
|
||||||
@ -161,7 +161,7 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(vec<3, T, P> const & eulerAngle)
|
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(vec<3, T, P> const& eulerAngle)
|
||||||
{
|
{
|
||||||
vec<3, T, P> c = glm::cos(eulerAngle * T(0.5));
|
vec<3, T, P> c = glm::cos(eulerAngle * T(0.5));
|
||||||
vec<3, T, P> s = glm::sin(eulerAngle * T(0.5));
|
vec<3, T, P> s = glm::sin(eulerAngle * T(0.5));
|
||||||
@ -173,13 +173,13 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(mat<3, 3, T, P> const & m)
|
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(mat<3, 3, T, P> const& m)
|
||||||
{
|
{
|
||||||
*this = quat_cast(m);
|
*this = quat_cast(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(mat<4, 4, T, P> const & m)
|
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(mat<4, 4, T, P> const& m)
|
||||||
{
|
{
|
||||||
*this = quat_cast(m);
|
*this = quat_cast(m);
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ namespace detail
|
|||||||
# endif//GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
|
# endif//GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
|
||||||
|
|
||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P> conjugate(tquat<T, P> const & q)
|
GLM_FUNC_QUALIFIER tquat<T, P> conjugate(tquat<T, P> const& q)
|
||||||
{
|
{
|
||||||
return tquat<T, P>(q.w, -q.x, -q.y, -q.z);
|
return tquat<T, P>(q.w, -q.x, -q.y, -q.z);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user