|
|
@@ -26,7 +26,10 @@ namespace glm
|
|
|
|
|
|
// -- Data --
|
|
|
|
|
|
-# if GLM_HAS_ALIGNED_TYPE
|
|
|
+# if GLM_HAS_ONLY_XYZW
|
|
|
+ T x, y, z, w;
|
|
|
+
|
|
|
+# elif GLM_HAS_ALIGNED_TYPE
|
|
|
# if GLM_COMPILER & GLM_COMPILER_GCC
|
|
|
# pragma GCC diagnostic push
|
|
|
# pragma GCC diagnostic ignored "-Wpedantic"
|
|
|
@@ -109,41 +112,41 @@ namespace glm
|
|
|
|
|
|
/// 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>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const& _xy, B _z, C _w);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename A, typename B, typename C, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z, vec<1, C, Q> const& _w);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename A, typename B, typename C, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, Q> const& _yz, C _w);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename A, typename B, typename C, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz, vec<1, C, Q> const& _w);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename A, typename B, typename C, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, B _y, vec<2, C, Q> const& _zw);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename A, typename B, typename C, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y, vec<2, C, Q> const& _zw);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename A, typename B, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, Q> const& _xyz, B _w);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename A, typename B, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, Q> const& _xyz, vec<1, B, Q> const& _w);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename A, typename B, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<3, B, Q> const& _yzw);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename A, typename B, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& _x, vec<3, B, Q> const& _yzw);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename A, typename B, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, Q> const& _xy, vec<2, B, Q> const& _zw);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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)
|
|
|
template<typename U, precision Q>
|
|
|
- GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, Q> const& v);
|
|
|
+ GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, Q> const& v);
|
|
|
|
|
|
// -- Swizzle constructors --
|
|
|
# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)
|
|
|
@@ -192,34 +195,34 @@ namespace glm
|
|
|
|
|
|
// -- Unary arithmetic operators --
|
|
|
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator=(vec<4, T, P> const & v) GLM_DEFAULT;
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator=(vec<4, T, P> const & v) GLM_DEFAULT;
|
|
|
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator=(vec<4, U, P> const & v);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator=(vec<4, U, P> const & v);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator+=(U scalar);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator+=(U scalar);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator+=(vec<1, U, P> const & v);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator+=(vec<1, U, P> const & v);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator+=(vec<4, U, P> const & v);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator+=(vec<4, U, P> const & v);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator-=(U scalar);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator-=(U scalar);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator-=(vec<1, U, P> const & v);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator-=(vec<1, U, P> const & v);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator-=(vec<4, U, P> const & v);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator-=(vec<4, U, P> const & v);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator*=(U scalar);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator*=(U scalar);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator*=(vec<1, U, P> const& v);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator*=(vec<1, U, P> const& v);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator*=(vec<4, U, P> const& v);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator*=(vec<4, U, P> const& v);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator/=(U scalar);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator/=(U scalar);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator/=(vec<1, U, P> const & v);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator/=(vec<1, U, P> const & v);
|
|
|
template<typename U>
|
|
|
- GLM_FUNC_DECL vec<4, T, P> & operator/=(vec<4, U, P> const & v);
|
|
|
+ GLM_FUNC_DECL vec<4, T, P>& operator/=(vec<4, U, P> const & v);
|
|
|
|
|
|
// -- Increment and decrement operators --
|
|
|
|