mirror of
https://github.com/g-truc/glm.git
synced 2025-04-05 05:25:02 +00:00
Merge 63d8733b69
into 2d4c4b4dd3
This commit is contained in:
commit
885233d72c
57 changed files with 2406 additions and 7692 deletions
|
@ -17,20 +17,8 @@ namespace detail
|
|||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<2, T, Q> permute(vec<2, T, Q> const& x)
|
||||
{
|
||||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<3, T, Q> permute(vec<3, T, Q> const& x)
|
||||
{
|
||||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<4, T, Q> permute(vec<4, T, Q> const& x)
|
||||
template<length_t L,typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<L, T, Q> permute(vec<L, T, Q> const& x)
|
||||
{
|
||||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||
}
|
||||
|
@ -41,41 +29,18 @@ namespace detail
|
|||
return static_cast<T>(1.79284291400159) - static_cast<T>(0.85373472095314) * r;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<2, T, Q> taylorInvSqrt(vec<2, T, Q> const& r)
|
||||
template<length_t L,typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<L, T, Q> taylorInvSqrt(vec<L, T, Q> const& r)
|
||||
{
|
||||
return static_cast<T>(1.79284291400159) - static_cast<T>(0.85373472095314) * r;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<3, T, Q> taylorInvSqrt(vec<3, T, Q> const& r)
|
||||
{
|
||||
return static_cast<T>(1.79284291400159) - static_cast<T>(0.85373472095314) * r;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<4, T, Q> taylorInvSqrt(vec<4, T, Q> const& r)
|
||||
{
|
||||
return static_cast<T>(1.79284291400159) - static_cast<T>(0.85373472095314) * r;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<2, T, Q> fade(vec<2, T, Q> const& t)
|
||||
template<length_t L,typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<L, T, Q> fade(vec<L, T, Q> const& t)
|
||||
{
|
||||
return (t * t * t) * (t * (t * static_cast<T>(6) - static_cast<T>(15)) + static_cast<T>(10));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<3, T, Q> fade(vec<3, T, Q> const& t)
|
||||
{
|
||||
return (t * t * t) * (t * (t * static_cast<T>(6) - static_cast<T>(15)) + static_cast<T>(10));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<4, T, Q> fade(vec<4, T, Q> const& t)
|
||||
{
|
||||
return (t * t * t) * (t * (t * static_cast<T>(6) - static_cast<T>(15)) + static_cast<T>(10));
|
||||
}
|
||||
}//namespace detail
|
||||
}//namespace glm
|
||||
|
||||
|
|
|
@ -310,500 +310,500 @@ namespace glm
|
|||
}
|
||||
|
||||
#define GLM_SWIZZLE2_2_MEMBERS(T, Q, E0,E1) \
|
||||
struct { detail::_swizzle<2, T, Q, 0,0,-1,-2> E0 ## E0; }; \
|
||||
struct { detail::_swizzle<2, T, Q, 0,1,-1,-2> E0 ## E1; }; \
|
||||
struct { detail::_swizzle<2, T, Q, 1,0,-1,-2> E1 ## E0; }; \
|
||||
struct { detail::_swizzle<2, T, Q, 1,1,-1,-2> E1 ## E1; };
|
||||
detail::_swizzle<2, T, Q, 0,0,-1,-2> E0 ## E0; \
|
||||
detail::_swizzle<2, T, Q, 0,1,-1,-2> E0 ## E1; \
|
||||
detail::_swizzle<2, T, Q, 1,0,-1,-2> E1 ## E0; \
|
||||
detail::_swizzle<2, T, Q, 1,1,-1,-2> E1 ## E1;
|
||||
|
||||
#define GLM_SWIZZLE2_3_MEMBERS(T, Q, E0,E1) \
|
||||
struct { detail::_swizzle<3,T, Q, 0,0,0,-1> E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<3,T, Q, 0,0,1,-1> E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<3,T, Q, 0,1,0,-1> E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<3,T, Q, 0,1,1,-1> E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<3,T, Q, 1,0,0,-1> E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<3,T, Q, 1,0,1,-1> E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<3,T, Q, 1,1,0,-1> E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<3,T, Q, 1,1,1,-1> E1 ## E1 ## E1; };
|
||||
detail::_swizzle<3,T, Q, 0,0,0,-1> E0 ## E0 ## E0; \
|
||||
detail::_swizzle<3,T, Q, 0,0,1,-1> E0 ## E0 ## E1; \
|
||||
detail::_swizzle<3,T, Q, 0,1,0,-1> E0 ## E1 ## E0; \
|
||||
detail::_swizzle<3,T, Q, 0,1,1,-1> E0 ## E1 ## E1; \
|
||||
detail::_swizzle<3,T, Q, 1,0,0,-1> E1 ## E0 ## E0; \
|
||||
detail::_swizzle<3,T, Q, 1,0,1,-1> E1 ## E0 ## E1; \
|
||||
detail::_swizzle<3,T, Q, 1,1,0,-1> E1 ## E1 ## E0; \
|
||||
detail::_swizzle<3,T, Q, 1,1,1,-1> E1 ## E1 ## E1;
|
||||
|
||||
#define GLM_SWIZZLE2_4_MEMBERS(T, Q, E0,E1) \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,1,1> E1 ## E1 ## E1 ## E1; };
|
||||
detail::_swizzle<4,T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,0,0,1> E0 ## E0 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,0,1,0> E0 ## E0 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,0,1,1> E0 ## E0 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,1,0,0> E0 ## E1 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,1,0,1> E0 ## E1 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,1,1,0> E0 ## E1 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,1,1,1> E0 ## E1 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,0,0,0> E1 ## E0 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,0,0,1> E1 ## E0 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,0,1,0> E1 ## E0 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,0,1,1> E1 ## E0 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,1,0,0> E1 ## E1 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,1,0,1> E1 ## E1 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,1,1,0> E1 ## E1 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,1,1,1> E1 ## E1 ## E1 ## E1;
|
||||
|
||||
#define GLM_SWIZZLE3_2_MEMBERS(T, Q, E0,E1,E2) \
|
||||
struct { detail::_swizzle<2,T, Q, 0,0,-1,-2> E0 ## E0; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 0,1,-1,-2> E0 ## E1; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 0,2,-1,-2> E0 ## E2; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 1,0,-1,-2> E1 ## E0; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 1,1,-1,-2> E1 ## E1; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 1,2,-1,-2> E1 ## E2; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 2,0,-1,-2> E2 ## E0; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 2,1,-1,-2> E2 ## E1; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 2,2,-1,-2> E2 ## E2; };
|
||||
detail::_swizzle<2,T, Q, 0,0,-1,-2> E0 ## E0; \
|
||||
detail::_swizzle<2,T, Q, 0,1,-1,-2> E0 ## E1; \
|
||||
detail::_swizzle<2,T, Q, 0,2,-1,-2> E0 ## E2; \
|
||||
detail::_swizzle<2,T, Q, 1,0,-1,-2> E1 ## E0; \
|
||||
detail::_swizzle<2,T, Q, 1,1,-1,-2> E1 ## E1; \
|
||||
detail::_swizzle<2,T, Q, 1,2,-1,-2> E1 ## E2; \
|
||||
detail::_swizzle<2,T, Q, 2,0,-1,-2> E2 ## E0; \
|
||||
detail::_swizzle<2,T, Q, 2,1,-1,-2> E2 ## E1; \
|
||||
detail::_swizzle<2,T, Q, 2,2,-1,-2> E2 ## E2;
|
||||
|
||||
#define GLM_SWIZZLE3_3_MEMBERS(T, Q ,E0,E1,E2) \
|
||||
struct { detail::_swizzle<3, T, Q, 0,0,0,3> E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,0,1,3> E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,0,2,3> E0 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,1,0,3> E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,1,1,3> E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,1,2,3> E0 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,2,0,3> E0 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,2,1,3> E0 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,2,2,3> E0 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,0,0,3> E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,0,1,3> E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,0,2,3> E1 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,1,0,3> E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,1,1,3> E1 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,1,2,3> E1 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,2,0,3> E1 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,2,1,3> E1 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,2,2,3> E1 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,0,0,3> E2 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,0,1,3> E2 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,0,2,3> E2 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,1,0,3> E2 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,1,1,3> E2 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,1,2,3> E2 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,2,0,3> E2 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,2,1,3> E2 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,2,2,3> E2 ## E2 ## E2; };
|
||||
detail::_swizzle<3, T, Q, 0,0,0,3> E0 ## E0 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 0,0,1,3> E0 ## E0 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 0,0,2,3> E0 ## E0 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 0,1,0,3> E0 ## E1 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 0,1,1,3> E0 ## E1 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 0,1,2,3> E0 ## E1 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 0,2,0,3> E0 ## E2 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 0,2,1,3> E0 ## E2 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 0,2,2,3> E0 ## E2 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 1,0,0,3> E1 ## E0 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 1,0,1,3> E1 ## E0 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 1,0,2,3> E1 ## E0 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 1,1,0,3> E1 ## E1 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 1,1,1,3> E1 ## E1 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 1,1,2,3> E1 ## E1 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 1,2,0,3> E1 ## E2 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 1,2,1,3> E1 ## E2 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 1,2,2,3> E1 ## E2 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 2,0,0,3> E2 ## E0 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 2,0,1,3> E2 ## E0 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 2,0,2,3> E2 ## E0 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 2,1,0,3> E2 ## E1 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 2,1,1,3> E2 ## E1 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 2,1,2,3> E2 ## E1 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 2,2,0,3> E2 ## E2 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 2,2,1,3> E2 ## E2 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 2,2,2,3> E2 ## E2 ## E2;
|
||||
|
||||
#define GLM_SWIZZLE3_4_MEMBERS(T, Q, E0,E1,E2) \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4,T, Q, 2,2,2,2> E2 ## E2 ## E2 ## E2; };
|
||||
detail::_swizzle<4,T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,0,0,1> E0 ## E0 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,0,0,2> E0 ## E0 ## E0 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 0,0,1,0> E0 ## E0 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,0,1,1> E0 ## E0 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,0,1,2> E0 ## E0 ## E1 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 0,0,2,0> E0 ## E0 ## E2 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,0,2,1> E0 ## E0 ## E2 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,0,2,2> E0 ## E0 ## E2 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 0,1,0,0> E0 ## E1 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,1,0,1> E0 ## E1 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,1,0,2> E0 ## E1 ## E0 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 0,1,1,0> E0 ## E1 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,1,1,1> E0 ## E1 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,1,1,2> E0 ## E1 ## E1 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 0,1,2,0> E0 ## E1 ## E2 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,1,2,1> E0 ## E1 ## E2 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,1,2,2> E0 ## E1 ## E2 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 0,2,0,0> E0 ## E2 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,2,0,1> E0 ## E2 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,2,0,2> E0 ## E2 ## E0 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 0,2,1,0> E0 ## E2 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,2,1,1> E0 ## E2 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,2,1,2> E0 ## E2 ## E1 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 0,2,2,0> E0 ## E2 ## E2 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 0,2,2,1> E0 ## E2 ## E2 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 0,2,2,2> E0 ## E2 ## E2 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 1,0,0,0> E1 ## E0 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,0,0,1> E1 ## E0 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,0,0,2> E1 ## E0 ## E0 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 1,0,1,0> E1 ## E0 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,0,1,1> E1 ## E0 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,0,1,2> E1 ## E0 ## E1 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 1,0,2,0> E1 ## E0 ## E2 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,0,2,1> E1 ## E0 ## E2 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,0,2,2> E1 ## E0 ## E2 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 1,1,0,0> E1 ## E1 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,1,0,1> E1 ## E1 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,1,0,2> E1 ## E1 ## E0 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 1,1,1,0> E1 ## E1 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,1,1,1> E1 ## E1 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,1,1,2> E1 ## E1 ## E1 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 1,1,2,0> E1 ## E1 ## E2 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,1,2,1> E1 ## E1 ## E2 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,1,2,2> E1 ## E1 ## E2 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 1,2,0,0> E1 ## E2 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,2,0,1> E1 ## E2 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,2,0,2> E1 ## E2 ## E0 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 1,2,1,0> E1 ## E2 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,2,1,1> E1 ## E2 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,2,1,2> E1 ## E2 ## E1 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 1,2,2,0> E1 ## E2 ## E2 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 1,2,2,1> E1 ## E2 ## E2 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 1,2,2,2> E1 ## E2 ## E2 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 2,0,0,0> E2 ## E0 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 2,0,0,1> E2 ## E0 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 2,0,0,2> E2 ## E0 ## E0 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 2,0,1,0> E2 ## E0 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 2,0,1,1> E2 ## E0 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 2,0,1,2> E2 ## E0 ## E1 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 2,0,2,0> E2 ## E0 ## E2 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 2,0,2,1> E2 ## E0 ## E2 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 2,0,2,2> E2 ## E0 ## E2 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 2,1,0,0> E2 ## E1 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 2,1,0,1> E2 ## E1 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 2,1,0,2> E2 ## E1 ## E0 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 2,1,1,0> E2 ## E1 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 2,1,1,1> E2 ## E1 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 2,1,1,2> E2 ## E1 ## E1 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 2,1,2,0> E2 ## E1 ## E2 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 2,1,2,1> E2 ## E1 ## E2 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 2,1,2,2> E2 ## E1 ## E2 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 2,2,0,0> E2 ## E2 ## E0 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 2,2,0,1> E2 ## E2 ## E0 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 2,2,0,2> E2 ## E2 ## E0 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 2,2,1,0> E2 ## E2 ## E1 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 2,2,1,1> E2 ## E2 ## E1 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 2,2,1,2> E2 ## E2 ## E1 ## E2; \
|
||||
detail::_swizzle<4,T, Q, 2,2,2,0> E2 ## E2 ## E2 ## E0; \
|
||||
detail::_swizzle<4,T, Q, 2,2,2,1> E2 ## E2 ## E2 ## E1; \
|
||||
detail::_swizzle<4,T, Q, 2,2,2,2> E2 ## E2 ## E2 ## E2;
|
||||
|
||||
#define GLM_SWIZZLE4_2_MEMBERS(T, Q, E0,E1,E2,E3) \
|
||||
struct { detail::_swizzle<2,T, Q, 0,0,-1,-2> E0 ## E0; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 0,1,-1,-2> E0 ## E1; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 0,2,-1,-2> E0 ## E2; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 0,3,-1,-2> E0 ## E3; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 1,0,-1,-2> E1 ## E0; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 1,1,-1,-2> E1 ## E1; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 1,2,-1,-2> E1 ## E2; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 1,3,-1,-2> E1 ## E3; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 2,0,-1,-2> E2 ## E0; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 2,1,-1,-2> E2 ## E1; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 2,2,-1,-2> E2 ## E2; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 2,3,-1,-2> E2 ## E3; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 3,0,-1,-2> E3 ## E0; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 3,1,-1,-2> E3 ## E1; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 3,2,-1,-2> E3 ## E2; }; \
|
||||
struct { detail::_swizzle<2,T, Q, 3,3,-1,-2> E3 ## E3; };
|
||||
detail::_swizzle<2,T, Q, 0,0,-1,-2> E0 ## E0; \
|
||||
detail::_swizzle<2,T, Q, 0,1,-1,-2> E0 ## E1; \
|
||||
detail::_swizzle<2,T, Q, 0,2,-1,-2> E0 ## E2; \
|
||||
detail::_swizzle<2,T, Q, 0,3,-1,-2> E0 ## E3; \
|
||||
detail::_swizzle<2,T, Q, 1,0,-1,-2> E1 ## E0; \
|
||||
detail::_swizzle<2,T, Q, 1,1,-1,-2> E1 ## E1; \
|
||||
detail::_swizzle<2,T, Q, 1,2,-1,-2> E1 ## E2; \
|
||||
detail::_swizzle<2,T, Q, 1,3,-1,-2> E1 ## E3; \
|
||||
detail::_swizzle<2,T, Q, 2,0,-1,-2> E2 ## E0; \
|
||||
detail::_swizzle<2,T, Q, 2,1,-1,-2> E2 ## E1; \
|
||||
detail::_swizzle<2,T, Q, 2,2,-1,-2> E2 ## E2; \
|
||||
detail::_swizzle<2,T, Q, 2,3,-1,-2> E2 ## E3; \
|
||||
detail::_swizzle<2,T, Q, 3,0,-1,-2> E3 ## E0; \
|
||||
detail::_swizzle<2,T, Q, 3,1,-1,-2> E3 ## E1; \
|
||||
detail::_swizzle<2,T, Q, 3,2,-1,-2> E3 ## E2; \
|
||||
detail::_swizzle<2,T, Q, 3,3,-1,-2> E3 ## E3;
|
||||
|
||||
#define GLM_SWIZZLE4_3_MEMBERS(T, Q, E0,E1,E2,E3) \
|
||||
struct { detail::_swizzle<3, T, Q, 0,0,0,3> E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,0,1,3> E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,0,2,3> E0 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,0,3,3> E0 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,1,0,3> E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,1,1,3> E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,1,2,3> E0 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,1,3,3> E0 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,2,0,3> E0 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,2,1,3> E0 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,2,2,3> E0 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,2,3,3> E0 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,3,0,3> E0 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,3,1,3> E0 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,3,2,3> E0 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 0,3,3,3> E0 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,0,0,3> E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,0,1,3> E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,0,2,3> E1 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,0,3,3> E1 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,1,0,3> E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,1,1,3> E1 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,1,2,3> E1 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,1,3,3> E1 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,2,0,3> E1 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,2,1,3> E1 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,2,2,3> E1 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,2,3,3> E1 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,3,0,3> E1 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,3,1,3> E1 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,3,2,3> E1 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 1,3,3,3> E1 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,0,0,3> E2 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,0,1,3> E2 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,0,2,3> E2 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,0,3,3> E2 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,1,0,3> E2 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,1,1,3> E2 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,1,2,3> E2 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,1,3,3> E2 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,2,0,3> E2 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,2,1,3> E2 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,2,2,3> E2 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,2,3,3> E2 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,3,0,3> E2 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,3,1,3> E2 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,3,2,3> E2 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 2,3,3,3> E2 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,0,0,3> E3 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,0,1,3> E3 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,0,2,3> E3 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,0,3,3> E3 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,1,0,3> E3 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,1,1,3> E3 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,1,2,3> E3 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,1,3,3> E3 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,2,0,3> E3 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,2,1,3> E3 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,2,2,3> E3 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,2,3,3> E3 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,3,0,3> E3 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,3,1,3> E3 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,3,2,3> E3 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<3, T, Q, 3,3,3,3> E3 ## E3 ## E3; };
|
||||
detail::_swizzle<3, T, Q, 0,0,0,3> E0 ## E0 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 0,0,1,3> E0 ## E0 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 0,0,2,3> E0 ## E0 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 0,0,3,3> E0 ## E0 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 0,1,0,3> E0 ## E1 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 0,1,1,3> E0 ## E1 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 0,1,2,3> E0 ## E1 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 0,1,3,3> E0 ## E1 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 0,2,0,3> E0 ## E2 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 0,2,1,3> E0 ## E2 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 0,2,2,3> E0 ## E2 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 0,2,3,3> E0 ## E2 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 0,3,0,3> E0 ## E3 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 0,3,1,3> E0 ## E3 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 0,3,2,3> E0 ## E3 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 0,3,3,3> E0 ## E3 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 1,0,0,3> E1 ## E0 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 1,0,1,3> E1 ## E0 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 1,0,2,3> E1 ## E0 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 1,0,3,3> E1 ## E0 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 1,1,0,3> E1 ## E1 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 1,1,1,3> E1 ## E1 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 1,1,2,3> E1 ## E1 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 1,1,3,3> E1 ## E1 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 1,2,0,3> E1 ## E2 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 1,2,1,3> E1 ## E2 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 1,2,2,3> E1 ## E2 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 1,2,3,3> E1 ## E2 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 1,3,0,3> E1 ## E3 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 1,3,1,3> E1 ## E3 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 1,3,2,3> E1 ## E3 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 1,3,3,3> E1 ## E3 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 2,0,0,3> E2 ## E0 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 2,0,1,3> E2 ## E0 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 2,0,2,3> E2 ## E0 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 2,0,3,3> E2 ## E0 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 2,1,0,3> E2 ## E1 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 2,1,1,3> E2 ## E1 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 2,1,2,3> E2 ## E1 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 2,1,3,3> E2 ## E1 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 2,2,0,3> E2 ## E2 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 2,2,1,3> E2 ## E2 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 2,2,2,3> E2 ## E2 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 2,2,3,3> E2 ## E2 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 2,3,0,3> E2 ## E3 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 2,3,1,3> E2 ## E3 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 2,3,2,3> E2 ## E3 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 2,3,3,3> E2 ## E3 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 3,0,0,3> E3 ## E0 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 3,0,1,3> E3 ## E0 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 3,0,2,3> E3 ## E0 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 3,0,3,3> E3 ## E0 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 3,1,0,3> E3 ## E1 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 3,1,1,3> E3 ## E1 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 3,1,2,3> E3 ## E1 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 3,1,3,3> E3 ## E1 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 3,2,0,3> E3 ## E2 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 3,2,1,3> E3 ## E2 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 3,2,2,3> E3 ## E2 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 3,2,3,3> E3 ## E2 ## E3; \
|
||||
detail::_swizzle<3, T, Q, 3,3,0,3> E3 ## E3 ## E0; \
|
||||
detail::_swizzle<3, T, Q, 3,3,1,3> E3 ## E3 ## E1; \
|
||||
detail::_swizzle<3, T, Q, 3,3,2,3> E3 ## E3 ## E2; \
|
||||
detail::_swizzle<3, T, Q, 3,3,3,3> E3 ## E3 ## E3;
|
||||
|
||||
#define GLM_SWIZZLE4_4_MEMBERS(T, Q, E0,E1,E2,E3) \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,0,3> E0 ## E0 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,1,3> E0 ## E0 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,2,3> E0 ## E0 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,3,0> E0 ## E0 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,3,1> E0 ## E0 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,3,2> E0 ## E0 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,0,3,3> E0 ## E0 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,0,3> E0 ## E1 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,1,3> E0 ## E1 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,2,3> E0 ## E1 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,3,0> E0 ## E1 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,3,1> E0 ## E1 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,3,2> E0 ## E1 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,1,3,3> E0 ## E1 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,0,3> E0 ## E2 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,1,3> E0 ## E2 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,2,3> E0 ## E2 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,3,0> E0 ## E2 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,3,1> E0 ## E2 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,3,2> E0 ## E2 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,2,3,3> E0 ## E2 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,0,0> E0 ## E3 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,0,1> E0 ## E3 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,0,2> E0 ## E3 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,0,3> E0 ## E3 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,1,0> E0 ## E3 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,1,1> E0 ## E3 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,1,2> E0 ## E3 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,1,3> E0 ## E3 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,2,0> E0 ## E3 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,2,1> E0 ## E3 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,2,2> E0 ## E3 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,2,3> E0 ## E3 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,3,0> E0 ## E3 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,3,1> E0 ## E3 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,3,2> E0 ## E3 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 0,3,3,3> E0 ## E3 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,0,3> E1 ## E0 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,1,3> E1 ## E0 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,2,3> E1 ## E0 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,3,0> E1 ## E0 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,3,1> E1 ## E0 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,3,2> E1 ## E0 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,0,3,3> E1 ## E0 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,0,3> E1 ## E1 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,1,3> E1 ## E1 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,2,3> E1 ## E1 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,3,0> E1 ## E1 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,3,1> E1 ## E1 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,3,2> E1 ## E1 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,1,3,3> E1 ## E1 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,0,3> E1 ## E2 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,1,3> E1 ## E2 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,2,3> E1 ## E2 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,3,0> E1 ## E2 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,3,1> E1 ## E2 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,3,2> E1 ## E2 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,2,3,3> E1 ## E2 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,0,0> E1 ## E3 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,0,1> E1 ## E3 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,0,2> E1 ## E3 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,0,3> E1 ## E3 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,1,0> E1 ## E3 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,1,1> E1 ## E3 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,1,2> E1 ## E3 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,1,3> E1 ## E3 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,2,0> E1 ## E3 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,2,1> E1 ## E3 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,2,2> E1 ## E3 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,2,3> E1 ## E3 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,3,0> E1 ## E3 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,3,1> E1 ## E3 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,3,2> E1 ## E3 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 1,3,3,3> E1 ## E3 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,0,3> E2 ## E0 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,1,3> E2 ## E0 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,2,3> E2 ## E0 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,3,0> E2 ## E0 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,3,1> E2 ## E0 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,3,2> E2 ## E0 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,0,3,3> E2 ## E0 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,0,3> E2 ## E1 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,1,3> E2 ## E1 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,2,3> E2 ## E1 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,3,0> E2 ## E1 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,3,1> E2 ## E1 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,3,2> E2 ## E1 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,1,3,3> E2 ## E1 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,0,3> E2 ## E2 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,1,3> E2 ## E2 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,2,3> E2 ## E2 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,3,0> E2 ## E2 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,3,1> E2 ## E2 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,3,2> E2 ## E2 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,2,3,3> E2 ## E2 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,0,0> E2 ## E3 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,0,1> E2 ## E3 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,0,2> E2 ## E3 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,0,3> E2 ## E3 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,1,0> E2 ## E3 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,1,1> E2 ## E3 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,1,2> E2 ## E3 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,1,3> E2 ## E3 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,2,0> E2 ## E3 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,2,1> E2 ## E3 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,2,2> E2 ## E3 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,2,3> E2 ## E3 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,3,0> E2 ## E3 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,3,1> E2 ## E3 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,3,2> E2 ## E3 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 2,3,3,3> E2 ## E3 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,0,0> E3 ## E0 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,0,1> E3 ## E0 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,0,2> E3 ## E0 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,0,3> E3 ## E0 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,1,0> E3 ## E0 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,1,1> E3 ## E0 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,1,2> E3 ## E0 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,1,3> E3 ## E0 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,2,0> E3 ## E0 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,2,1> E3 ## E0 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,2,2> E3 ## E0 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,2,3> E3 ## E0 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,3,0> E3 ## E0 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,3,1> E3 ## E0 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,3,2> E3 ## E0 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,0,3,3> E3 ## E0 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,0,0> E3 ## E1 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,0,1> E3 ## E1 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,0,2> E3 ## E1 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,0,3> E3 ## E1 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,1,0> E3 ## E1 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,1,1> E3 ## E1 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,1,2> E3 ## E1 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,1,3> E3 ## E1 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,2,0> E3 ## E1 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,2,1> E3 ## E1 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,2,2> E3 ## E1 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,2,3> E3 ## E1 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,3,0> E3 ## E1 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,3,1> E3 ## E1 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,3,2> E3 ## E1 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,1,3,3> E3 ## E1 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,0,0> E3 ## E2 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,0,1> E3 ## E2 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,0,2> E3 ## E2 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,0,3> E3 ## E2 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,1,0> E3 ## E2 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,1,1> E3 ## E2 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,1,2> E3 ## E2 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,1,3> E3 ## E2 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,2,0> E3 ## E2 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,2,1> E3 ## E2 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,2,2> E3 ## E2 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,2,3> E3 ## E2 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,3,0> E3 ## E2 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,3,1> E3 ## E2 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,3,2> E3 ## E2 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,2,3,3> E3 ## E2 ## E3 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,0,0> E3 ## E3 ## E0 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,0,1> E3 ## E3 ## E0 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,0,2> E3 ## E3 ## E0 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,0,3> E3 ## E3 ## E0 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,1,0> E3 ## E3 ## E1 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,1,1> E3 ## E3 ## E1 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,1,2> E3 ## E3 ## E1 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,1,3> E3 ## E3 ## E1 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,2,0> E3 ## E3 ## E2 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,2,1> E3 ## E3 ## E2 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,2,2> E3 ## E3 ## E2 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,2,3> E3 ## E3 ## E2 ## E3; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,3,0> E3 ## E3 ## E3 ## E0; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,3,1> E3 ## E3 ## E3 ## E1; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,3,2> E3 ## E3 ## E3 ## E2; }; \
|
||||
struct { detail::_swizzle<4, T, Q, 3,3,3,3> E3 ## E3 ## E3 ## E3; };
|
||||
detail::_swizzle<4, T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,0,0,1> E0 ## E0 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,0,0,2> E0 ## E0 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,0,0,3> E0 ## E0 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,0,1,0> E0 ## E0 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,0,1,1> E0 ## E0 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,0,1,2> E0 ## E0 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,0,1,3> E0 ## E0 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,0,2,0> E0 ## E0 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,0,2,1> E0 ## E0 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,0,2,2> E0 ## E0 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,0,2,3> E0 ## E0 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,0,3,0> E0 ## E0 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,0,3,1> E0 ## E0 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,0,3,2> E0 ## E0 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,0,3,3> E0 ## E0 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,1,0,0> E0 ## E1 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,1,0,1> E0 ## E1 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,1,0,2> E0 ## E1 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,1,0,3> E0 ## E1 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,1,1,0> E0 ## E1 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,1,1,1> E0 ## E1 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,1,1,2> E0 ## E1 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,1,1,3> E0 ## E1 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,1,2,0> E0 ## E1 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,1,2,1> E0 ## E1 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,1,2,2> E0 ## E1 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,1,2,3> E0 ## E1 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,1,3,0> E0 ## E1 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,1,3,1> E0 ## E1 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,1,3,2> E0 ## E1 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,1,3,3> E0 ## E1 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,2,0,0> E0 ## E2 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,2,0,1> E0 ## E2 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,2,0,2> E0 ## E2 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,2,0,3> E0 ## E2 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,2,1,0> E0 ## E2 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,2,1,1> E0 ## E2 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,2,1,2> E0 ## E2 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,2,1,3> E0 ## E2 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,2,2,0> E0 ## E2 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,2,2,1> E0 ## E2 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,2,2,2> E0 ## E2 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,2,2,3> E0 ## E2 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,2,3,0> E0 ## E2 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,2,3,1> E0 ## E2 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,2,3,2> E0 ## E2 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,2,3,3> E0 ## E2 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,3,0,0> E0 ## E3 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,3,0,1> E0 ## E3 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,3,0,2> E0 ## E3 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,3,0,3> E0 ## E3 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,3,1,0> E0 ## E3 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,3,1,1> E0 ## E3 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,3,1,2> E0 ## E3 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,3,1,3> E0 ## E3 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,3,2,0> E0 ## E3 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,3,2,1> E0 ## E3 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,3,2,2> E0 ## E3 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,3,2,3> E0 ## E3 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 0,3,3,0> E0 ## E3 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 0,3,3,1> E0 ## E3 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 0,3,3,2> E0 ## E3 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 0,3,3,3> E0 ## E3 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,0,0,0> E1 ## E0 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,0,0,1> E1 ## E0 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,0,0,2> E1 ## E0 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,0,0,3> E1 ## E0 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,0,1,0> E1 ## E0 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,0,1,1> E1 ## E0 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,0,1,2> E1 ## E0 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,0,1,3> E1 ## E0 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,0,2,0> E1 ## E0 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,0,2,1> E1 ## E0 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,0,2,2> E1 ## E0 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,0,2,3> E1 ## E0 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,0,3,0> E1 ## E0 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,0,3,1> E1 ## E0 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,0,3,2> E1 ## E0 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,0,3,3> E1 ## E0 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,1,0,0> E1 ## E1 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,1,0,1> E1 ## E1 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,1,0,2> E1 ## E1 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,1,0,3> E1 ## E1 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,1,1,0> E1 ## E1 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,1,1,1> E1 ## E1 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,1,1,2> E1 ## E1 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,1,1,3> E1 ## E1 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,1,2,0> E1 ## E1 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,1,2,1> E1 ## E1 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,1,2,2> E1 ## E1 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,1,2,3> E1 ## E1 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,1,3,0> E1 ## E1 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,1,3,1> E1 ## E1 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,1,3,2> E1 ## E1 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,1,3,3> E1 ## E1 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,2,0,0> E1 ## E2 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,2,0,1> E1 ## E2 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,2,0,2> E1 ## E2 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,2,0,3> E1 ## E2 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,2,1,0> E1 ## E2 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,2,1,1> E1 ## E2 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,2,1,2> E1 ## E2 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,2,1,3> E1 ## E2 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,2,2,0> E1 ## E2 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,2,2,1> E1 ## E2 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,2,2,2> E1 ## E2 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,2,2,3> E1 ## E2 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,2,3,0> E1 ## E2 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,2,3,1> E1 ## E2 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,2,3,2> E1 ## E2 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,2,3,3> E1 ## E2 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,3,0,0> E1 ## E3 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,3,0,1> E1 ## E3 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,3,0,2> E1 ## E3 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,3,0,3> E1 ## E3 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,3,1,0> E1 ## E3 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,3,1,1> E1 ## E3 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,3,1,2> E1 ## E3 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,3,1,3> E1 ## E3 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,3,2,0> E1 ## E3 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,3,2,1> E1 ## E3 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,3,2,2> E1 ## E3 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,3,2,3> E1 ## E3 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 1,3,3,0> E1 ## E3 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 1,3,3,1> E1 ## E3 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 1,3,3,2> E1 ## E3 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 1,3,3,3> E1 ## E3 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,0,0,0> E2 ## E0 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,0,0,1> E2 ## E0 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,0,0,2> E2 ## E0 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,0,0,3> E2 ## E0 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,0,1,0> E2 ## E0 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,0,1,1> E2 ## E0 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,0,1,2> E2 ## E0 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,0,1,3> E2 ## E0 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,0,2,0> E2 ## E0 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,0,2,1> E2 ## E0 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,0,2,2> E2 ## E0 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,0,2,3> E2 ## E0 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,0,3,0> E2 ## E0 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,0,3,1> E2 ## E0 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,0,3,2> E2 ## E0 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,0,3,3> E2 ## E0 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,1,0,0> E2 ## E1 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,1,0,1> E2 ## E1 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,1,0,2> E2 ## E1 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,1,0,3> E2 ## E1 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,1,1,0> E2 ## E1 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,1,1,1> E2 ## E1 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,1,1,2> E2 ## E1 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,1,1,3> E2 ## E1 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,1,2,0> E2 ## E1 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,1,2,1> E2 ## E1 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,1,2,2> E2 ## E1 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,1,2,3> E2 ## E1 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,1,3,0> E2 ## E1 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,1,3,1> E2 ## E1 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,1,3,2> E2 ## E1 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,1,3,3> E2 ## E1 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,2,0,0> E2 ## E2 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,2,0,1> E2 ## E2 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,2,0,2> E2 ## E2 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,2,0,3> E2 ## E2 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,2,1,0> E2 ## E2 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,2,1,1> E2 ## E2 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,2,1,2> E2 ## E2 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,2,1,3> E2 ## E2 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,2,2,0> E2 ## E2 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,2,2,1> E2 ## E2 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,2,2,2> E2 ## E2 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,2,2,3> E2 ## E2 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,2,3,0> E2 ## E2 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,2,3,1> E2 ## E2 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,2,3,2> E2 ## E2 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,2,3,3> E2 ## E2 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,3,0,0> E2 ## E3 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,3,0,1> E2 ## E3 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,3,0,2> E2 ## E3 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,3,0,3> E2 ## E3 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,3,1,0> E2 ## E3 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,3,1,1> E2 ## E3 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,3,1,2> E2 ## E3 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,3,1,3> E2 ## E3 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,3,2,0> E2 ## E3 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,3,2,1> E2 ## E3 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,3,2,2> E2 ## E3 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,3,2,3> E2 ## E3 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 2,3,3,0> E2 ## E3 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 2,3,3,1> E2 ## E3 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 2,3,3,2> E2 ## E3 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 2,3,3,3> E2 ## E3 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,0,0,0> E3 ## E0 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,0,0,1> E3 ## E0 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,0,0,2> E3 ## E0 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,0,0,3> E3 ## E0 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,0,1,0> E3 ## E0 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,0,1,1> E3 ## E0 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,0,1,2> E3 ## E0 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,0,1,3> E3 ## E0 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,0,2,0> E3 ## E0 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,0,2,1> E3 ## E0 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,0,2,2> E3 ## E0 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,0,2,3> E3 ## E0 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,0,3,0> E3 ## E0 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,0,3,1> E3 ## E0 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,0,3,2> E3 ## E0 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,0,3,3> E3 ## E0 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,1,0,0> E3 ## E1 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,1,0,1> E3 ## E1 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,1,0,2> E3 ## E1 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,1,0,3> E3 ## E1 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,1,1,0> E3 ## E1 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,1,1,1> E3 ## E1 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,1,1,2> E3 ## E1 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,1,1,3> E3 ## E1 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,1,2,0> E3 ## E1 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,1,2,1> E3 ## E1 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,1,2,2> E3 ## E1 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,1,2,3> E3 ## E1 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,1,3,0> E3 ## E1 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,1,3,1> E3 ## E1 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,1,3,2> E3 ## E1 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,1,3,3> E3 ## E1 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,2,0,0> E3 ## E2 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,2,0,1> E3 ## E2 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,2,0,2> E3 ## E2 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,2,0,3> E3 ## E2 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,2,1,0> E3 ## E2 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,2,1,1> E3 ## E2 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,2,1,2> E3 ## E2 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,2,1,3> E3 ## E2 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,2,2,0> E3 ## E2 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,2,2,1> E3 ## E2 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,2,2,2> E3 ## E2 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,2,2,3> E3 ## E2 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,2,3,0> E3 ## E2 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,2,3,1> E3 ## E2 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,2,3,2> E3 ## E2 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,2,3,3> E3 ## E2 ## E3 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,3,0,0> E3 ## E3 ## E0 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,3,0,1> E3 ## E3 ## E0 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,3,0,2> E3 ## E3 ## E0 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,3,0,3> E3 ## E3 ## E0 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,3,1,0> E3 ## E3 ## E1 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,3,1,1> E3 ## E3 ## E1 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,3,1,2> E3 ## E3 ## E1 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,3,1,3> E3 ## E3 ## E1 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,3,2,0> E3 ## E3 ## E2 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,3,2,1> E3 ## E3 ## E2 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,3,2,2> E3 ## E3 ## E2 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,3,2,3> E3 ## E3 ## E2 ## E3; \
|
||||
detail::_swizzle<4, T, Q, 3,3,3,0> E3 ## E3 ## E3 ## E0; \
|
||||
detail::_swizzle<4, T, Q, 3,3,3,1> E3 ## E3 ## E3 ## E1; \
|
||||
detail::_swizzle<4, T, Q, 3,3,3,2> E3 ## E3 ## E3 ## E2; \
|
||||
detail::_swizzle<4, T, Q, 3,3,3,3> E3 ## E3 ## E3 ## E3;
|
||||
|
|
|
@ -40,7 +40,6 @@ namespace glm
|
|||
};
|
||||
|
||||
// abs
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR int abs(int x)
|
||||
{
|
||||
int const y = x >> (sizeof(int) * 8 - 1);
|
||||
|
|
|
@ -45,14 +45,12 @@ namespace detail
|
|||
}//namespace detail
|
||||
|
||||
# if GLM_ARCH & GLM_ARCH_AVX_BIT
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER int bitCount(uint x)
|
||||
{
|
||||
return _mm_popcnt_u32(x);
|
||||
}
|
||||
|
||||
# if(GLM_MODEL == GLM_MODEL_64)
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER int bitCount(detail::uint64 x)
|
||||
{
|
||||
return static_cast<int>(_mm_popcnt_u64(x));
|
||||
|
|
54
glm/detail/mat2xR_common_operators.hpp
Normal file
54
glm/detail/mat2xR_common_operators.hpp
Normal file
|
@ -0,0 +1,54 @@
|
|||
|
||||
#pragma once
|
||||
#include "qualifier.hpp"
|
||||
#include "mat_common_operators.hpp"
|
||||
namespace glm {
|
||||
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R,T,Q> operator-(mat<2,R,T,Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R,T,Q>& operator++(mat<2,R,T,Q>& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R,T,Q>& operator--(mat<2,R,T,Q>& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<2,R,T,Q> const& m1, mat<2,R,T,Q> const& m2);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R,T,Q> operator+(mat<2,R,T,Q> const& m1, mat<2,R,T,Q> const& m2);
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R,T,Q>& operator+=(mat<2,R,T,Q>& m1, mat<2,R,U,Q> const& m2);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R,T,Q> operator-(mat<2,R,T,Q> const& m1, mat<2,R,T,Q> const& m2);
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R,T,Q>& operator-=(mat<2,R,T,Q>& m1, mat<2,R,U,Q> const& m2);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R, T, Q> operator+(mat<2,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R, T, Q> operator+(T scalar,mat<2,R, T, Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R, T, Q> operator-(mat<2,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R, T, Q> operator-(T scalar,mat<2,R, T, Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R, T, Q> operator*(mat<2,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R, T, Q> operator*(T scalar,mat<2,R, T, Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R, T, Q> operator/(mat<2,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2,R, T, Q> operator/(T scalar,mat<2,R, T, Q> const& m);
|
||||
|
||||
}
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
#include "mat2xR_common_operators.inl"
|
||||
#endif
|
||||
|
112
glm/detail/mat2xR_common_operators.inl
Normal file
112
glm/detail/mat2xR_common_operators.inl
Normal file
|
@ -0,0 +1,112 @@
|
|||
|
||||
namespace glm {
|
||||
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q> operator-(mat<2,R,T,Q> const& m) {
|
||||
return mat<2,R,T,Q>(-m[0],-m[1]);
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q>& operator++(mat<2,R,T,Q>& m) {
|
||||
++m[0];
|
||||
++m[1];
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q>& operator--(mat<2,R,T,Q>& m) {
|
||||
--m[0];
|
||||
--m[1];
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<2,R,T,Q> const& m1, mat<2,R,T,Q> const& m2) {
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]);
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q> operator+(mat<2,R,T,Q> const& m1, mat<2,R,T,Q> const& m2) {
|
||||
return mat<2,R,T,Q>(m1[0] + m2[0],m1[1] + m2[1]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q>& operator+=(mat<2,R,T,Q>& m1, mat<2,R,U,Q> const& m2) {
|
||||
m1[0] += m2[0];
|
||||
m1[1] += m2[1];
|
||||
return m1;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q> operator-(mat<2,R,T,Q> const& m1, mat<2,R,T,Q> const& m2) {
|
||||
return mat<2,R,T,Q>(m1[0] - m2[0],m1[1] - m2[1]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q>& operator-=(mat<2,R,T,Q>& m1, mat<2,R,U,Q> const& m2) {
|
||||
m1[0] -= m2[0];
|
||||
m1[1] -= m2[1];
|
||||
return m1;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R, T, Q> operator+(mat<2,R, T, Q> const& m, T scalar) {
|
||||
return mat<2,R,T,Q>(m[0] + scalar,m[1] + scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R, T, Q> operator+(T scalar,mat<2,R, T, Q> const& m) {
|
||||
return mat<2,R,T,Q>(scalar + m[0],scalar + m[1]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q>& operator+=(mat<2,R,T,Q>& m, U scalar) {
|
||||
m[0] += scalar;
|
||||
m[1] += scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R, T, Q> operator-(mat<2,R, T, Q> const& m, T scalar) {
|
||||
return mat<2,R,T,Q>(m[0] - scalar,m[1] - scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R, T, Q> operator-(T scalar,mat<2,R, T, Q> const& m) {
|
||||
return mat<2,R,T,Q>(scalar - m[0],scalar - m[1]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q>& operator-=(mat<2,R,T,Q>& m, U scalar) {
|
||||
m[0] -= scalar;
|
||||
m[1] -= scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R, T, Q> operator*(mat<2,R, T, Q> const& m, T scalar) {
|
||||
return mat<2,R,T,Q>(m[0] * scalar,m[1] * scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R, T, Q> operator*(T scalar,mat<2,R, T, Q> const& m) {
|
||||
return mat<2,R,T,Q>(scalar * m[0],scalar * m[1]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q>& operator*=(mat<2,R,T,Q>& m, U scalar) {
|
||||
m[0] *= scalar;
|
||||
m[1] *= scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R, T, Q> operator/(mat<2,R, T, Q> const& m, T scalar) {
|
||||
return mat<2,R,T,Q>(m[0] / scalar,m[1] / scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R, T, Q> operator/(T scalar,mat<2,R, T, Q> const& m) {
|
||||
return mat<2,R,T,Q>(scalar / m[0],scalar / m[1]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2,R,T,Q>& operator/=(mat<2,R,T,Q>& m, U scalar) {
|
||||
m[0] /= scalar;
|
||||
m[1] /= scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
}
|
||||
|
54
glm/detail/mat3xR_common_operators.hpp
Normal file
54
glm/detail/mat3xR_common_operators.hpp
Normal file
|
@ -0,0 +1,54 @@
|
|||
|
||||
#pragma once
|
||||
#include "qualifier.hpp"
|
||||
#include "mat_common_operators.hpp"
|
||||
namespace glm {
|
||||
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R,T,Q> operator-(mat<3,R,T,Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R,T,Q>& operator++(mat<3,R,T,Q>& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R,T,Q>& operator--(mat<3,R,T,Q>& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3,R,T,Q> const& m1, mat<3,R,T,Q> const& m2);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R,T,Q> operator+(mat<3,R,T,Q> const& m1, mat<3,R,T,Q> const& m2);
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R,T,Q>& operator+=(mat<3,R,T,Q>& m1, mat<3,R,U,Q> const& m2);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R,T,Q> operator-(mat<3,R,T,Q> const& m1, mat<3,R,T,Q> const& m2);
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R,T,Q>& operator-=(mat<3,R,T,Q>& m1, mat<3,R,U,Q> const& m2);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R, T, Q> operator+(mat<3,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R, T, Q> operator+(T scalar,mat<3,R, T, Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R, T, Q> operator-(mat<3,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R, T, Q> operator-(T scalar,mat<3,R, T, Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R, T, Q> operator*(mat<3,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R, T, Q> operator*(T scalar,mat<3,R, T, Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R, T, Q> operator/(mat<3,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3,R, T, Q> operator/(T scalar,mat<3,R, T, Q> const& m);
|
||||
|
||||
}
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
#include "mat3xR_common_operators.inl"
|
||||
#endif
|
||||
|
120
glm/detail/mat3xR_common_operators.inl
Normal file
120
glm/detail/mat3xR_common_operators.inl
Normal file
|
@ -0,0 +1,120 @@
|
|||
|
||||
namespace glm {
|
||||
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q> operator-(mat<3,R,T,Q> const& m) {
|
||||
return mat<3,R,T,Q>(-m[0],-m[1],-m[2]);
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q>& operator++(mat<3,R,T,Q>& m) {
|
||||
++m[0];
|
||||
++m[1];
|
||||
++m[2];
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q>& operator--(mat<3,R,T,Q>& m) {
|
||||
--m[0];
|
||||
--m[1];
|
||||
--m[2];
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3,R,T,Q> const& m1, mat<3,R,T,Q> const& m2) {
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q> operator+(mat<3,R,T,Q> const& m1, mat<3,R,T,Q> const& m2) {
|
||||
return mat<3,R,T,Q>(m1[0] + m2[0],m1[1] + m2[1],m1[2] + m2[2]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q>& operator+=(mat<3,R,T,Q>& m1, mat<3,R,U,Q> const& m2) {
|
||||
m1[0] += m2[0];
|
||||
m1[1] += m2[1];
|
||||
m1[2] += m2[2];
|
||||
return m1;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q> operator-(mat<3,R,T,Q> const& m1, mat<3,R,T,Q> const& m2) {
|
||||
return mat<3,R,T,Q>(m1[0] - m2[0],m1[1] - m2[1],m1[2] - m2[2]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q>& operator-=(mat<3,R,T,Q>& m1, mat<3,R,U,Q> const& m2) {
|
||||
m1[0] -= m2[0];
|
||||
m1[1] -= m2[1];
|
||||
m1[2] -= m2[2];
|
||||
return m1;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R, T, Q> operator+(mat<3,R, T, Q> const& m, T scalar) {
|
||||
return mat<3,R,T,Q>(m[0] + scalar,m[1] + scalar,m[2] + scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R, T, Q> operator+(T scalar,mat<3,R, T, Q> const& m) {
|
||||
return mat<3,R,T,Q>(scalar + m[0],scalar + m[1],scalar + m[2]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q>& operator+=(mat<3,R,T,Q>& m, U scalar) {
|
||||
m[0] += scalar;
|
||||
m[1] += scalar;
|
||||
m[2] += scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R, T, Q> operator-(mat<3,R, T, Q> const& m, T scalar) {
|
||||
return mat<3,R,T,Q>(m[0] - scalar,m[1] - scalar,m[2] - scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R, T, Q> operator-(T scalar,mat<3,R, T, Q> const& m) {
|
||||
return mat<3,R,T,Q>(scalar - m[0],scalar - m[1],scalar - m[2]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q>& operator-=(mat<3,R,T,Q>& m, U scalar) {
|
||||
m[0] -= scalar;
|
||||
m[1] -= scalar;
|
||||
m[2] -= scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R, T, Q> operator*(mat<3,R, T, Q> const& m, T scalar) {
|
||||
return mat<3,R,T,Q>(m[0] * scalar,m[1] * scalar,m[2] * scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R, T, Q> operator*(T scalar,mat<3,R, T, Q> const& m) {
|
||||
return mat<3,R,T,Q>(scalar * m[0],scalar * m[1],scalar * m[2]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q>& operator*=(mat<3,R,T,Q>& m, U scalar) {
|
||||
m[0] *= scalar;
|
||||
m[1] *= scalar;
|
||||
m[2] *= scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R, T, Q> operator/(mat<3,R, T, Q> const& m, T scalar) {
|
||||
return mat<3,R,T,Q>(m[0] / scalar,m[1] / scalar,m[2] / scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R, T, Q> operator/(T scalar,mat<3,R, T, Q> const& m) {
|
||||
return mat<3,R,T,Q>(scalar / m[0],scalar / m[1],scalar / m[2]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3,R,T,Q>& operator/=(mat<3,R,T,Q>& m, U scalar) {
|
||||
m[0] /= scalar;
|
||||
m[1] /= scalar;
|
||||
m[2] /= scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
}
|
||||
|
54
glm/detail/mat4xR_common_operators.hpp
Normal file
54
glm/detail/mat4xR_common_operators.hpp
Normal file
|
@ -0,0 +1,54 @@
|
|||
|
||||
#pragma once
|
||||
#include "qualifier.hpp"
|
||||
#include "mat_common_operators.hpp"
|
||||
namespace glm {
|
||||
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R,T,Q> operator-(mat<4,R,T,Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R,T,Q>& operator++(mat<4,R,T,Q>& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R,T,Q>& operator--(mat<4,R,T,Q>& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<4,R,T,Q> const& m1, mat<4,R,T,Q> const& m2);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R,T,Q> operator+(mat<4,R,T,Q> const& m1, mat<4,R,T,Q> const& m2);
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R,T,Q>& operator+=(mat<4,R,T,Q>& m1, mat<4,R,U,Q> const& m2);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R,T,Q> operator-(mat<4,R,T,Q> const& m1, mat<4,R,T,Q> const& m2);
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R,T,Q>& operator-=(mat<4,R,T,Q>& m1, mat<4,R,U,Q> const& m2);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R, T, Q> operator+(mat<4,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R, T, Q> operator+(T scalar,mat<4,R, T, Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R, T, Q> operator-(mat<4,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R, T, Q> operator-(T scalar,mat<4,R, T, Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R, T, Q> operator*(mat<4,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R, T, Q> operator*(T scalar,mat<4,R, T, Q> const& m);
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R, T, Q> operator/(mat<4,R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4,R, T, Q> operator/(T scalar,mat<4,R, T, Q> const& m);
|
||||
|
||||
}
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
#include "mat4xR_common_operators.inl"
|
||||
#endif
|
||||
|
128
glm/detail/mat4xR_common_operators.inl
Normal file
128
glm/detail/mat4xR_common_operators.inl
Normal file
|
@ -0,0 +1,128 @@
|
|||
|
||||
namespace glm {
|
||||
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q> operator-(mat<4,R,T,Q> const& m) {
|
||||
return mat<4,R,T,Q>(-m[0],-m[1],-m[2],-m[3]);
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q>& operator++(mat<4,R,T,Q>& m) {
|
||||
++m[0];
|
||||
++m[1];
|
||||
++m[2];
|
||||
++m[3];
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q>& operator--(mat<4,R,T,Q>& m) {
|
||||
--m[0];
|
||||
--m[1];
|
||||
--m[2];
|
||||
--m[3];
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<4,R,T,Q> const& m1, mat<4,R,T,Q> const& m2) {
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q> operator+(mat<4,R,T,Q> const& m1, mat<4,R,T,Q> const& m2) {
|
||||
return mat<4,R,T,Q>(m1[0] + m2[0],m1[1] + m2[1],m1[2] + m2[2],m1[3] + m2[3]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q>& operator+=(mat<4,R,T,Q>& m1, mat<4,R,U,Q> const& m2) {
|
||||
m1[0] += m2[0];
|
||||
m1[1] += m2[1];
|
||||
m1[2] += m2[2];
|
||||
m1[3] += m2[3];
|
||||
return m1;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q> operator-(mat<4,R,T,Q> const& m1, mat<4,R,T,Q> const& m2) {
|
||||
return mat<4,R,T,Q>(m1[0] - m2[0],m1[1] - m2[1],m1[2] - m2[2],m1[3] - m2[3]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q>& operator-=(mat<4,R,T,Q>& m1, mat<4,R,U,Q> const& m2) {
|
||||
m1[0] -= m2[0];
|
||||
m1[1] -= m2[1];
|
||||
m1[2] -= m2[2];
|
||||
m1[3] -= m2[3];
|
||||
return m1;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R, T, Q> operator+(mat<4,R, T, Q> const& m, T scalar) {
|
||||
return mat<4,R,T,Q>(m[0] + scalar,m[1] + scalar,m[2] + scalar,m[3] + scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R, T, Q> operator+(T scalar,mat<4,R, T, Q> const& m) {
|
||||
return mat<4,R,T,Q>(scalar + m[0],scalar + m[1],scalar + m[2],scalar + m[3]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q>& operator+=(mat<4,R,T,Q>& m, U scalar) {
|
||||
m[0] += scalar;
|
||||
m[1] += scalar;
|
||||
m[2] += scalar;
|
||||
m[3] += scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R, T, Q> operator-(mat<4,R, T, Q> const& m, T scalar) {
|
||||
return mat<4,R,T,Q>(m[0] - scalar,m[1] - scalar,m[2] - scalar,m[3] - scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R, T, Q> operator-(T scalar,mat<4,R, T, Q> const& m) {
|
||||
return mat<4,R,T,Q>(scalar - m[0],scalar - m[1],scalar - m[2],scalar - m[3]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q>& operator-=(mat<4,R,T,Q>& m, U scalar) {
|
||||
m[0] -= scalar;
|
||||
m[1] -= scalar;
|
||||
m[2] -= scalar;
|
||||
m[3] -= scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R, T, Q> operator*(mat<4,R, T, Q> const& m, T scalar) {
|
||||
return mat<4,R,T,Q>(m[0] * scalar,m[1] * scalar,m[2] * scalar,m[3] * scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R, T, Q> operator*(T scalar,mat<4,R, T, Q> const& m) {
|
||||
return mat<4,R,T,Q>(scalar * m[0],scalar * m[1],scalar * m[2],scalar * m[3]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q>& operator*=(mat<4,R,T,Q>& m, U scalar) {
|
||||
m[0] *= scalar;
|
||||
m[1] *= scalar;
|
||||
m[2] *= scalar;
|
||||
m[3] *= scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R, T, Q> operator/(mat<4,R, T, Q> const& m, T scalar) {
|
||||
return mat<4,R,T,Q>(m[0] / scalar,m[1] / scalar,m[2] / scalar,m[3] / scalar);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R, T, Q> operator/(T scalar,mat<4,R, T, Q> const& m) {
|
||||
return mat<4,R,T,Q>(scalar / m[0],scalar / m[1],scalar / m[2],scalar / m[3]);
|
||||
}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4,R,T,Q>& operator/=(mat<4,R,T,Q>& m, U scalar) {
|
||||
m[0] /= scalar;
|
||||
m[1] /= scalar;
|
||||
m[2] /= scalar;
|
||||
m[3] /= scalar;
|
||||
return m;
|
||||
}
|
||||
|
||||
}
|
||||
|
29
glm/detail/mat_common_operators.hpp
Normal file
29
glm/detail/mat_common_operators.hpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include "qualifier.hpp"
|
||||
|
||||
namespace glm {
|
||||
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<C, R, T, Q> operator++(mat<C, R, T, Q>& m, int);
|
||||
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<C, R, T, Q> operator--(mat<C, R, T, Q>& m, int);
|
||||
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<C, R, T, Q> operator+(mat<C, R, T, Q> const& m);
|
||||
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<C, R, T, Q> const& m1, mat<C, R, T, Q> const& m2);
|
||||
|
||||
template<length_t D,typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<D, D, T, Q>::col_type operator/(mat<D, D, T, Q> const& m, typename mat<D, D, T, Q>::row_type const& v);
|
||||
|
||||
template<length_t D,typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<D, D, T, Q>::row_type operator/(typename mat<D, D, T, Q>::col_type const& v, mat<D, D, T, Q> const& m);
|
||||
|
||||
}
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
#include "mat_common_operators.inl"
|
||||
#endif
|
39
glm/detail/mat_common_operators.inl
Normal file
39
glm/detail/mat_common_operators.inl
Normal file
|
@ -0,0 +1,39 @@
|
|||
namespace glm {
|
||||
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<C, R, T, Q> operator++(mat<C, R, T, Q>& m, int) {
|
||||
mat<C, R, T, Q> Result(m);
|
||||
++m;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<C, R, T, Q> operator--(mat<C, R, T, Q>& m, int) {
|
||||
mat<C, R, T, Q> Result(m);
|
||||
--m;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<C, R, T, Q> operator+(mat<C, R, T, Q> const& m) {
|
||||
return m;
|
||||
}
|
||||
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<C, R, T, Q> const& m1, mat<C, R, T, Q> const& m2) {
|
||||
return !(m1 == m2);
|
||||
}
|
||||
|
||||
template<length_t D,typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<D, D, T, Q>::col_type operator/(mat<D, D, T, Q> const& m, typename mat<D, D, T, Q>::row_type const& v)
|
||||
{
|
||||
return inverse(m) * v;
|
||||
}
|
||||
|
||||
template<length_t D,typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<D, D, T, Q>::row_type operator/(typename mat<D, D, T, Q>::col_type const& v, mat<D, D, T, Q> const& m)
|
||||
{
|
||||
return v * inverse(m);
|
||||
}
|
||||
|
||||
}
|
|
@ -12,10 +12,10 @@ namespace glm
|
|||
packed_lowp, ///< Typed data is tightly packed in memory and operations are executed with low precision in term of ULPs to maximize performance
|
||||
|
||||
# if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
|
||||
aligned_highp, ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs
|
||||
aligned_mediump, ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs for higher performance
|
||||
aligned_lowp, // ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs to maximize performance
|
||||
aligned = aligned_highp, ///< By default aligned qualifier is also high precision
|
||||
aligned_highp, ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs
|
||||
aligned_mediump, ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs for higher performance
|
||||
aligned_lowp, // ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs to maximize performance
|
||||
aligned = aligned_highp, ///< By default aligned qualifier is also high precision
|
||||
# endif
|
||||
|
||||
highp = packed_highp, ///< By default highp qualifier is also packed
|
||||
|
@ -24,9 +24,9 @@ namespace glm
|
|||
packed = packed_highp, ///< By default packed qualifier is also high precision
|
||||
|
||||
# if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE && defined(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES)
|
||||
defaultp = aligned_highp
|
||||
defaultp = aligned_highp
|
||||
# else
|
||||
defaultp = highp
|
||||
defaultp = highp
|
||||
# endif
|
||||
};
|
||||
|
||||
|
@ -37,259 +37,249 @@ namespace glm
|
|||
template<typename T, qualifier Q = defaultp> struct qua;
|
||||
|
||||
# if GLM_HAS_TEMPLATE_ALIASES
|
||||
template <typename T, qualifier Q = defaultp> using tvec1 = vec<1, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tvec2 = vec<2, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tvec3 = vec<3, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tvec4 = vec<4, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat2x2 = mat<2, 2, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat2x3 = mat<2, 3, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat2x4 = mat<2, 4, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat3x2 = mat<3, 2, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat3x3 = mat<3, 3, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat3x4 = mat<3, 4, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat4x2 = mat<4, 2, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat4x3 = mat<4, 3, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat4x4 = mat<4, 4, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tquat = qua<T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tvec1 = vec<1, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tvec2 = vec<2, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tvec3 = vec<3, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tvec4 = vec<4, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat2x2 = mat<2, 2, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat2x3 = mat<2, 3, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat2x4 = mat<2, 4, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat3x2 = mat<3, 2, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat3x3 = mat<3, 3, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat3x4 = mat<3, 4, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat4x2 = mat<4, 2, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat4x3 = mat<4, 3, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tmat4x4 = mat<4, 4, T, Q>;
|
||||
template <typename T, qualifier Q = defaultp> using tquat = qua<T, Q>;
|
||||
# endif
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template<glm::qualifier P>
|
||||
struct is_aligned
|
||||
namespace detail
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
# if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
|
||||
template<>
|
||||
struct is_aligned<glm::aligned_lowp>
|
||||
template<glm::qualifier P>
|
||||
struct is_aligned
|
||||
{
|
||||
static const bool value = true;
|
||||
enum {
|
||||
#if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
|
||||
value = P == glm::aligned_mediump || P == glm::aligned_lowp || P == glm::aligned_highp
|
||||
#else
|
||||
value = false
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_aligned<glm::aligned_mediump>
|
||||
template<length_t L, typename T, bool is_aligned>
|
||||
struct storage
|
||||
{
|
||||
static const bool value = true;
|
||||
struct type {
|
||||
T data[L];
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_aligned<glm::aligned_highp>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
# endif
|
||||
|
||||
template<length_t L, typename T, bool is_aligned>
|
||||
struct storage
|
||||
{
|
||||
typedef struct type {
|
||||
T data[L];
|
||||
} type;
|
||||
};
|
||||
|
||||
# if GLM_HAS_ALIGNOF
|
||||
template<length_t L, typename T>
|
||||
struct storage<L, T, true>
|
||||
{
|
||||
typedef struct alignas(L * sizeof(T)) type {
|
||||
struct alignas(L * sizeof(T)) type {
|
||||
T data[L];
|
||||
} type;
|
||||
};
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct storage<3, T, true>
|
||||
{
|
||||
typedef struct alignas(4 * sizeof(T)) type {
|
||||
struct alignas(4 * sizeof(T)) type {
|
||||
T data[4];
|
||||
} type;
|
||||
};
|
||||
};
|
||||
# endif
|
||||
|
||||
# if GLM_ARCH & GLM_ARCH_SSE2_BIT
|
||||
template<>
|
||||
struct storage<4, float, true>
|
||||
{
|
||||
typedef glm_f32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<4, int, true>
|
||||
{
|
||||
typedef glm_i32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<4, unsigned int, true>
|
||||
{
|
||||
typedef glm_u32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<3, float, true>
|
||||
{
|
||||
typedef glm_f32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<3, int, true>
|
||||
{
|
||||
typedef glm_i32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<3, unsigned int, true>
|
||||
{
|
||||
typedef glm_i32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<2, double, true>
|
||||
{
|
||||
typedef glm_f64vec2 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<2, detail::int64, true>
|
||||
{
|
||||
typedef glm_i64vec2 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<2, detail::uint64, true>
|
||||
{
|
||||
typedef glm_u64vec2 type;
|
||||
};
|
||||
|
||||
|
||||
template<>
|
||||
struct storage<3, detail::uint64, true>
|
||||
{
|
||||
typedef glm_u64vec2 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<4, double, true>
|
||||
{
|
||||
# if (GLM_ARCH & GLM_ARCH_AVX_BIT)
|
||||
typedef glm_f64vec4 type;
|
||||
# else
|
||||
struct type
|
||||
template<>
|
||||
struct storage<4, float, true>
|
||||
{
|
||||
glm_f64vec2 data[2];
|
||||
GLM_CONSTEXPR glm_f64vec2 getv(int i) const {
|
||||
return data[i];
|
||||
}
|
||||
GLM_CONSTEXPR void setv(int i, const glm_f64vec2& v) {
|
||||
data[i] = v;
|
||||
}
|
||||
typedef glm_f32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<4, int, true>
|
||||
{
|
||||
typedef glm_i32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<4, unsigned int, true>
|
||||
{
|
||||
typedef glm_u32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<3, float, true>
|
||||
{
|
||||
typedef glm_f32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<3, int, true>
|
||||
{
|
||||
typedef glm_i32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<3, unsigned int, true>
|
||||
{
|
||||
typedef glm_i32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<2, double, true>
|
||||
{
|
||||
typedef glm_f64vec2 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<2, detail::int64, true>
|
||||
{
|
||||
typedef glm_i64vec2 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<2, detail::uint64, true>
|
||||
{
|
||||
typedef glm_u64vec2 type;
|
||||
};
|
||||
|
||||
|
||||
template<>
|
||||
struct storage<3, detail::uint64, true>
|
||||
{
|
||||
typedef glm_u64vec2 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<4, double, true>
|
||||
{
|
||||
# if (GLM_ARCH & GLM_ARCH_AVX_BIT)
|
||||
typedef glm_f64vec4 type;
|
||||
# else
|
||||
struct type
|
||||
{
|
||||
glm_f64vec2 data[2];
|
||||
GLM_CONSTEXPR glm_f64vec2 getv(int i) const {
|
||||
return data[i];
|
||||
}
|
||||
GLM_CONSTEXPR void setv(int i, const glm_f64vec2& v) {
|
||||
data[i] = v;
|
||||
}
|
||||
};
|
||||
# endif
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template<>
|
||||
struct storage<3, double, true> : public storage<4, double, true>
|
||||
{};
|
||||
|
||||
template<>
|
||||
struct storage<3, double, true> : public storage<4, double, true>
|
||||
{
|
||||
};
|
||||
|
||||
# endif
|
||||
|
||||
# if (GLM_ARCH & GLM_ARCH_AVX2_BIT)
|
||||
template<>
|
||||
struct storage<4, detail::int64, true>
|
||||
{
|
||||
typedef glm_i64vec4 type;
|
||||
};
|
||||
template<>
|
||||
struct storage<4, detail::int64, true>
|
||||
{
|
||||
typedef glm_i64vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<4, detail::uint64, true>
|
||||
{
|
||||
typedef glm_u64vec4 type;
|
||||
};
|
||||
template<>
|
||||
struct storage<4, detail::uint64, true>
|
||||
{
|
||||
typedef glm_u64vec4 type;
|
||||
};
|
||||
# endif
|
||||
|
||||
# if GLM_ARCH & GLM_ARCH_NEON_BIT
|
||||
template<>
|
||||
struct storage<4, float, true>
|
||||
{
|
||||
typedef glm_f32vec4 type;
|
||||
};
|
||||
template<>
|
||||
struct storage<4, float, true>
|
||||
{
|
||||
typedef glm_f32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<3, float, true> : public storage<4, float, true>
|
||||
{};
|
||||
template<>
|
||||
struct storage<3, float, true> : public storage<4, float, true>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<4, int, true>
|
||||
{
|
||||
typedef glm_i32vec4 type;
|
||||
};
|
||||
template<>
|
||||
struct storage<4, int, true>
|
||||
{
|
||||
typedef glm_i32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<3, int, true> : public storage<4, int, true>
|
||||
{};
|
||||
template<>
|
||||
struct storage<3, int, true> : public storage<4, int, true>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<4, unsigned int, true>
|
||||
{
|
||||
typedef glm_u32vec4 type;
|
||||
};
|
||||
template<>
|
||||
struct storage<4, unsigned int, true>
|
||||
{
|
||||
typedef glm_u32vec4 type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct storage<3, unsigned int, true> : public storage<4, unsigned int, true>
|
||||
{};
|
||||
template<>
|
||||
struct storage<3, unsigned int, true> : public storage<4, unsigned int, true>
|
||||
{
|
||||
};
|
||||
|
||||
# if GLM_HAS_ALIGNOF
|
||||
template<>
|
||||
struct storage<3, double, true>
|
||||
{
|
||||
typedef struct alignas(4 * sizeof(double)) type {
|
||||
double data[4];
|
||||
} type;
|
||||
};
|
||||
template<>
|
||||
struct storage<3, double, true>
|
||||
{
|
||||
struct alignas(4 * sizeof(double)) type {
|
||||
double data[4];
|
||||
};
|
||||
};
|
||||
# endif//GLM_HAS_ALIGNOF
|
||||
|
||||
# endif
|
||||
|
||||
enum genTypeEnum
|
||||
{
|
||||
GENTYPE_VEC,
|
||||
GENTYPE_MAT,
|
||||
GENTYPE_QUAT
|
||||
};
|
||||
|
||||
template <typename genType>
|
||||
struct genTypeTrait
|
||||
{};
|
||||
|
||||
template <length_t C, length_t R, typename T>
|
||||
struct genTypeTrait<mat<C, R, T> >
|
||||
{
|
||||
static const genTypeEnum GENTYPE = GENTYPE_MAT;
|
||||
};
|
||||
|
||||
template<typename genType, genTypeEnum type>
|
||||
struct init_gentype
|
||||
{
|
||||
};
|
||||
|
||||
template<typename genType>
|
||||
struct init_gentype<genType, GENTYPE_QUAT>
|
||||
{
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genType identity()
|
||||
enum genTypeEnum
|
||||
{
|
||||
return genType(1, 0, 0, 0);
|
||||
}
|
||||
};
|
||||
GENTYPE_VEC,
|
||||
GENTYPE_MAT,
|
||||
GENTYPE_QUAT
|
||||
};
|
||||
|
||||
template<typename genType>
|
||||
struct init_gentype<genType, GENTYPE_MAT>
|
||||
{
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genType identity()
|
||||
template <typename genType>
|
||||
struct genTypeTrait
|
||||
{
|
||||
return genType(1);
|
||||
}
|
||||
};
|
||||
}//namespace detail
|
||||
};
|
||||
|
||||
template <length_t C, length_t R, typename T>
|
||||
struct genTypeTrait<mat<C, R, T> >
|
||||
{
|
||||
static const genTypeEnum GENTYPE = GENTYPE_MAT;
|
||||
};
|
||||
|
||||
template<typename genType, genTypeEnum type>
|
||||
struct init_gentype
|
||||
{
|
||||
};
|
||||
|
||||
template<typename genType>
|
||||
struct init_gentype<genType, GENTYPE_QUAT>
|
||||
{
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genType identity()
|
||||
{
|
||||
return genType(1, 0, 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename genType>
|
||||
struct init_gentype<genType, GENTYPE_MAT>
|
||||
{
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genType identity()
|
||||
{
|
||||
return genType(1);
|
||||
}
|
||||
};
|
||||
}//namespace detail
|
||||
}//namespace glm
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "mat2xR_common_operators.hpp"
|
||||
#include "type_vec2.hpp"
|
||||
#include <limits>
|
||||
#include <cstddef>
|
||||
|
@ -27,7 +28,7 @@ namespace glm
|
|||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
|
||||
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type& operator[](length_type i) GLM_NOEXCEPT;
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||
|
||||
// -- Constructors --
|
||||
|
@ -70,69 +71,16 @@ namespace glm
|
|||
GLM_CTOR_DECL GLM_EXPLICIT mat(mat<3, 4, T, Q> const& x);
|
||||
GLM_CTOR_DECL GLM_EXPLICIT mat(mat<4, 3, T, Q> const& x);
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator=(mat<2, 2, U, Q> const& m);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat& operator=(mat<2, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator+=(U s);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat& operator*=(mat<2, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator+=(mat<2, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-=(mat<2, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator*=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator*=(mat<2, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator/=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator/=(mat<2, 2, U, Q> const& m);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator++ ();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-- ();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator--(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat& operator/=(mat<2, 2, U, Q> const& m);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator+(T scalar, mat<2, 2, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator-(T scalar, mat<2, 2, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator*(T scalar, mat<2, 2, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 2, T, Q>::col_type operator*(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v);
|
||||
|
||||
|
@ -148,28 +96,9 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator/(T scalar, mat<2, 2, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 2, T, Q>::col_type operator/(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 2, T, Q>::row_type operator/(typename mat<2, 2, T, Q>::col_type const& v, mat<2, 2, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||
} //namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
|
|
@ -241,51 +241,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator+=(U scalar)
|
||||
{
|
||||
this->value[0] += scalar;
|
||||
this->value[1] += scalar;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator+=(mat<2, 2, U, Q> const& m)
|
||||
{
|
||||
this->value[0] += m[0];
|
||||
this->value[1] += m[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator-=(U scalar)
|
||||
{
|
||||
this->value[0] -= scalar;
|
||||
this->value[1] -= scalar;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator-=(mat<2, 2, U, Q> const& m)
|
||||
{
|
||||
this->value[0] -= m[0];
|
||||
this->value[1] -= m[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator*=(U scalar)
|
||||
{
|
||||
this->value[0] *= scalar;
|
||||
this->value[1] *= scalar;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator*=(mat<2, 2, U, Q> const& m)
|
||||
|
@ -293,15 +248,6 @@ namespace glm
|
|||
return (*this = *this * m);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator/=(U scalar)
|
||||
{
|
||||
this->value[0] /= scalar;
|
||||
this->value[1] /= scalar;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator/=(mat<2, 2, U, Q> const& m)
|
||||
|
@ -309,122 +255,6 @@ namespace glm
|
|||
return *this *= inverse(m);
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator++()
|
||||
{
|
||||
++this->value[0];
|
||||
++this->value[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator--()
|
||||
{
|
||||
--this->value[0];
|
||||
--this->value[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> mat<2, 2, T, Q>::operator++(int)
|
||||
{
|
||||
mat<2, 2, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> mat<2, 2, T, Q>::operator--(int)
|
||||
{
|
||||
mat<2, 2, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m)
|
||||
{
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
-m[0],
|
||||
-m[1]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator+(T scalar, mat<2, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
m1[0] + m2[0],
|
||||
m1[1] + m2[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
m[0] - scalar,
|
||||
m[1] - scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator-(T scalar, mat<2, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
scalar - m[0],
|
||||
scalar - m[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
m1[0] - m2[0],
|
||||
m1[1] - m2[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator*(T scalar, mat<2, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 2, T, Q>::col_type operator*
|
||||
(
|
||||
|
@ -485,34 +315,6 @@ namespace glm
|
|||
m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
m[0] / scalar,
|
||||
m[1] / scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator/(T scalar, mat<2, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 2, T, Q>(
|
||||
scalar / m[0],
|
||||
scalar / m[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 2, T, Q>::col_type operator/(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v)
|
||||
{
|
||||
return inverse(m) * v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 2, T, Q>::row_type operator/(typename mat<2, 2, T, Q>::col_type const& v, mat<2, 2, T, Q> const& m)
|
||||
{
|
||||
return v * inverse(m);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||
{
|
||||
|
@ -520,17 +322,4 @@ namespace glm
|
|||
return m1_copy /= m2;
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]);
|
||||
}
|
||||
} //namespace glm
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "mat2xR_common_operators.hpp"
|
||||
#include "type_vec2.hpp"
|
||||
#include "type_vec3.hpp"
|
||||
#include <limits>
|
||||
|
@ -74,56 +75,11 @@ namespace glm
|
|||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator=(mat<2, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator+=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator+=(mat<2, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-=(mat<2, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator*=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator/=(U s);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator++ ();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-- ();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator--(int);
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat& operator=(mat<2, 3, U, Q> const& m);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator*(T scalar, mat<2, 3, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 3, T, Q>::col_type operator*(mat<2, 3, T, Q> const& m, typename mat<2, 3, T, Q>::row_type const& v);
|
||||
|
||||
|
@ -139,19 +95,6 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator/(mat<2, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator/(T scalar, mat<2, 3, T, Q> const& m);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
|
|
@ -241,160 +241,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator+=(U s)
|
||||
{
|
||||
this->value[0] += s;
|
||||
this->value[1] += s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator+=(mat<2, 3, U, Q> const& m)
|
||||
{
|
||||
this->value[0] += m[0];
|
||||
this->value[1] += m[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator-=(U s)
|
||||
{
|
||||
this->value[0] -= s;
|
||||
this->value[1] -= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator-=(mat<2, 3, U, Q> const& m)
|
||||
{
|
||||
this->value[0] -= m[0];
|
||||
this->value[1] -= m[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator*=(U s)
|
||||
{
|
||||
this->value[0] *= s;
|
||||
this->value[1] *= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator/=(U s)
|
||||
{
|
||||
this->value[0] /= s;
|
||||
this->value[1] /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator++()
|
||||
{
|
||||
++this->value[0];
|
||||
++this->value[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator--()
|
||||
{
|
||||
--this->value[0];
|
||||
--this->value[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> mat<2, 3, T, Q>::operator++(int)
|
||||
{
|
||||
mat<2, 3, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> mat<2, 3, T, Q>::operator--(int)
|
||||
{
|
||||
mat<2, 3, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m)
|
||||
{
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 3, T, Q>(
|
||||
-m[0],
|
||||
-m[1]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 3, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||
{
|
||||
return mat<2, 3, T, Q>(
|
||||
m1[0] + m2[0],
|
||||
m1[1] + m2[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 3, T, Q>(
|
||||
m[0] - scalar,
|
||||
m[1] - scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||
{
|
||||
return mat<2, 3, T, Q>(
|
||||
m1[0] - m2[0],
|
||||
m1[1] - m2[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 3, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator*(T scalar, mat<2, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 3, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 3, T, Q>::col_type operator*
|
||||
(
|
||||
|
@ -463,33 +309,4 @@ namespace glm
|
|||
m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator/(mat<2, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 3, T, Q>(
|
||||
m[0] / scalar,
|
||||
m[1] / scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator/(T scalar, mat<2, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 3, T, Q>(
|
||||
scalar / m[0],
|
||||
scalar / m[1]);
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]);
|
||||
}
|
||||
} //namespace glm
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "mat2xR_common_operators.hpp"
|
||||
#include "type_vec2.hpp"
|
||||
#include "type_vec4.hpp"
|
||||
#include <limits>
|
||||
|
@ -76,56 +77,11 @@ namespace glm
|
|||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator=(mat<2, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator+=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator+=(mat<2, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-=(mat<2, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator*=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator/=(U s);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator++ ();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-- ();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator--(int);
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat& operator=(mat<2, 4, U, Q> const& m);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator*(T scalar, mat<2, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 4, T, Q>::col_type operator*(mat<2, 4, T, Q> const& m, typename mat<2, 4, T, Q>::row_type const& v);
|
||||
|
||||
|
@ -141,19 +97,6 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator/(mat<2, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator/(T scalar, mat<2, 4, T, Q> const& m);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
|
|
@ -243,160 +243,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator+=(U s)
|
||||
{
|
||||
this->value[0] += s;
|
||||
this->value[1] += s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator+=(mat<2, 4, U, Q> const& m)
|
||||
{
|
||||
this->value[0] += m[0];
|
||||
this->value[1] += m[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator-=(U s)
|
||||
{
|
||||
this->value[0] -= s;
|
||||
this->value[1] -= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator-=(mat<2, 4, U, Q> const& m)
|
||||
{
|
||||
this->value[0] -= m[0];
|
||||
this->value[1] -= m[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator*=(U s)
|
||||
{
|
||||
this->value[0] *= s;
|
||||
this->value[1] *= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> & mat<2, 4, T, Q>::operator/=(U s)
|
||||
{
|
||||
this->value[0] /= s;
|
||||
this->value[1] /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator++()
|
||||
{
|
||||
++this->value[0];
|
||||
++this->value[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator--()
|
||||
{
|
||||
--this->value[0];
|
||||
--this->value[1];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> mat<2, 4, T, Q>::operator++(int)
|
||||
{
|
||||
mat<2, 4, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> mat<2, 4, T, Q>::operator--(int)
|
||||
{
|
||||
mat<2, 4, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m)
|
||||
{
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 4, T, Q>(
|
||||
-m[0],
|
||||
-m[1]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 4, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||
{
|
||||
return mat<2, 4, T, Q>(
|
||||
m1[0] + m2[0],
|
||||
m1[1] + m2[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 4, T, Q>(
|
||||
m[0] - scalar,
|
||||
m[1] - scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||
{
|
||||
return mat<2, 4, T, Q>(
|
||||
m1[0] - m2[0],
|
||||
m1[1] - m2[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 4, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator*(T scalar, mat<2, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 4, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 4, T, Q>::col_type operator*(mat<2, 4, T, Q> const& m, typename mat<2, 4, T, Q>::row_type const& v)
|
||||
{
|
||||
|
@ -469,33 +315,4 @@ namespace glm
|
|||
m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator/(mat<2, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<2, 4, T, Q>(
|
||||
m[0] / scalar,
|
||||
m[1] / scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator/(T scalar, mat<2, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<2, 4, T, Q>(
|
||||
scalar / m[0],
|
||||
scalar / m[1]);
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]);
|
||||
}
|
||||
} //namespace glm
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "mat3xR_common_operators.hpp"
|
||||
#include "type_vec2.hpp"
|
||||
#include "type_vec3.hpp"
|
||||
#include <limits>
|
||||
|
@ -81,56 +82,11 @@ namespace glm
|
|||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator=(mat<3, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator+=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator+=(mat<3, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-=(mat<3, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator*=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator/=(U s);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator++ ();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-- ();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator--(int);
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat& operator=(mat<3, 2, U, Q> const& m);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator*(T scalar, mat<3, 2, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 2, T, Q>::col_type operator*(mat<3, 2, T, Q> const& m, typename mat<3, 2, T, Q>::row_type const& v);
|
||||
|
||||
|
@ -145,21 +101,6 @@ namespace glm
|
|||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator/(mat<3, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator/(T scalar, mat<3, 2, T, Q> const& m);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
|
|
@ -261,175 +261,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator+=(U s)
|
||||
{
|
||||
this->value[0] += s;
|
||||
this->value[1] += s;
|
||||
this->value[2] += s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator+=(mat<3, 2, U, Q> const& m)
|
||||
{
|
||||
this->value[0] += m[0];
|
||||
this->value[1] += m[1];
|
||||
this->value[2] += m[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator-=(U s)
|
||||
{
|
||||
this->value[0] -= s;
|
||||
this->value[1] -= s;
|
||||
this->value[2] -= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator-=(mat<3, 2, U, Q> const& m)
|
||||
{
|
||||
this->value[0] -= m[0];
|
||||
this->value[1] -= m[1];
|
||||
this->value[2] -= m[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator*=(U s)
|
||||
{
|
||||
this->value[0] *= s;
|
||||
this->value[1] *= s;
|
||||
this->value[2] *= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> & mat<3, 2, T, Q>::operator/=(U s)
|
||||
{
|
||||
this->value[0] /= s;
|
||||
this->value[1] /= s;
|
||||
this->value[2] /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator++()
|
||||
{
|
||||
++this->value[0];
|
||||
++this->value[1];
|
||||
++this->value[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator--()
|
||||
{
|
||||
--this->value[0];
|
||||
--this->value[1];
|
||||
--this->value[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> mat<3, 2, T, Q>::operator++(int)
|
||||
{
|
||||
mat<3, 2, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> mat<3, 2, T, Q>::operator--(int)
|
||||
{
|
||||
mat<3, 2, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m)
|
||||
{
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 2, T, Q>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 2, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar,
|
||||
m[2] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||
{
|
||||
return mat<3, 2, T, Q>(
|
||||
m1[0] + m2[0],
|
||||
m1[1] + m2[1],
|
||||
m1[2] + m2[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 2, T, Q>(
|
||||
m[0] - scalar,
|
||||
m[1] - scalar,
|
||||
m[2] - scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||
{
|
||||
return mat<3, 2, T, Q>(
|
||||
m1[0] - m2[0],
|
||||
m1[1] - m2[1],
|
||||
m1[2] - m2[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 2, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator*(T scalar, mat<3, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 2, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 2, T, Q>::col_type operator*(mat<3, 2, T, Q> const& m, typename mat<3, 2, T, Q>::row_type const& v)
|
||||
{
|
||||
|
@ -483,35 +314,4 @@ namespace glm
|
|||
m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator/(mat<3, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 2, T, Q>(
|
||||
m[0] / scalar,
|
||||
m[1] / scalar,
|
||||
m[2] / scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator/(T scalar, mat<3, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 2, T, Q>(
|
||||
scalar / m[0],
|
||||
scalar / m[1],
|
||||
scalar / m[2]);
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
|
||||
}
|
||||
} //namespace glm
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "mat3xR_common_operators.hpp"
|
||||
#include "type_vec3.hpp"
|
||||
#include <limits>
|
||||
#include <cstddef>
|
||||
|
@ -80,66 +81,15 @@ namespace glm
|
|||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator=(mat<3, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator+=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator+=(mat<3, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator-=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator-=(mat<3, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator*=(U s);
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat& operator=(mat<3, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator*=(mat<3, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator/=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator/=(mat<3, 3, U, Q> const& m);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator++();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator--();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator--(int);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator+(T scalar, mat<3, 3, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator-(T scalar, mat<3, 3, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator*(T scalar, mat<3, 3, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 3, T, Q>::col_type operator*(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v);
|
||||
|
||||
|
@ -155,28 +105,9 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator/(T scalar, mat<3, 3, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 3, T, Q>::col_type operator/(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 3, T, Q>::row_type operator/(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
|
|
@ -264,57 +264,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator+=(U s)
|
||||
{
|
||||
this->value[0] += s;
|
||||
this->value[1] += s;
|
||||
this->value[2] += s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator+=(mat<3, 3, U, Q> const& m)
|
||||
{
|
||||
this->value[0] += m[0];
|
||||
this->value[1] += m[1];
|
||||
this->value[2] += m[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator-=(U s)
|
||||
{
|
||||
this->value[0] -= s;
|
||||
this->value[1] -= s;
|
||||
this->value[2] -= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator-=(mat<3, 3, U, Q> const& m)
|
||||
{
|
||||
this->value[0] -= m[0];
|
||||
this->value[1] -= m[1];
|
||||
this->value[2] -= m[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator*=(U s)
|
||||
{
|
||||
col_type sv(s);
|
||||
this->value[0] *= sv;
|
||||
this->value[1] *= sv;
|
||||
this->value[2] *= sv;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator*=(mat<3, 3, U, Q> const& m)
|
||||
|
@ -322,16 +271,6 @@ namespace glm
|
|||
return (*this = *this * m);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator/=(U s)
|
||||
{
|
||||
this->value[0] /= s;
|
||||
this->value[1] /= s;
|
||||
this->value[2] /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator/=(mat<3, 3, U, Q> const& m)
|
||||
|
@ -339,133 +278,6 @@ namespace glm
|
|||
return *this *= inverse(m);
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator++()
|
||||
{
|
||||
++this->value[0];
|
||||
++this->value[1];
|
||||
++this->value[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator--()
|
||||
{
|
||||
--this->value[0];
|
||||
--this->value[1];
|
||||
--this->value[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> mat<3, 3, T, Q>::operator++(int)
|
||||
{
|
||||
mat<3, 3, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> mat<3, 3, T, Q>::operator--(int)
|
||||
{
|
||||
mat<3, 3, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m)
|
||||
{
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar,
|
||||
m[2] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator+(T scalar, mat<3, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar,
|
||||
m[2] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
m1[0] + m2[0],
|
||||
m1[1] + m2[1],
|
||||
m1[2] + m2[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
m[0] - scalar,
|
||||
m[1] - scalar,
|
||||
m[2] - scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator-(T scalar, mat<3, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
scalar - m[0],
|
||||
scalar - m[1],
|
||||
scalar - m[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
m1[0] - m2[0],
|
||||
m1[1] - m2[1],
|
||||
m1[2] - m2[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator*(T scalar, mat<3, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 3, T, Q>::col_type operator*(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v)
|
||||
{
|
||||
|
@ -578,36 +390,6 @@ namespace glm
|
|||
m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
m[0] / scalar,
|
||||
m[1] / scalar,
|
||||
m[2] / scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator/(T scalar, mat<3, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 3, T, Q>(
|
||||
scalar / m[0],
|
||||
scalar / m[1],
|
||||
scalar / m[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 3, T, Q>::col_type operator/(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v)
|
||||
{
|
||||
return inverse(m) * v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 3, T, Q>::row_type operator/(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m)
|
||||
{
|
||||
return v * inverse(m);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||
{
|
||||
|
@ -615,17 +397,4 @@ namespace glm
|
|||
return m1_copy /= m2;
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
|
||||
}
|
||||
} //namespace glm
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "mat3xR_common_operators.hpp"
|
||||
#include "type_vec3.hpp"
|
||||
#include "type_vec4.hpp"
|
||||
#include <limits>
|
||||
|
@ -28,7 +29,7 @@ namespace glm
|
|||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
|
||||
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type& operator[](length_type i) GLM_NOEXCEPT;
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||
|
||||
// -- Constructors --
|
||||
|
@ -78,59 +79,11 @@ namespace glm
|
|||
GLM_CTOR_DECL GLM_EXPLICIT mat(mat<4, 2, T, Q> const& x);
|
||||
GLM_CTOR_DECL GLM_EXPLICIT mat(mat<4, 3, T, Q> const& x);
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat& operator=(mat<3, 4, U, Q> const& m);
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator=(mat<3, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator+=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator+=(mat<3, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator-=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator-=(mat<3, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator*=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator/=(U s);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator++();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator--();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator--(int);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator*(T scalar, mat<3, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 4, T, Q>::col_type operator*(mat<3, 4, T, Q> const& m, typename mat<3, 4, T, Q>::row_type const& v);
|
||||
|
||||
|
@ -138,27 +91,14 @@ namespace glm
|
|||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 4, T, Q>::row_type operator*(typename mat<3, 4, T, Q>::col_type const& v, mat<3, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator/(mat<3, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator/(T scalar, mat<3, 4, T, Q> const& m);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
|
|
@ -267,175 +267,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator+=(U s)
|
||||
{
|
||||
this->value[0] += s;
|
||||
this->value[1] += s;
|
||||
this->value[2] += s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator+=(mat<3, 4, U, Q> const& m)
|
||||
{
|
||||
this->value[0] += m[0];
|
||||
this->value[1] += m[1];
|
||||
this->value[2] += m[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator-=(U s)
|
||||
{
|
||||
this->value[0] -= s;
|
||||
this->value[1] -= s;
|
||||
this->value[2] -= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator-=(mat<3, 4, U, Q> const& m)
|
||||
{
|
||||
this->value[0] -= m[0];
|
||||
this->value[1] -= m[1];
|
||||
this->value[2] -= m[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator*=(U s)
|
||||
{
|
||||
this->value[0] *= s;
|
||||
this->value[1] *= s;
|
||||
this->value[2] *= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> & mat<3, 4, T, Q>::operator/=(U s)
|
||||
{
|
||||
this->value[0] /= s;
|
||||
this->value[1] /= s;
|
||||
this->value[2] /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator++()
|
||||
{
|
||||
++this->value[0];
|
||||
++this->value[1];
|
||||
++this->value[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator--()
|
||||
{
|
||||
--this->value[0];
|
||||
--this->value[1];
|
||||
--this->value[2];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> mat<3, 4, T, Q>::operator++(int)
|
||||
{
|
||||
mat<3, 4, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> mat<3, 4, T, Q>::operator--(int)
|
||||
{
|
||||
mat<3, 4, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m)
|
||||
{
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 4, T, Q>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 4, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar,
|
||||
m[2] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||
{
|
||||
return mat<3, 4, T, Q>(
|
||||
m1[0] + m2[0],
|
||||
m1[1] + m2[1],
|
||||
m1[2] + m2[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 4, T, Q>(
|
||||
m[0] - scalar,
|
||||
m[1] - scalar,
|
||||
m[2] - scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||
{
|
||||
return mat<3, 4, T, Q>(
|
||||
m1[0] - m2[0],
|
||||
m1[1] - m2[1],
|
||||
m1[2] - m2[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 4, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator*(T scalar, mat<3, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 4, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 4, T, Q>::col_type operator*
|
||||
(
|
||||
|
@ -516,36 +347,4 @@ namespace glm
|
|||
m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2],
|
||||
m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator/(mat<3, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<3, 4, T, Q>(
|
||||
m[0] / scalar,
|
||||
m[1] / scalar,
|
||||
m[2] / scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator/(T scalar, mat<3, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<3, 4, T, Q>(
|
||||
scalar / m[0],
|
||||
scalar / m[1],
|
||||
scalar / m[2]);
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
|
||||
}
|
||||
} //namespace glm
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "mat4xR_common_operators.hpp"
|
||||
#include "type_vec2.hpp"
|
||||
#include "type_vec4.hpp"
|
||||
#include <limits>
|
||||
|
@ -83,59 +84,12 @@ namespace glm
|
|||
GLM_CTOR_DECL mat(mat<4, 3, T, Q> const& x);
|
||||
GLM_CTOR_DECL mat(mat<3, 4, T, Q> const& x);
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator=(mat<4, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator+=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator+=(mat<4, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-=(mat<4, 2, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator*=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator/=(U s);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator++ ();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-- ();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator--(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat& operator=(mat<4, 2, U, Q> const& m);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator*(T scalar, mat<4, 2, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 2, T, Q>::col_type operator*(mat<4, 2, T, Q> const& m, typename mat<4, 2, T, Q>::row_type const& v);
|
||||
|
||||
|
@ -151,19 +105,6 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator/(mat<4, 2, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator/(T scalar, mat<4, 2, T, Q> const& m);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
|
|
@ -281,190 +281,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator+=(U s)
|
||||
{
|
||||
this->value[0] += s;
|
||||
this->value[1] += s;
|
||||
this->value[2] += s;
|
||||
this->value[3] += s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator+=(mat<4, 2, U, Q> const& m)
|
||||
{
|
||||
this->value[0] += m[0];
|
||||
this->value[1] += m[1];
|
||||
this->value[2] += m[2];
|
||||
this->value[3] += m[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator-=(U s)
|
||||
{
|
||||
this->value[0] -= s;
|
||||
this->value[1] -= s;
|
||||
this->value[2] -= s;
|
||||
this->value[3] -= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator-=(mat<4, 2, U, Q> const& m)
|
||||
{
|
||||
this->value[0] -= m[0];
|
||||
this->value[1] -= m[1];
|
||||
this->value[2] -= m[2];
|
||||
this->value[3] -= m[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator*=(U s)
|
||||
{
|
||||
this->value[0] *= s;
|
||||
this->value[1] *= s;
|
||||
this->value[2] *= s;
|
||||
this->value[3] *= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator/=(U s)
|
||||
{
|
||||
this->value[0] /= s;
|
||||
this->value[1] /= s;
|
||||
this->value[2] /= s;
|
||||
this->value[3] /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator++()
|
||||
{
|
||||
++this->value[0];
|
||||
++this->value[1];
|
||||
++this->value[2];
|
||||
++this->value[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator--()
|
||||
{
|
||||
--this->value[0];
|
||||
--this->value[1];
|
||||
--this->value[2];
|
||||
--this->value[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> mat<4, 2, T, Q>::operator++(int)
|
||||
{
|
||||
mat<4, 2, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> mat<4, 2, T, Q>::operator--(int)
|
||||
{
|
||||
mat<4, 2, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m)
|
||||
{
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 2, T, Q>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2],
|
||||
-m[3]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 2, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar,
|
||||
m[2] + scalar,
|
||||
m[3] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||
{
|
||||
return mat<4, 2, T, Q>(
|
||||
m1[0] + m2[0],
|
||||
m1[1] + m2[1],
|
||||
m1[2] + m2[2],
|
||||
m1[3] + m2[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 2, T, Q>(
|
||||
m[0] - scalar,
|
||||
m[1] - scalar,
|
||||
m[2] - scalar,
|
||||
m[3] - scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||
{
|
||||
return mat<4, 2, T, Q>(
|
||||
m1[0] - m2[0],
|
||||
m1[1] - m2[1],
|
||||
m1[2] - m2[2],
|
||||
m1[3] - m2[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 2, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar,
|
||||
m[3] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator*(T scalar, mat<4, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 2, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar,
|
||||
m[3] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 2, T, Q>::col_type operator*(mat<4, 2, T, Q> const& m, typename mat<4, 2, T, Q>::row_type const& v)
|
||||
{
|
||||
|
@ -519,37 +335,4 @@ namespace glm
|
|||
m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator/(mat<4, 2, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 2, T, Q>(
|
||||
m[0] / scalar,
|
||||
m[1] / scalar,
|
||||
m[2] / scalar,
|
||||
m[3] / scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator/(T scalar, mat<4, 2, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 2, T, Q>(
|
||||
scalar / m[0],
|
||||
scalar / m[1],
|
||||
scalar / m[2],
|
||||
scalar / m[3]);
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
|
||||
}
|
||||
} //namespace glm
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "mat4xR_common_operators.hpp"
|
||||
#include "type_vec3.hpp"
|
||||
#include "type_vec4.hpp"
|
||||
#include <limits>
|
||||
|
@ -28,7 +29,7 @@ namespace glm
|
|||
typedef length_t length_type;
|
||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
|
||||
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type& operator[](length_type i) GLM_NOEXCEPT;
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||
|
||||
// -- Constructors --
|
||||
|
@ -83,58 +84,11 @@ namespace glm
|
|||
GLM_CTOR_DECL mat(mat<4, 2, T, Q> const& x);
|
||||
GLM_CTOR_DECL mat(mat<3, 4, T, Q> const& x);
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator=(mat<4, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator+=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator+=(mat<4, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator-=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator-=(mat<4, 3, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator*=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator/=(U s);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q>& operator++();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 3, T, Q>& operator--();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator--(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat& operator=(mat<4, 3, U, Q> const& m);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator*(T scalar, mat<4, 3, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 3, T, Q>::col_type operator*(mat<4, 3, T, Q> const& m, typename mat<4, 3, T, Q>::row_type const& v);
|
||||
|
@ -146,24 +100,11 @@ namespace glm
|
|||
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator/(mat<4, 3, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator/(T scalar, mat<4, 3, T, Q> const& m);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
|
|
@ -281,190 +281,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator+=(U s)
|
||||
{
|
||||
this->value[0] += s;
|
||||
this->value[1] += s;
|
||||
this->value[2] += s;
|
||||
this->value[3] += s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator+=(mat<4, 3, U, Q> const& m)
|
||||
{
|
||||
this->value[0] += m[0];
|
||||
this->value[1] += m[1];
|
||||
this->value[2] += m[2];
|
||||
this->value[3] += m[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator-=(U s)
|
||||
{
|
||||
this->value[0] -= s;
|
||||
this->value[1] -= s;
|
||||
this->value[2] -= s;
|
||||
this->value[3] -= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator-=(mat<4, 3, U, Q> const& m)
|
||||
{
|
||||
this->value[0] -= m[0];
|
||||
this->value[1] -= m[1];
|
||||
this->value[2] -= m[2];
|
||||
this->value[3] -= m[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator*=(U s)
|
||||
{
|
||||
this->value[0] *= s;
|
||||
this->value[1] *= s;
|
||||
this->value[2] *= s;
|
||||
this->value[3] *= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator/=(U s)
|
||||
{
|
||||
this->value[0] /= s;
|
||||
this->value[1] /= s;
|
||||
this->value[2] /= s;
|
||||
this->value[3] /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator++()
|
||||
{
|
||||
++this->value[0];
|
||||
++this->value[1];
|
||||
++this->value[2];
|
||||
++this->value[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator--()
|
||||
{
|
||||
--this->value[0];
|
||||
--this->value[1];
|
||||
--this->value[2];
|
||||
--this->value[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> mat<4, 3, T, Q>::operator++(int)
|
||||
{
|
||||
mat<4, 3, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> mat<4, 3, T, Q>::operator--(int)
|
||||
{
|
||||
mat<4, 3, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m)
|
||||
{
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 3, T, Q>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2],
|
||||
-m[3]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 3, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar,
|
||||
m[2] + scalar,
|
||||
m[3] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||
{
|
||||
return mat<4, 3, T, Q>(
|
||||
m1[0] + m2[0],
|
||||
m1[1] + m2[1],
|
||||
m1[2] + m2[2],
|
||||
m1[3] + m2[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 3, T, Q>(
|
||||
m[0] - scalar,
|
||||
m[1] - scalar,
|
||||
m[2] - scalar,
|
||||
m[3] - scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||
{
|
||||
return mat<4, 3, T, Q>(
|
||||
m1[0] - m2[0],
|
||||
m1[1] - m2[1],
|
||||
m1[2] - m2[2],
|
||||
m1[3] - m2[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 3, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar,
|
||||
m[3] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator*(T scalar, mat<4, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 3, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar,
|
||||
m[3] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 3, T, Q>::col_type operator*
|
||||
(
|
||||
|
@ -535,37 +351,4 @@ namespace glm
|
|||
m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2] + m1[3][2] * m2[3][3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator/(mat<4, 3, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 3, T, Q>(
|
||||
m[0] / scalar,
|
||||
m[1] / scalar,
|
||||
m[2] / scalar,
|
||||
m[3] / scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator/(T scalar, mat<4, 3, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 3, T, Q>(
|
||||
scalar / m[0],
|
||||
scalar / m[1],
|
||||
scalar / m[2],
|
||||
scalar / m[3]);
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
|
||||
}
|
||||
} //namespace glm
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "mat4xR_common_operators.hpp"
|
||||
#include "type_vec4.hpp"
|
||||
#include <limits>
|
||||
#include <cstddef>
|
||||
|
@ -85,66 +86,13 @@ namespace glm
|
|||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator=(mat<4, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator+=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator+=(mat<4, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator-=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator-=(mat<4, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator*=(U s);
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat& operator=(mat<4, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator*=(mat<4, 4, U, Q> const& m);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator/=(U s);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator/=(mat<4, 4, U, Q> const& m);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator++();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator--();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator--(int);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator+(T scalar, mat<4, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator-(T scalar, mat<4, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator*(T scalar, mat<4, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 4, T, Q>::col_type operator*(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v);
|
||||
|
||||
|
@ -160,28 +108,9 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator/(T scalar, mat<4, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 4, T, Q>::col_type operator/(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 4, T, Q>::row_type operator/(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
|
|
@ -315,61 +315,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>& mat<4, 4, T, Q>::operator+=(U s)
|
||||
{
|
||||
this->value[0] += s;
|
||||
this->value[1] += s;
|
||||
this->value[2] += s;
|
||||
this->value[3] += s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>& mat<4, 4, T, Q>::operator+=(mat<4, 4, U, Q> const& m)
|
||||
{
|
||||
this->value[0] += m[0];
|
||||
this->value[1] += m[1];
|
||||
this->value[2] += m[2];
|
||||
this->value[3] += m[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator-=(U s)
|
||||
{
|
||||
this->value[0] -= s;
|
||||
this->value[1] -= s;
|
||||
this->value[2] -= s;
|
||||
this->value[3] -= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator-=(mat<4, 4, U, Q> const& m)
|
||||
{
|
||||
this->value[0] -= m[0];
|
||||
this->value[1] -= m[1];
|
||||
this->value[2] -= m[2];
|
||||
this->value[3] -= m[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator*=(U s)
|
||||
{
|
||||
this->value[0] *= s;
|
||||
this->value[1] *= s;
|
||||
this->value[2] *= s;
|
||||
this->value[3] *= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator*=(mat<4, 4, U, Q> const& m)
|
||||
|
@ -377,17 +322,6 @@ namespace glm
|
|||
return (*this = *this * m);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator/=(U s)
|
||||
{
|
||||
this->value[0] /= s;
|
||||
this->value[1] /= s;
|
||||
this->value[2] /= s;
|
||||
this->value[3] /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator/=(mat<4, 4, U, Q> const& m)
|
||||
|
@ -395,144 +329,6 @@ namespace glm
|
|||
return *this *= inverse(m);
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator++()
|
||||
{
|
||||
++this->value[0];
|
||||
++this->value[1];
|
||||
++this->value[2];
|
||||
++this->value[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator--()
|
||||
{
|
||||
--this->value[0];
|
||||
--this->value[1];
|
||||
--this->value[2];
|
||||
--this->value[3];
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> mat<4, 4, T, Q>::operator++(int)
|
||||
{
|
||||
mat<4, 4, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> mat<4, 4, T, Q>::operator--(int)
|
||||
{
|
||||
mat<4, 4, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary constant operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m)
|
||||
{
|
||||
return m;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2],
|
||||
-m[3]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar,
|
||||
m[2] + scalar,
|
||||
m[3] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator+(T scalar, mat<4, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
m[0] + scalar,
|
||||
m[1] + scalar,
|
||||
m[2] + scalar,
|
||||
m[3] + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
m1[0] + m2[0],
|
||||
m1[1] + m2[1],
|
||||
m1[2] + m2[2],
|
||||
m1[3] + m2[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
m[0] - scalar,
|
||||
m[1] - scalar,
|
||||
m[2] - scalar,
|
||||
m[3] - scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator-(T scalar, mat<4, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
scalar - m[0],
|
||||
scalar - m[1],
|
||||
scalar - m[2],
|
||||
scalar - m[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
m1[0] - m2[0],
|
||||
m1[1] - m2[1],
|
||||
m1[2] - m2[2],
|
||||
m1[3] - m2[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar,
|
||||
m[3] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator*(T scalar, mat<4, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
m[0] * scalar,
|
||||
m[1] * scalar,
|
||||
m[2] * scalar,
|
||||
m[3] * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 4, T, Q>::col_type operator*
|
||||
(
|
||||
|
@ -706,38 +502,6 @@ namespace glm
|
|||
return detail::mul4x4<T, Q, detail::is_aligned<Q>::value>::call(m1, m2);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m, T scalar)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
m[0] / scalar,
|
||||
m[1] / scalar,
|
||||
m[2] / scalar,
|
||||
m[3] / scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator/(T scalar, mat<4, 4, T, Q> const& m)
|
||||
{
|
||||
return mat<4, 4, T, Q>(
|
||||
scalar / m[0],
|
||||
scalar / m[1],
|
||||
scalar / m[2],
|
||||
scalar / m[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 4, T, Q>::col_type operator/(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v)
|
||||
{
|
||||
return inverse(m) * v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 4, T, Q>::row_type operator/(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m)
|
||||
{
|
||||
return v * inverse(m);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||
{
|
||||
|
@ -745,19 +509,6 @@ namespace glm
|
|||
return m1_copy /= m2;
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||
{
|
||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
|
||||
}
|
||||
}//namespace glm
|
||||
|
||||
#if GLM_CONFIG_SIMD == GLM_ENABLE
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
# include "_swizzle_func.hpp"
|
||||
#endif
|
||||
#include <cstddef>
|
||||
#include "vec_common_operators.hpp"
|
||||
|
||||
namespace glm
|
||||
{
|
||||
|
@ -104,18 +105,8 @@ namespace glm
|
|||
// -- Conversion vector constructors --
|
||||
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template<typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<2, U, P> const& v);
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template<typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<3, U, P> const& v);
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template<typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<4, U, P> const& v);
|
||||
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template<typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<1, U, P> const& v);
|
||||
template<length_t L,typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<L, U, P> const& v);
|
||||
|
||||
// -- Swizzle constructors --
|
||||
/*
|
||||
|
@ -154,8 +145,6 @@ namespace glm
|
|||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<1, T, Q> & operator++();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<1, T, Q> & operator--();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator--(int);
|
||||
|
||||
// -- Unary bit operators --
|
||||
|
||||
|
@ -187,9 +176,6 @@ namespace glm
|
|||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator+(vec<1, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator-(vec<1, T, Q> const& v);
|
||||
|
||||
|
@ -198,9 +184,6 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator+(vec<1, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator+(T scalar, vec<1, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator+(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
|
@ -216,9 +199,6 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator*(vec<1, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator*(T scalar, vec<1, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator*(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
|
@ -243,27 +223,18 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator&(vec<1, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator&(T scalar, vec<1, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator&(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator|(vec<1, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator|(T scalar, vec<1, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator|(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator^(vec<1, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator^(T scalar, vec<1, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator^(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
|
@ -293,9 +264,6 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<1, bool, Q> operator&&(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2);
|
||||
|
||||
|
|
|
@ -38,26 +38,8 @@ namespace glm
|
|||
// -- Conversion vector constructors --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<1, U, P> const& v)
|
||||
: x(static_cast<T>(v.x))
|
||||
{}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<2, U, P> const& v)
|
||||
: x(static_cast<T>(v.x))
|
||||
{}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<3, U, P> const& v)
|
||||
: x(static_cast<T>(v.x))
|
||||
{}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<4, U, P> const& v)
|
||||
template<length_t L,typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q>::vec(vec<L, U, P> const& v)
|
||||
: x(static_cast<T>(v.x))
|
||||
{}
|
||||
|
||||
|
@ -174,22 +156,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> vec<1, T, Q>::operator++(int)
|
||||
{
|
||||
vec<1, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> vec<1, T, Q>::operator--(int)
|
||||
{
|
||||
vec<1, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary bit operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
|
@ -290,12 +256,6 @@ namespace glm
|
|||
|
||||
// -- Unary constant operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator+(vec<1, T, Q> const& v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator-(vec<1, T, Q> const& v)
|
||||
{
|
||||
|
@ -312,13 +272,6 @@ namespace glm
|
|||
v.x + scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator+(T scalar, vec<1, T, Q> const& v)
|
||||
{
|
||||
return vec<1, T, Q>(
|
||||
scalar + v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator+(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
|
@ -355,13 +308,6 @@ namespace glm
|
|||
v.x * scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator*(T scalar, vec<1, T, Q> const& v)
|
||||
{
|
||||
return vec<1, T, Q>(
|
||||
scalar * v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator*(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
|
@ -420,13 +366,6 @@ namespace glm
|
|||
v.x & scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator&(T scalar, vec<1, T, Q> const& v)
|
||||
{
|
||||
return vec<1, T, Q>(
|
||||
scalar & v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator&(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
|
@ -441,13 +380,6 @@ namespace glm
|
|||
v.x | scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator|(T scalar, vec<1, T, Q> const& v)
|
||||
{
|
||||
return vec<1, T, Q>(
|
||||
scalar | v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator|(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
|
@ -462,13 +394,6 @@ namespace glm
|
|||
v.x ^ scalar);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator^(T scalar, vec<1, T, Q> const& v)
|
||||
{
|
||||
return vec<1, T, Q>(
|
||||
scalar ^ v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, T, Q> operator^(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
|
@ -533,12 +458,6 @@ namespace glm
|
|||
return detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return !(v1 == v2);
|
||||
}
|
||||
|
||||
template<qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<1, bool, Q> operator&&(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
# include "_swizzle_func.hpp"
|
||||
#endif
|
||||
#include <cstddef>
|
||||
#include "vec_common_operators.hpp"
|
||||
|
||||
namespace glm
|
||||
{
|
||||
|
@ -126,15 +127,8 @@ namespace glm
|
|||
// -- Conversion vector constructors --
|
||||
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template<typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<3, U, P> const& v);
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template<typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<4, U, P> const& v);
|
||||
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template<typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<2, U, P> const& v);
|
||||
template<length_t L,typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<L, U, P> const& v);
|
||||
|
||||
// -- Swizzle constructors --
|
||||
# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
|
||||
|
@ -154,80 +148,54 @@ namespace glm
|
|||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator+=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator+=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator+=(vec<2, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator-=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator-=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator-=(vec<2, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator*=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator*=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator*=(vec<2, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator/=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator/=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator/=(vec<2, U, Q> const& v);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator++();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator--();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator--(int);
|
||||
|
||||
// -- Unary bit operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator%=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator%=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator%=(vec<2, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator&=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator&=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator&=(vec<2, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator|=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator|=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator|=(vec<2, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator^=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator^=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator^=(vec<2, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator<<=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator<<=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator<<=(vec<2, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator>>=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator>>=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<2, T, Q> & operator>>=(vec<2, U, Q> const& v);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(vec<2, T, Q> const& v);
|
||||
|
||||
|
@ -236,150 +204,75 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(vec<2, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(T scalar, vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(vec<2, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(T scalar, vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator*(vec<2, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator*(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator*(T scalar, vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator*(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator*(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator/(vec<2, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator/(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator/(T scalar, vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator/(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator/(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator%(vec<2, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator%(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator%(T scalar, vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator%(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator%(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator&(vec<2, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator&(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator&(T scalar, vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator&(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator&(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator|(vec<2, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator|(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator|(T scalar, vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator|(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator|(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator^(vec<2, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator^(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator^(T scalar, vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator^(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator^(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator<<(vec<2, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator<<(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator<<(T scalar, vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator<<(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator<<(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator>>(vec<2, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator>>(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator>>(T scalar, vec<2, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator>>(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator>>(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
|
@ -391,9 +284,6 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
|
||||
|
||||
template<qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<2, bool, Q> operator&&(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2);
|
||||
|
||||
|
|
|
@ -80,22 +80,8 @@ namespace glm
|
|||
// -- Conversion vector constructors --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<2, U, P> const& v)
|
||||
: x(static_cast<T>(v.x))
|
||||
, y(static_cast<T>(v.y))
|
||||
{}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<3, U, P> const& v)
|
||||
: x(static_cast<T>(v.x))
|
||||
, y(static_cast<T>(v.y))
|
||||
{}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<4, U, P> const& v)
|
||||
template<length_t L,typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q>::vec(vec<L, U, P> const& v)
|
||||
: x(static_cast<T>(v.x))
|
||||
, y(static_cast<T>(v.y))
|
||||
{}
|
||||
|
@ -160,15 +146,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator+=(vec<1, U, Q> const& v)
|
||||
{
|
||||
this->x += static_cast<T>(v.x);
|
||||
this->y += static_cast<T>(v.x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator+=(vec<2, U, Q> const& v)
|
||||
|
@ -187,15 +164,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator-=(vec<1, U, Q> const& v)
|
||||
{
|
||||
this->x -= static_cast<T>(v.x);
|
||||
this->y -= static_cast<T>(v.x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator-=(vec<2, U, Q> const& v)
|
||||
|
@ -214,15 +182,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator*=(vec<1, U, Q> const& v)
|
||||
{
|
||||
this->x *= static_cast<T>(v.x);
|
||||
this->y *= static_cast<T>(v.x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator*=(vec<2, U, Q> const& v)
|
||||
|
@ -241,15 +200,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator/=(vec<1, U, Q> const& v)
|
||||
{
|
||||
this->x /= static_cast<T>(v.x);
|
||||
this->y /= static_cast<T>(v.x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator/=(vec<2, U, Q> const& v)
|
||||
|
@ -277,22 +227,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> vec<2, T, Q>::operator++(int)
|
||||
{
|
||||
vec<2, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> vec<2, T, Q>::operator--(int)
|
||||
{
|
||||
vec<2, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary bit operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
|
@ -304,15 +238,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator%=(vec<1, U, Q> const& v)
|
||||
{
|
||||
this->x %= static_cast<T>(v.x);
|
||||
this->y %= static_cast<T>(v.x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator%=(vec<2, U, Q> const& v)
|
||||
|
@ -331,15 +256,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator&=(vec<1, U, Q> const& v)
|
||||
{
|
||||
this->x &= static_cast<T>(v.x);
|
||||
this->y &= static_cast<T>(v.x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator&=(vec<2, U, Q> const& v)
|
||||
|
@ -358,15 +274,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator|=(vec<1, U, Q> const& v)
|
||||
{
|
||||
this->x |= static_cast<T>(v.x);
|
||||
this->y |= static_cast<T>(v.x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator|=(vec<2, U, Q> const& v)
|
||||
|
@ -385,15 +292,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator^=(vec<1, U, Q> const& v)
|
||||
{
|
||||
this->x ^= static_cast<T>(v.x);
|
||||
this->y ^= static_cast<T>(v.x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator^=(vec<2, U, Q> const& v)
|
||||
|
@ -412,15 +310,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator<<=(vec<1, U, Q> const& v)
|
||||
{
|
||||
this->x <<= static_cast<T>(v.x);
|
||||
this->y <<= static_cast<T>(v.x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator<<=(vec<2, U, Q> const& v)
|
||||
|
@ -439,15 +328,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator>>=(vec<1, U, Q> const& v)
|
||||
{
|
||||
this->x >>= static_cast<T>(v.x);
|
||||
this->y >>= static_cast<T>(v.x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> & vec<2, T, Q>::operator>>=(vec<2, U, Q> const& v)
|
||||
|
@ -459,12 +339,6 @@ namespace glm
|
|||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator+(vec<2, T, Q> const& v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator-(vec<2, T, Q> const& v)
|
||||
{
|
||||
|
@ -491,14 +365,6 @@ namespace glm
|
|||
v1.y + v2.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator+(T scalar, vec<2, T, Q> const& v)
|
||||
{
|
||||
return vec<2, T, Q>(
|
||||
scalar + v.x,
|
||||
scalar + v.y);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator+(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2)
|
||||
{
|
||||
|
@ -571,14 +437,6 @@ namespace glm
|
|||
v1.y * v2.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator*(T scalar, vec<2, T, Q> const& v)
|
||||
{
|
||||
return vec<2, T, Q>(
|
||||
scalar * v.x,
|
||||
scalar * v.y);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator*(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2)
|
||||
{
|
||||
|
@ -693,14 +551,6 @@ namespace glm
|
|||
v1.y & v2.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator&(T scalar, vec<2, T, Q> const& v)
|
||||
{
|
||||
return vec<2, T, Q>(
|
||||
scalar & v.x,
|
||||
scalar & v.y);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator&(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2)
|
||||
{
|
||||
|
@ -733,14 +583,6 @@ namespace glm
|
|||
v1.y | v2.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator|(T scalar, vec<2, T, Q> const& v)
|
||||
{
|
||||
return vec<2, T, Q>(
|
||||
scalar | v.x,
|
||||
scalar | v.y);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator|(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2)
|
||||
{
|
||||
|
@ -773,14 +615,6 @@ namespace glm
|
|||
v1.y ^ v2.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator^(T scalar, vec<2, T, Q> const& v)
|
||||
{
|
||||
return vec<2, T, Q>(
|
||||
scalar ^ v.x,
|
||||
scalar ^ v.y);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, T, Q> operator^(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2)
|
||||
{
|
||||
|
@ -895,12 +729,6 @@ namespace glm
|
|||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.y, v2.y);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2)
|
||||
{
|
||||
return !(v1 == v2);
|
||||
}
|
||||
|
||||
template<qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<2, bool, Q> operator&&(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
# include "_swizzle_func.hpp"
|
||||
#endif
|
||||
#include <cstddef>
|
||||
#include "vec_common_operators.hpp"
|
||||
|
||||
namespace glm
|
||||
{
|
||||
|
@ -151,13 +152,10 @@ namespace glm
|
|||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template<typename A, typename B, qualifier P>
|
||||
GLM_CTOR_DECL vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz);
|
||||
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template<typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<4, U, P> const& v);
|
||||
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template<typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<3, U, P> const& v);
|
||||
template<length_t L,typename U, qualifier P>
|
||||
GLM_CTOR_DECL GLM_EXPLICIT vec(vec<L, U, P> const& v);
|
||||
|
||||
// -- Swizzle constructors --
|
||||
# if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
|
||||
|
@ -189,72 +187,49 @@ namespace glm
|
|||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator+=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator+=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator+=(vec<3, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator-=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator-=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator-=(vec<3, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator*=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator*=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator*=(vec<3, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator/=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator/=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator/=(vec<3, U, Q> const& v);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator++();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator--();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator--(int);
|
||||
|
||||
// -- Unary bit operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator%=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator%=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator%=(vec<3, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator&=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator&=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator&=(vec<3, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator|=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator|=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator|=(vec<3, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator^=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator^=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator^=(vec<3, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator<<=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator<<=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator<<=(vec<3, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator>>=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator>>=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<3, T, Q> & operator>>=(vec<3, U, Q> const& v);
|
||||
};
|
||||
|
||||
|
@ -262,9 +237,6 @@ namespace glm
|
|||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v);
|
||||
|
||||
|
@ -273,150 +245,72 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(T scalar, vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(T scalar, vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(T scalar, vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(T scalar, vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(T scalar, vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v1, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(T scalar, vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(T scalar, vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(T scalar, vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(T scalar, vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(T scalar, vec<3, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
|
@ -428,9 +322,6 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
|
||||
|
||||
template<qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<3, bool, Q> operator&&(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2);
|
||||
|
||||
|
|
|
@ -150,16 +150,8 @@ namespace glm
|
|||
{}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<3, U, P> const& v)
|
||||
: x(static_cast<T>(v.x))
|
||||
, y(static_cast<T>(v.y))
|
||||
, z(static_cast<T>(v.z))
|
||||
{}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<4, U, P> const& v)
|
||||
template<length_t L,typename U, qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q>::vec(vec<L, U, P> const& v)
|
||||
: x(static_cast<T>(v.x))
|
||||
, y(static_cast<T>(v.y))
|
||||
, z(static_cast<T>(v.z))
|
||||
|
@ -229,13 +221,6 @@ namespace glm
|
|||
return (*this = detail::compute_vec_add<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator+=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_add<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<1, T, Q>(v.x)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator+=(vec<3, U, Q> const& v)
|
||||
|
@ -250,13 +235,6 @@ namespace glm
|
|||
return (*this = detail::compute_vec_sub<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator-=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_sub<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<1, T, Q>(v.x)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator-=(vec<3, U, Q> const& v)
|
||||
|
@ -271,13 +249,6 @@ namespace glm
|
|||
return (*this = detail::compute_vec_mul<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(static_cast<T>(scalar))));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator*=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_mul<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(v.x)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator*=(vec<3, U, Q> const& v)
|
||||
|
@ -292,13 +263,6 @@ namespace glm
|
|||
return (*this = detail::compute_vec_div<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator/=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_div<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(v.x)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator/=(vec<3, U, Q> const& v)
|
||||
|
@ -326,22 +290,6 @@ namespace glm
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> vec<3, T, Q>::operator++(int)
|
||||
{
|
||||
vec<3, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> vec<3, T, Q>::operator--(int)
|
||||
{
|
||||
vec<3, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary bit operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
|
@ -351,13 +299,6 @@ namespace glm
|
|||
return (*this = detail::compute_vec_mod<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator%=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_mod<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator%=(vec<3, U, Q> const& v)
|
||||
|
@ -372,13 +313,6 @@ namespace glm
|
|||
return (*this = detail::compute_vec_and<3, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator&=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_and<3, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator&=(vec<3, U, Q> const& v)
|
||||
|
@ -392,14 +326,6 @@ namespace glm
|
|||
{
|
||||
return (*this = detail::compute_vec_or<3, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator|=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_or<3, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator|=(vec<3, U, Q> const& v)
|
||||
|
@ -414,13 +340,6 @@ namespace glm
|
|||
return (*this = detail::compute_vec_xor<3, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator^=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_xor<3, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(v.x)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator^=(vec<3, U, Q> const& v)
|
||||
|
@ -435,13 +354,6 @@ namespace glm
|
|||
return (*this = detail::compute_vec_shift_left<3, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator<<=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_shift_left<3, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<1, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator<<=(vec<3, U, Q> const& v)
|
||||
|
@ -456,13 +368,6 @@ namespace glm
|
|||
return (*this = detail::compute_vec_shift_right<3, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator>>=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_shift_right<3, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> & vec<3, T, Q>::operator>>=(vec<3, U, Q> const& v)
|
||||
|
@ -473,12 +378,6 @@ namespace glm
|
|||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v)
|
||||
{
|
||||
|
@ -493,24 +392,6 @@ namespace glm
|
|||
return vec<3, T, Q>(v) += scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return vec<3, T, Q>(v1) += v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator+(T scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(v) += scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator+(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) += v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
|
@ -523,24 +404,12 @@ namespace glm
|
|||
return vec<3, T, Q>(v) -= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar)
|
||||
{
|
||||
return vec<3, T, Q>(v) -= scalar.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator-(T scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) -= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator-(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) -= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
|
@ -553,24 +422,6 @@ namespace glm
|
|||
return vec<3, T, Q>(v) *= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar)
|
||||
{
|
||||
return vec<3, T, Q>(v) *= scalar.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator*(T scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(v) *= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator*(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(v) *= scalar.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
|
@ -584,24 +435,12 @@ namespace glm
|
|||
return vec<3, T, Q>(v) /= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar)
|
||||
{
|
||||
return vec<3, T, Q>(v) /= scalar.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator/(T scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) /= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator/(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) /= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
|
@ -616,24 +455,12 @@ namespace glm
|
|||
return vec<3, T, Q>(v) %= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar)
|
||||
{
|
||||
return vec<3, T, Q>(v) %= scalar.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator%(T scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) %= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator%(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar.x) %= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
|
@ -646,24 +473,6 @@ namespace glm
|
|||
return vec<3, T, Q>(v) &= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar)
|
||||
{
|
||||
return vec<3, T, Q>(v) &= scalar.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator&(T scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) &= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator&(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar.x) &= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
|
@ -676,24 +485,6 @@ namespace glm
|
|||
return vec<3, T, Q>(v) |= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar)
|
||||
{
|
||||
return vec<3, T, Q>(v) |= scalar.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator|(T scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) |= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator|(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar.x) |= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
|
@ -706,24 +497,6 @@ namespace glm
|
|||
return vec<3, T, Q>(v) ^= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar)
|
||||
{
|
||||
return vec<3, T, Q>(v) ^= scalar.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator^(T scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) ^= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator^(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar.x) ^= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
|
@ -736,24 +509,12 @@ namespace glm
|
|||
return vec<3, T, Q>(v) <<= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar)
|
||||
{
|
||||
return vec<3, T, Q>(v) <<= scalar.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator<<(T scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) << v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar.x) << v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
|
@ -766,24 +527,12 @@ namespace glm
|
|||
return vec<3, T, Q>(v) >>= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar)
|
||||
{
|
||||
return vec<3, T, Q>(v) >>= scalar.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator>>(T scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar) >>= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
|
||||
{
|
||||
return vec<3, T, Q>(scalar.x) >>= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
|
@ -810,12 +559,6 @@ namespace glm
|
|||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.z, v2.z);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
return !(v1 == v2);
|
||||
}
|
||||
|
||||
template<qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, bool, Q> operator&&(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
# include "_swizzle_func.hpp"
|
||||
#endif
|
||||
#include <cstddef>
|
||||
#include "vec_common_operators.hpp"
|
||||
|
||||
namespace glm
|
||||
{
|
||||
|
@ -261,81 +262,55 @@ namespace glm
|
|||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(vec<4, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(vec<4, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(vec<4, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(vec<4, U, Q> const& v);
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q> & operator++();
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<4, T, Q> & operator--();
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator++(int);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator--(int);
|
||||
|
||||
// -- Unary bit operators --
|
||||
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(vec<4, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(vec<4, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(vec<4, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(vec<4, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(vec<4, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(U scalar);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(vec<1, U, Q> const& v);
|
||||
template<typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(vec<4, U, Q> const& v);
|
||||
};
|
||||
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v);
|
||||
|
||||
|
@ -344,150 +319,75 @@ namespace glm
|
|||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(T scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(T scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(T scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(T scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(T scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(T scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(T scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(T scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(T scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q> const& v, T scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(T scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
|
||||
|
||||
|
|
|
@ -426,13 +426,6 @@ namespace detail
|
|||
return (*this = detail::compute_vec_add<4, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator+=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_add<4, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(v.x)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator+=(vec<4, U, Q> const& v)
|
||||
|
@ -447,13 +440,6 @@ namespace detail
|
|||
return (*this = detail::compute_vec_sub<4, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator-=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_sub<4, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(v.x)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator-=(vec<4, U, Q> const& v)
|
||||
|
@ -468,13 +454,6 @@ namespace detail
|
|||
return (*this = detail::compute_vec_mul<4,T, Q, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator*=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_mul<4,T, Q, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(v.x)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator*=(vec<4, U, Q> const& v)
|
||||
|
@ -489,13 +468,6 @@ namespace detail
|
|||
return (*this = detail::compute_vec_div<4, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator/=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_div<4, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(v.x)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator/=(vec<4, U, Q> const& v)
|
||||
|
@ -525,22 +497,6 @@ namespace detail
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> vec<4, T, Q>::operator++(int)
|
||||
{
|
||||
vec<4, T, Q> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> vec<4, T, Q>::operator--(int)
|
||||
{
|
||||
vec<4, T, Q> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary bit operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
|
@ -550,13 +506,6 @@ namespace detail
|
|||
return (*this = detail::compute_vec_mod<4, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator%=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_mod<3, T, Q, detail::is_aligned<Q>::value>::call(*this, vec<3, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator%=(vec<4, U, Q> const& v)
|
||||
|
@ -571,13 +520,6 @@ namespace detail
|
|||
return (*this = detail::compute_vec_and<4, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator&=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_and<4, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator&=(vec<4, U, Q> const& v)
|
||||
|
@ -592,13 +534,6 @@ namespace detail
|
|||
return (*this = detail::compute_vec_or<4, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator|=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_or<4, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator|=(vec<4, U, Q> const& v)
|
||||
|
@ -613,13 +548,6 @@ namespace detail
|
|||
return (*this = detail::compute_vec_xor<4, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator^=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_xor<4, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator^=(vec<4, U, Q> const& v)
|
||||
|
@ -634,13 +562,6 @@ namespace detail
|
|||
return (*this = detail::compute_vec_shift_left<4, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator<<=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_shift_left<4, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator<<=(vec<4, U, Q> const& v)
|
||||
|
@ -655,13 +576,6 @@ namespace detail
|
|||
return (*this = detail::compute_vec_shift_right<4, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(scalar)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator>>=(vec<1, U, Q> const& v)
|
||||
{
|
||||
return (*this = detail::compute_vec_shift_right<4, T, Q, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<Q>::value>::call(*this, vec<4, T, Q>(v)));
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
template<typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> & vec<4, T, Q>::operator>>=(vec<4, U, Q> const& v)
|
||||
|
@ -671,12 +585,6 @@ namespace detail
|
|||
|
||||
// -- Unary constant operators --
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v)
|
||||
{
|
||||
|
@ -691,24 +599,6 @@ namespace detail
|
|||
return vec<4, T, Q>(v) += scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1) += v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator+(T scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
return vec<4, T, Q>(v) += scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator+(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v2) += v1;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
|
@ -721,24 +611,12 @@ namespace detail
|
|||
return vec<4, T, Q>(v) -= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1) -= v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator-(T scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
return vec<4, T, Q>(scalar) -= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator-(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1.x) -= v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
|
@ -751,42 +629,12 @@ namespace detail
|
|||
return vec<4, T, Q>(v) *= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1) *= v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator*(T scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
return vec<4, T, Q>(v) *= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator*(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v2) *= v1;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1) *= v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q> const& v, T scalar)
|
||||
{
|
||||
return vec<4, T, Q>(v) /= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1) /= v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator/(T scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
|
@ -794,9 +642,9 @@ namespace detail
|
|||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator/(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q> const& v, T scalar)
|
||||
{
|
||||
return vec<4, T, Q>(v1.x) /= v2;
|
||||
return vec<4, T, Q>(v) /= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
|
@ -813,24 +661,12 @@ namespace detail
|
|||
return vec<4, T, Q>(v) %= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1) %= v2.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator%(T scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
return vec<4, T, Q>(scalar) %= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator%(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
return vec<4, T, Q>(scalar.x) %= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
|
@ -843,24 +679,6 @@ namespace detail
|
|||
return vec<4, T, Q>(v) &= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar)
|
||||
{
|
||||
return vec<4, T, Q>(v) &= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator&(T scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
return vec<4, T, Q>(scalar) &= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator&(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1.x) &= v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
|
@ -873,24 +691,6 @@ namespace detail
|
|||
return vec<4, T, Q>(v) |= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1) |= v2.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator|(T scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
return vec<4, T, Q>(scalar) |= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator|(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1.x) |= v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
|
@ -903,24 +703,6 @@ namespace detail
|
|||
return vec<4, T, Q>(v) ^= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1) ^= v2.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator^(T scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
return vec<4, T, Q>(scalar) ^= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator^(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1.x) ^= v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
|
@ -933,24 +715,12 @@ namespace detail
|
|||
return vec<4, T, Q>(v) <<= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1) <<= v2.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator<<(T scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
return vec<4, T, Q>(scalar) <<= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1.x) <<= v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
|
@ -963,24 +733,12 @@ namespace detail
|
|||
return vec<4, T, Q>(v) >>= scalar;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1) >>= v2.x;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator>>(T scalar, vec<4, T, Q> const& v)
|
||||
{
|
||||
return vec<4, T, Q>(scalar) >>= v;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
return vec<4, T, Q>(v1.x) >>= v2;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
|
|
102
glm/detail/vec_common_operators.hpp
Normal file
102
glm/detail/vec_common_operators.hpp
Normal file
|
@ -0,0 +1,102 @@
|
|||
#pragma once
|
||||
#include "qualifier.hpp"
|
||||
namespace glm {
|
||||
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L,T,Q> operator++(vec<L,T,Q>& v,int);
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L,T,Q> operator--(vec<L,T,Q>& v,int);
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L,T,Q> operator+(vec<L,T,Q> const& v);
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<L,T,Q> const& a,vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator+=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator+(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator+(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator-=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator-(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator-(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator*=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator*(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator*(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator/=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator/(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator/(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator%=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator%(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator%(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator&=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator&(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator&(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator|=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator|(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator|(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator^=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator^(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator^(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator<<=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator<<(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator<<(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator>>=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator>>(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator>>(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator+(T scalar,vec<L, T, Q> const& v);
|
||||
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator*(T scalar,vec<L, T, Q> const& v);
|
||||
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator&(T scalar,vec<L, T, Q> const& v);
|
||||
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator|(T scalar,vec<L, T, Q> const& v);
|
||||
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator^(T scalar,vec<L, T, Q> const& v);
|
||||
} // namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
#include "vec_common_operators.inl"
|
||||
#endif
|
173
glm/detail/vec_common_operators.inl
Normal file
173
glm/detail/vec_common_operators.inl
Normal file
|
@ -0,0 +1,173 @@
|
|||
namespace glm {
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L,T,Q> operator++(vec<L,T,Q>& v,int) {{
|
||||
const vec<L,T,Q> Result(v);
|
||||
++v;
|
||||
return Result;
|
||||
}}
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L,T,Q> operator--(vec<L,T,Q>& v,int) {
|
||||
const vec<L,T,Q> Result(v);
|
||||
--v;
|
||||
return Result;
|
||||
}
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L,T,Q> operator+(vec<L,T,Q> const& v) {
|
||||
return v;
|
||||
}
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(vec<L,T,Q> const& a,vec<L,T,Q> const& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator+=(vec<L, T, Q>& a, vec<1,U,P> const& b) {
|
||||
return a += b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator+(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {
|
||||
return a + b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator+(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {
|
||||
return a.x + b;
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator-=(vec<L, T, Q>& a, vec<1,U,P> const& b) {
|
||||
return a -= b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator-(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {
|
||||
return a - b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator-(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {
|
||||
return a.x - b;
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator*=(vec<L, T, Q>& a, vec<1,U,P> const& b) {
|
||||
return a *= b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator*(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {
|
||||
return a * b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator*(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {
|
||||
return a.x * b;
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator/=(vec<L, T, Q>& a, vec<1,U,P> const& b) {
|
||||
return a /= b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator/(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {
|
||||
return a / b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator/(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {
|
||||
return a.x / b;
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator%=(vec<L, T, Q>& a, vec<1,U,P> const& b) {
|
||||
return a %= b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator%(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {
|
||||
return a % b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator%(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {
|
||||
return a.x % b;
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator&=(vec<L, T, Q>& a, vec<1,U,P> const& b) {
|
||||
return a &= b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator&(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {
|
||||
return a & b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator&(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {
|
||||
return a.x & b;
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator|=(vec<L, T, Q>& a, vec<1,U,P> const& b) {
|
||||
return a |= b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator|(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {
|
||||
return a | b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator|(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {
|
||||
return a.x | b;
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator^=(vec<L, T, Q>& a, vec<1,U,P> const& b) {
|
||||
return a ^= b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator^(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {
|
||||
return a ^ b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator^(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {
|
||||
return a.x ^ b;
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator<<=(vec<L, T, Q>& a, vec<1,U,P> const& b) {
|
||||
return a <<= b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator<<(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {
|
||||
return a << b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator<<(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {
|
||||
return a.x << b;
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator>>=(vec<L, T, Q>& a, vec<1,U,P> const& b) {
|
||||
return a >>= b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator>>(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {
|
||||
return a >> b.x;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator>>(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {
|
||||
return a.x >> b;
|
||||
}
|
||||
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator+(T scalar,vec<L, T, Q> const& v) {
|
||||
return v + scalar;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator*(T scalar,vec<L, T, Q> const& v) {
|
||||
return v * scalar;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator&(T scalar,vec<L, T, Q> const& v) {
|
||||
return v & scalar;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator|(T scalar,vec<L, T, Q> const& v) {
|
||||
return v | scalar;
|
||||
}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator^(T scalar,vec<L, T, Q> const& v) {
|
||||
return v ^ scalar;
|
||||
}
|
||||
} // namespace glm
|
|
@ -14,7 +14,6 @@ namespace detail
|
|||
template<typename PARAM, typename RET>
|
||||
GLM_FUNC_DECL RET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w);
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER glm::uint16 bitfieldInterleave(glm::uint8 x, glm::uint8 y)
|
||||
{
|
||||
glm::uint16 REG1(x);
|
||||
|
@ -32,7 +31,6 @@ namespace detail
|
|||
return REG1 | static_cast<glm::uint16>(REG2 << 1);
|
||||
}
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint16 x, glm::uint16 y)
|
||||
{
|
||||
glm::uint32 REG1(x);
|
||||
|
@ -53,7 +51,6 @@ namespace detail
|
|||
return REG1 | (REG2 << 1);
|
||||
}
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y)
|
||||
{
|
||||
glm::uint64 REG1(x);
|
||||
|
@ -77,7 +74,6 @@ namespace detail
|
|||
return REG1 | (REG2 << 1);
|
||||
}
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint8 x, glm::uint8 y, glm::uint8 z)
|
||||
{
|
||||
glm::uint32 REG1(x);
|
||||
|
@ -103,7 +99,6 @@ namespace detail
|
|||
return REG1 | (REG2 << 1) | (REG3 << 2);
|
||||
}
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z)
|
||||
{
|
||||
glm::uint64 REG1(x);
|
||||
|
@ -133,7 +128,6 @@ namespace detail
|
|||
return REG1 | (REG2 << 1) | (REG3 << 2);
|
||||
}
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y, glm::uint32 z)
|
||||
{
|
||||
glm::uint64 REG1(x);
|
||||
|
@ -163,7 +157,6 @@ namespace detail
|
|||
return REG1 | (REG2 << 1) | (REG3 << 2);
|
||||
}
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(glm::uint8 x, glm::uint8 y, glm::uint8 z, glm::uint8 w)
|
||||
{
|
||||
glm::uint32 REG1(x);
|
||||
|
@ -189,7 +182,6 @@ namespace detail
|
|||
return REG1 | (REG2 << 1) | (REG3 << 2) | (REG4 << 3);
|
||||
}
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z, glm::uint16 w)
|
||||
{
|
||||
glm::uint64 REG1(x);
|
||||
|
@ -329,12 +321,12 @@ namespace detail
|
|||
|
||||
GLM_FUNC_QUALIFIER uint16 bitfieldInterleave(uint8 x, uint8 y)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint8, uint16>(x, y);
|
||||
return detail::bitfieldInterleave(x, y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER uint16 bitfieldInterleave(u8vec2 const& v)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint8, uint16>(v.x, v.y);
|
||||
return detail::bitfieldInterleave(v.x, v.y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER u8vec2 bitfieldDeinterleave(glm::uint16 x)
|
||||
|
@ -383,12 +375,12 @@ namespace detail
|
|||
|
||||
GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint16 x, uint16 y)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint16, uint32>(x, y);
|
||||
return detail::bitfieldInterleave(x, y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave(u16vec2 const& v)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint16, uint32>(v.x, v.y);
|
||||
return detail::bitfieldInterleave(v.x, v.y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER glm::u16vec2 bitfieldDeinterleave(glm::uint32 x)
|
||||
|
@ -437,12 +429,12 @@ namespace detail
|
|||
|
||||
GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint32 x, uint32 y)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint32, uint64>(x, y);
|
||||
return detail::bitfieldInterleave(x, y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(u32vec2 const& v)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint32, uint64>(v.x, v.y);
|
||||
return detail::bitfieldInterleave(v.x, v.y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER glm::u32vec2 bitfieldDeinterleave(glm::uint64 x)
|
||||
|
@ -495,12 +487,12 @@ namespace detail
|
|||
|
||||
GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint8, uint32>(x, y, z);
|
||||
return detail::bitfieldInterleave(x, y, z);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(u8vec3 const& v)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint8, uint32>(v.x, v.y, v.z);
|
||||
return detail::bitfieldInterleave(v.x, v.y, v.z);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int16 x, int16 y, int16 z)
|
||||
|
@ -527,12 +519,12 @@ namespace detail
|
|||
|
||||
GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint32, uint64>(x, y, z);
|
||||
return detail::bitfieldInterleave(x, y, z);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(u16vec3 const& v)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint32, uint64>(v.x, v.y, v.z);
|
||||
return detail::bitfieldInterleave(v.x, v.y, v.z);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int32 x, int32 y, int32 z)
|
||||
|
@ -559,12 +551,12 @@ namespace detail
|
|||
|
||||
GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint32, uint64>(x, y, z);
|
||||
return detail::bitfieldInterleave(x, y, z);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(u32vec3 const& v)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint32, uint64>(v.x, v.y, v.z);
|
||||
return detail::bitfieldInterleave(v.x, v.y, v.z);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w)
|
||||
|
@ -592,12 +584,12 @@ namespace detail
|
|||
|
||||
GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint8, uint32>(x, y, z, w);
|
||||
return detail::bitfieldInterleave(x, y, z, w);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER uint32 bitfieldInterleave(u8vec4 const& v)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint8, uint32>(v.x, v.y, v.z, v.w);
|
||||
return detail::bitfieldInterleave(v.x, v.y, v.z, v.w);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w)
|
||||
|
@ -625,11 +617,11 @@ namespace detail
|
|||
|
||||
GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint16, uint64>(x, y, z, w);
|
||||
return detail::bitfieldInterleave(x, y, z, w);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER uint64 bitfieldInterleave(u16vec4 const& v)
|
||||
{
|
||||
return detail::bitfieldInterleave<uint16, uint64>(v.x, v.y, v.z, v.w);
|
||||
return detail::bitfieldInterleave(v.x, v.y, v.z, v.w);
|
||||
}
|
||||
}//namespace glm
|
||||
|
|
|
@ -6,23 +6,21 @@
|
|||
|
||||
namespace glm
|
||||
{
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER bool epsilonEqual
|
||||
(
|
||||
float const& x,
|
||||
float const& y,
|
||||
float const& epsilon
|
||||
float x,
|
||||
float y,
|
||||
float epsilon
|
||||
)
|
||||
{
|
||||
return abs(x - y) < epsilon;
|
||||
}
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER bool epsilonEqual
|
||||
(
|
||||
double const& x,
|
||||
double const& y,
|
||||
double const& epsilon
|
||||
double x,
|
||||
double y,
|
||||
double epsilon
|
||||
)
|
||||
{
|
||||
return abs(x - y) < epsilon;
|
||||
|
@ -40,14 +38,12 @@ namespace glm
|
|||
return lessThan(abs(x - y), vec<L, T, Q>(epsilon));
|
||||
}
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER bool epsilonNotEqual(float const& x, float const& y, float const& epsilon)
|
||||
GLM_FUNC_QUALIFIER bool epsilonNotEqual(float x, float y, float epsilon)
|
||||
{
|
||||
return abs(x - y) >= epsilon;
|
||||
}
|
||||
|
||||
template<>
|
||||
GLM_FUNC_QUALIFIER bool epsilonNotEqual(double const& x, double const& y, double const& epsilon)
|
||||
GLM_FUNC_QUALIFIER bool epsilonNotEqual(double x, double y, double epsilon)
|
||||
{
|
||||
return abs(x - y) >= epsilon;
|
||||
}
|
||||
|
|
|
@ -6,169 +6,30 @@ namespace glm
|
|||
{
|
||||
/// @addtogroup gtc_type_ptr
|
||||
/// @{
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(vec<1, T, Q> const& v)
|
||||
template<length_t L,typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(vec<L, T, Q>& v)
|
||||
{
|
||||
return &(v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(vec<1, T, Q>& v)
|
||||
template<glm::length_t L,typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(vec<L, T, Q> const& v)
|
||||
{
|
||||
return &(v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(vec<2, T, Q> const& v)
|
||||
{
|
||||
return &(v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(vec<2, T, Q>& v)
|
||||
{
|
||||
return &(v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const * value_ptr(vec<3, T, Q> const& v)
|
||||
{
|
||||
return &(v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(vec<3, T, Q>& v)
|
||||
{
|
||||
return &(v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(vec<4, T, Q> const& v)
|
||||
{
|
||||
return &(v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(vec<4, T, Q>& v)
|
||||
{
|
||||
return &(v.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 2, T, Q> const& m)
|
||||
template<length_t C,length_t R,typename T,qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(mat<C,R,T,Q>& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 2, T, Q>& m)
|
||||
template<length_t C,length_t R,typename T,qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(mat<C,R,T,Q> const& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 3, T, Q> const& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 3, T, Q>& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 4, T, Q> const& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(mat<4, 4, T, Q>& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 3, T, Q> const& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 3, T, Q>& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 2, T, Q> const& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 2, T, Q>& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 4, T, Q> const& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 4, T, Q>& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 2, T, Q> const& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(mat<4, 2, T, Q>& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 4, T, Q> const& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 4, T, Q>& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 3, T, Q> const& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T * value_ptr(mat<4, 3, T, Q>& m)
|
||||
{
|
||||
return &(m[0].x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T const * value_ptr(qua<T, Q> const& q)
|
||||
{
|
||||
return &(q[0]);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER T* value_ptr(qua<T, Q>& q)
|
||||
{
|
||||
|
|
|
@ -13,36 +13,15 @@ namespace glm
|
|||
return Origin + (Source - Origin) * Distance;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<2, T, Q> extend
|
||||
template<length_t L,typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<L, T, Q> extend
|
||||
(
|
||||
vec<2, T, Q> const& Origin,
|
||||
vec<2, T, Q> const& Source,
|
||||
vec<L, T, Q> const& Origin,
|
||||
vec<L, T, Q> const& Source,
|
||||
T const& Distance
|
||||
)
|
||||
{
|
||||
return Origin + (Source - Origin) * Distance;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<3, T, Q> extend
|
||||
(
|
||||
vec<3, T, Q> const& Origin,
|
||||
vec<3, T, Q> const& Source,
|
||||
T const& Distance
|
||||
)
|
||||
{
|
||||
return Origin + (Source - Origin) * Distance;
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER vec<4, T, Q> extend
|
||||
(
|
||||
vec<4, T, Q> const& Origin,
|
||||
vec<4, T, Q> const& Source,
|
||||
T const& Distance
|
||||
)
|
||||
{
|
||||
return Origin + (Source - Origin) * Distance;
|
||||
}
|
||||
}//namespace glm
|
||||
|
|
|
@ -35,23 +35,6 @@ namespace glm
|
|||
T const& y,
|
||||
T const& z);
|
||||
|
||||
/// Return the minimum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_DECL C<T> min(
|
||||
C<T> const& x,
|
||||
typename C<T>::T const& y,
|
||||
typename C<T>::T const& z);
|
||||
|
||||
/// Return the minimum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_DECL C<T> min(
|
||||
C<T> const& x,
|
||||
C<T> const& y,
|
||||
C<T> const& z);
|
||||
|
||||
/// Return the minimum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T>
|
||||
GLM_FUNC_DECL T min(
|
||||
|
@ -60,24 +43,6 @@ namespace glm
|
|||
T const& z,
|
||||
T const& w);
|
||||
|
||||
/// Return the minimum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_DECL C<T> min(
|
||||
C<T> const& x,
|
||||
typename C<T>::T const& y,
|
||||
typename C<T>::T const& z,
|
||||
typename C<T>::T const& w);
|
||||
|
||||
/// Return the minimum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_DECL C<T> min(
|
||||
C<T> const& x,
|
||||
C<T> const& y,
|
||||
C<T> const& z,
|
||||
C<T> const& w);
|
||||
|
||||
/// Return the maximum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T>
|
||||
|
@ -86,22 +51,6 @@ namespace glm
|
|||
T const& y,
|
||||
T const& z);
|
||||
|
||||
/// Return the maximum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_DECL C<T> max(
|
||||
C<T> const& x,
|
||||
typename C<T>::T const& y,
|
||||
typename C<T>::T const& z);
|
||||
|
||||
/// Return the maximum component-wise values of 3 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_DECL C<T> max(
|
||||
C<T> const& x,
|
||||
C<T> const& y,
|
||||
C<T> const& z);
|
||||
|
||||
/// Return the maximum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T>
|
||||
|
@ -111,24 +60,6 @@ namespace glm
|
|||
T const& z,
|
||||
T const& w);
|
||||
|
||||
/// Return the maximum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_DECL C<T> max(
|
||||
C<T> const& x,
|
||||
typename C<T>::T const& y,
|
||||
typename C<T>::T const& z,
|
||||
typename C<T>::T const& w);
|
||||
|
||||
/// Return the maximum component-wise values of 4 inputs
|
||||
/// @see gtx_extented_min_max
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_DECL C<T> max(
|
||||
C<T> const& x,
|
||||
C<T> const& y,
|
||||
C<T> const& z,
|
||||
C<T> const& w);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
||||
|
|
|
@ -2,137 +2,40 @@
|
|||
|
||||
namespace glm
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
GLM_FUNC_QUALIFIER T min(
|
||||
T const& x,
|
||||
T const& y,
|
||||
T const& z)
|
||||
{
|
||||
return glm::min(glm::min(x, y), z);
|
||||
}
|
||||
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_QUALIFIER C<T> min
|
||||
(
|
||||
C<T> const& x,
|
||||
typename C<T>::T const& y,
|
||||
typename C<T>::T const& z
|
||||
)
|
||||
{
|
||||
return glm::min(glm::min(x, y), z);
|
||||
}
|
||||
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_QUALIFIER C<T> min
|
||||
(
|
||||
C<T> const& x,
|
||||
C<T> const& y,
|
||||
C<T> const& z
|
||||
)
|
||||
{
|
||||
return glm::min(glm::min(x, y), z);
|
||||
T const& z) {
|
||||
return glm::min(glm::min(x, y),z);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
GLM_FUNC_QUALIFIER T min
|
||||
(
|
||||
GLM_FUNC_QUALIFIER T min(
|
||||
T const& x,
|
||||
T const& y,
|
||||
T const& z,
|
||||
T const& w
|
||||
)
|
||||
{
|
||||
return glm::min(glm::min(x, y), glm::min(z, w));
|
||||
T const& w) {
|
||||
return glm::min(glm::min(x, y),glm::min(z,w));
|
||||
}
|
||||
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_QUALIFIER C<T> min
|
||||
(
|
||||
C<T> const& x,
|
||||
typename C<T>::T const& y,
|
||||
typename C<T>::T const& z,
|
||||
typename C<T>::T const& w
|
||||
)
|
||||
{
|
||||
return glm::min(glm::min(x, y), glm::min(z, w));
|
||||
}
|
||||
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_QUALIFIER C<T> min
|
||||
(
|
||||
C<T> const& x,
|
||||
C<T> const& y,
|
||||
C<T> const& z,
|
||||
C<T> const& w
|
||||
)
|
||||
{
|
||||
return glm::min(glm::min(x, y), glm::min(z, w));
|
||||
template<typename T>
|
||||
GLM_FUNC_QUALIFIER T max(
|
||||
T const& x,
|
||||
T const& y,
|
||||
T const& z) {
|
||||
return glm::max(glm::max(x, y),z);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
GLM_FUNC_QUALIFIER T max(
|
||||
T const& x,
|
||||
T const& y,
|
||||
T const& z)
|
||||
{
|
||||
return glm::max(glm::max(x, y), z);
|
||||
}
|
||||
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_QUALIFIER C<T> max
|
||||
(
|
||||
C<T> const& x,
|
||||
typename C<T>::T const& y,
|
||||
typename C<T>::T const& z
|
||||
)
|
||||
{
|
||||
return glm::max(glm::max(x, y), z);
|
||||
}
|
||||
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_QUALIFIER C<T> max
|
||||
(
|
||||
C<T> const& x,
|
||||
C<T> const& y,
|
||||
C<T> const& z
|
||||
)
|
||||
{
|
||||
return glm::max(glm::max(x, y), z);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
GLM_FUNC_QUALIFIER T max
|
||||
(
|
||||
T const& x,
|
||||
T const& y,
|
||||
T const& z,
|
||||
T const& w
|
||||
)
|
||||
{
|
||||
return glm::max(glm::max(x, y), glm::max(z, w));
|
||||
T const& w) {
|
||||
return glm::max(glm::max(x, y),glm::max(z,w));
|
||||
}
|
||||
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_QUALIFIER C<T> max
|
||||
(
|
||||
C<T> const& x,
|
||||
typename C<T>::T const& y,
|
||||
typename C<T>::T const& z,
|
||||
typename C<T>::T const& w
|
||||
)
|
||||
{
|
||||
return glm::max(glm::max(x, y), glm::max(z, w));
|
||||
}
|
||||
|
||||
template<typename T, template<typename> class C>
|
||||
GLM_FUNC_QUALIFIER C<T> max
|
||||
(
|
||||
C<T> const& x,
|
||||
C<T> const& y,
|
||||
C<T> const& z,
|
||||
C<T> const& w
|
||||
)
|
||||
{
|
||||
return glm::max(glm::max(x, y), glm::max(z, w));
|
||||
}
|
||||
}//namespace glm
|
||||
|
|
|
@ -41,17 +41,17 @@
|
|||
#include "../mat4x4.hpp"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// MSVC uses _MSVC_LANG instead of __cplusplus
|
||||
#if _MSVC_LANG < 201103L
|
||||
#pragma message("GLM_GTX_hash requires C++11 standard library support")
|
||||
#endif
|
||||
// MSVC uses _MSVC_LANG instead of __cplusplus
|
||||
#if _MSVC_LANG < 201103L
|
||||
#pragma message("GLM_GTX_hash requires C++11 standard library support")
|
||||
#endif
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
// GNU and Clang use __cplusplus
|
||||
#if __cplusplus < 201103L
|
||||
#pragma message("GLM_GTX_hash requires C++11 standard library support")
|
||||
#endif
|
||||
// GNU and Clang use __cplusplus
|
||||
#if __cplusplus < 201103L
|
||||
#pragma message("GLM_GTX_hash requires C++11 standard library support")
|
||||
#endif
|
||||
#else
|
||||
#error "Unknown compiler"
|
||||
#error "Unknown compiler"
|
||||
#endif
|
||||
|
||||
#if GLM_LANG & GLM_LANG_CXX11
|
||||
|
@ -93,62 +93,27 @@ namespace std
|
|||
template<typename T, glm::qualifier Q>
|
||||
struct hash<glm::tdualquat<T, Q> >
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(glm::tdualquat<T,Q> const& q) const GLM_NOEXCEPT;
|
||||
GLM_FUNC_DECL size_t operator()(glm::tdualquat<T, Q> const& q) const GLM_NOEXCEPT;
|
||||
};
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<2, 2, T, Q> >
|
||||
template<glm::length_t R,typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<2, R, T, Q> >
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<2, 2, T,Q> const& m) const GLM_NOEXCEPT;
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<2, R, T, Q> const& m) const GLM_NOEXCEPT;
|
||||
};
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<2, 3, T, Q> >
|
||||
template<glm::length_t R,typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<3, R, T, Q> >
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<2, 3, T,Q> const& m) const GLM_NOEXCEPT;
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<3, R, T, Q> const& m) const GLM_NOEXCEPT;
|
||||
};
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<2, 4, T, Q> >
|
||||
template<glm::length_t R,typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<4, R, T, Q> >
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<2, 4, T,Q> const& m) const GLM_NOEXCEPT;
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<4, R, T, Q> const& m) const GLM_NOEXCEPT;
|
||||
};
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<3, 2, T, Q> >
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<3, 2, T,Q> const& m) const GLM_NOEXCEPT;
|
||||
};
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<3, 3, T, Q> >
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<3, 3, T,Q> const& m) const GLM_NOEXCEPT;
|
||||
};
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<3, 4, T, Q> >
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<3, 4, T,Q> const& m) const GLM_NOEXCEPT;
|
||||
};
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<4, 2, T, Q> >
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<4, 2, T,Q> const& m) const GLM_NOEXCEPT;
|
||||
};
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<4, 3, T, Q> >
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<4, 3, T,Q> const& m) const GLM_NOEXCEPT;
|
||||
};
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
struct hash<glm::mat<4, 4, T, Q> >
|
||||
{
|
||||
GLM_FUNC_DECL size_t operator()(glm::mat<4, 4, T,Q> const& m) const GLM_NOEXCEPT;
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
#include "hash.inl"
|
||||
|
|
102
glm/gtx/hash.inl
102
glm/gtx/hash.inl
|
@ -1,17 +1,18 @@
|
|||
/// @ref gtx_hash
|
||||
|
||||
namespace glm {
|
||||
namespace detail
|
||||
{
|
||||
GLM_INLINE void hash_combine(size_t &seed, size_t hash)
|
||||
namespace detail
|
||||
{
|
||||
hash += 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
seed ^= hash;
|
||||
GLM_INLINE void hash_combine(size_t& seed, size_t hash)
|
||||
{
|
||||
hash += 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
seed ^= hash;
|
||||
}
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
namespace std {
|
||||
|
||||
namespace std
|
||||
{
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::vec<1, T, Q> >::operator()(glm::vec<1, T, Q> const& v) const GLM_NOEXCEPT
|
||||
{
|
||||
|
@ -53,7 +54,7 @@ namespace std
|
|||
}
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::qua<T, Q> >::operator()(glm::qua<T,Q> const& q) const GLM_NOEXCEPT
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::qua<T, Q> >::operator()(glm::qua<T, Q> const& q) const GLM_NOEXCEPT
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<T> hasher;
|
||||
|
@ -74,74 +75,32 @@ namespace std
|
|||
return seed;
|
||||
}
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<2, 2, T, Q> >::operator()(glm::mat<2, 2, T, Q> const& m) const GLM_NOEXCEPT
|
||||
template<glm::length_t R, typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<2, R, T, Q> >::operator()(glm::mat<2, R, T, Q> const& m) const GLM_NOEXCEPT
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<glm::vec<2, T, Q> > hasher;
|
||||
hash<glm::vec<R, T, Q> > hasher;
|
||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||
return seed;
|
||||
}
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<2, 3, T, Q> >::operator()(glm::mat<2, 3, T, Q> const& m) const GLM_NOEXCEPT
|
||||
template<glm::length_t R, typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<3, R, T, Q> >::operator()(glm::mat<3, R, T, Q> const& m) const GLM_NOEXCEPT
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<glm::vec<3, T, Q> > hasher;
|
||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||
return seed;
|
||||
}
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<2, 4, T, Q> >::operator()(glm::mat<2, 4, T, Q> const& m) const GLM_NOEXCEPT
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<glm::vec<4, T, Q> > hasher;
|
||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||
return seed;
|
||||
}
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<3, 2, T, Q> >::operator()(glm::mat<3, 2, T, Q> const& m) const GLM_NOEXCEPT
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<glm::vec<2, T, Q> > hasher;
|
||||
hash<glm::vec<R, T, Q> > hasher;
|
||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||
return seed;
|
||||
}
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<3, 3, T, Q> >::operator()(glm::mat<3, 3, T, Q> const& m) const GLM_NOEXCEPT
|
||||
template<glm::length_t R, typename T, glm::qualifier Q >
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<4, R, T, Q> >::operator()(glm::mat<4, R, T, Q> const& m) const GLM_NOEXCEPT
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<glm::vec<3, T, Q> > hasher;
|
||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||
return seed;
|
||||
}
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<3, 4, T, Q> >::operator()(glm::mat<3, 4, T, Q> const& m) const GLM_NOEXCEPT
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<glm::vec<4, T, Q> > hasher;
|
||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||
return seed;
|
||||
}
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<4, 2, T,Q> >::operator()(glm::mat<4, 2, T,Q> const& m) const GLM_NOEXCEPT
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<glm::vec<2, T, Q> > hasher;
|
||||
hash<glm::vec<R, T, Q> > hasher;
|
||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||
|
@ -149,27 +108,4 @@ namespace std
|
|||
return seed;
|
||||
}
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<4, 3, T,Q> >::operator()(glm::mat<4, 3, T,Q> const& m) const GLM_NOEXCEPT
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<glm::vec<3, T, Q> > hasher;
|
||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||
glm::detail::hash_combine(seed, hasher(m[3]));
|
||||
return seed;
|
||||
}
|
||||
|
||||
template<typename T, glm::qualifier Q>
|
||||
GLM_FUNC_QUALIFIER size_t hash<glm::mat<4, 4, T,Q> >::operator()(glm::mat<4, 4, T, Q> const& m) const GLM_NOEXCEPT
|
||||
{
|
||||
size_t seed = 0;
|
||||
hash<glm::vec<4, T, Q> > hasher;
|
||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||
glm::detail::hash_combine(seed, hasher(m[3]));
|
||||
return seed;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,53 +31,62 @@ namespace glm
|
|||
template<typename T>
|
||||
struct type
|
||||
{
|
||||
static bool const is_vec = false;
|
||||
static bool const is_mat = false;
|
||||
static bool const is_quat = false;
|
||||
static length_t const components = 0;
|
||||
static length_t const cols = 0;
|
||||
static length_t const rows = 0;
|
||||
enum {
|
||||
is_vec = false,
|
||||
is_mat = false,
|
||||
is_quat = false,
|
||||
components = 0,
|
||||
cols = 0,
|
||||
rows = 0
|
||||
};
|
||||
};
|
||||
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
struct type<vec<L, T, Q> >
|
||||
{
|
||||
static bool const is_vec = true;
|
||||
static bool const is_mat = false;
|
||||
static bool const is_quat = false;
|
||||
static length_t const components = L;
|
||||
enum {
|
||||
is_vec = true,
|
||||
is_mat = false,
|
||||
is_quat = false,
|
||||
components = L
|
||||
};
|
||||
};
|
||||
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
struct type<mat<C, R, T, Q> >
|
||||
{
|
||||
static bool const is_vec = false;
|
||||
static bool const is_mat = true;
|
||||
static bool const is_quat = false;
|
||||
static length_t const components = C;
|
||||
static length_t const cols = C;
|
||||
static length_t const rows = R;
|
||||
enum {
|
||||
is_vec = false,
|
||||
is_mat = true,
|
||||
is_quat = false,
|
||||
components = C,
|
||||
cols = C,
|
||||
rows = R
|
||||
};
|
||||
};
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
struct type<qua<T, Q> >
|
||||
{
|
||||
static bool const is_vec = false;
|
||||
static bool const is_mat = false;
|
||||
static bool const is_quat = true;
|
||||
static length_t const components = 4;
|
||||
enum {
|
||||
is_vec = false,
|
||||
is_mat = false,
|
||||
is_quat = true,
|
||||
components = 4
|
||||
};
|
||||
};
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
struct type<tdualquat<T, Q> >
|
||||
{
|
||||
static bool const is_vec = false;
|
||||
static bool const is_mat = false;
|
||||
static bool const is_quat = true;
|
||||
static length_t const components = 8;
|
||||
enum {
|
||||
is_vec = false,
|
||||
is_mat = false,
|
||||
is_quat = true,
|
||||
components = 8
|
||||
};
|
||||
};
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
||||
#include "type_trait.inl"
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
/// @ref gtx_type_trait
|
||||
|
||||
namespace glm
|
||||
{
|
||||
template<typename T>
|
||||
bool const type<T>::is_vec;
|
||||
template<typename T>
|
||||
bool const type<T>::is_mat;
|
||||
template<typename T>
|
||||
bool const type<T>::is_quat;
|
||||
template<typename T>
|
||||
length_t const type<T>::components;
|
||||
template<typename T>
|
||||
length_t const type<T>::cols;
|
||||
template<typename T>
|
||||
length_t const type<T>::rows;
|
||||
|
||||
// vec
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
bool const type<vec<L, T, Q> >::is_vec;
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
bool const type<vec<L, T, Q> >::is_mat;
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
bool const type<vec<L, T, Q> >::is_quat;
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
length_t const type<vec<L, T, Q> >::components;
|
||||
|
||||
// mat
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
bool const type<mat<C, R, T, Q> >::is_vec;
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
bool const type<mat<C, R, T, Q> >::is_mat;
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
bool const type<mat<C, R, T, Q> >::is_quat;
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
length_t const type<mat<C, R, T, Q> >::components;
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
length_t const type<mat<C, R, T, Q> >::cols;
|
||||
template<length_t C, length_t R, typename T, qualifier Q>
|
||||
length_t const type<mat<C, R, T, Q> >::rows;
|
||||
|
||||
// tquat
|
||||
template<typename T, qualifier Q>
|
||||
bool const type<qua<T, Q> >::is_vec;
|
||||
template<typename T, qualifier Q>
|
||||
bool const type<qua<T, Q> >::is_mat;
|
||||
template<typename T, qualifier Q>
|
||||
bool const type<qua<T, Q> >::is_quat;
|
||||
template<typename T, qualifier Q>
|
||||
length_t const type<qua<T, Q> >::components;
|
||||
|
||||
// tdualquat
|
||||
template<typename T, qualifier Q>
|
||||
bool const type<tdualquat<T, Q> >::is_vec;
|
||||
template<typename T, qualifier Q>
|
||||
bool const type<tdualquat<T, Q> >::is_mat;
|
||||
template<typename T, qualifier Q>
|
||||
bool const type<tdualquat<T, Q> >::is_quat;
|
||||
template<typename T, qualifier Q>
|
||||
length_t const type<tdualquat<T, Q> >::components;
|
||||
}//namespace glm
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
|||
#if __cplusplus >= 201103L
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSVC_LANG >= 201103L)
|
||||
|
||||
#include <glm/detail/setup.hpp>
|
||||
|
||||
|
|
|
@ -6,6 +6,27 @@ int main()
|
|||
int Error = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
glm::ivec2 const v(1, 2);
|
||||
Error += xx(v).x != xx(v).y;
|
||||
Error += yy(v).x != yy(v).y;
|
||||
}
|
||||
|
||||
{
|
||||
glm::ivec3 const v(1, 2, 3);
|
||||
Error += zyx(v) != glm::ivec3(3, 2, 1);
|
||||
}
|
||||
|
||||
{
|
||||
glm::ivec4 const v(1, 2, 3, 4);
|
||||
Error += wwww(v) != glm::ivec4(4);
|
||||
Error += wzyx(v) != glm::ivec4(4,3,2,1);
|
||||
|
||||
}
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
|
|
209
util/generate_common_mat_operators.py
Normal file
209
util/generate_common_mat_operators.py
Normal file
|
@ -0,0 +1,209 @@
|
|||
import itertools
|
||||
import sys
|
||||
|
||||
def make_unary_minus(column_count,filename):
|
||||
mat_def = f"mat<{column_count},R,T,Q>"
|
||||
sys.stdout = open(f"{filename}.hpp", 'a')
|
||||
print(f"""
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR {mat_def} operator-({mat_def} const& m);
|
||||
""" ,end="")
|
||||
sys.stdout.close()
|
||||
|
||||
sys.stdout = open(f"{filename}.inl", 'a')
|
||||
print(f"""
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR {mat_def} operator-({mat_def} const& m) {{
|
||||
return {mat_def}({",".join([f"-m[{i}]" for i in range(0,column_count)])});
|
||||
}}
|
||||
""" ,end="")
|
||||
sys.stdout.close()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def make_prefix_incr_decr_funcs(column_count,filename):
|
||||
op_symbols = ["++","--"]
|
||||
sys.stdout = open(f"{filename}.hpp", 'a')
|
||||
mat_def = f"mat<{column_count},R,T,Q>"
|
||||
for op_symbol in op_symbols:
|
||||
print(f"""
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR {mat_def}& operator{op_symbol}({mat_def}& m);
|
||||
""" ,end="")
|
||||
sys.stdout.close()
|
||||
|
||||
sys.stdout = open(f"{filename}.inl", 'a')
|
||||
for op_symbol in op_symbols:
|
||||
print(f"""
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR {mat_def}& operator{op_symbol}({mat_def}& m) {{
|
||||
{" ".join([f"{op_symbol}m[{i}];" + ("\n" if i != column_count-1 else "") for i in range(0,column_count)])}
|
||||
return m;
|
||||
}}
|
||||
""" ,end="")
|
||||
sys.stdout.close()
|
||||
|
||||
|
||||
|
||||
|
||||
def make_equality_funcs(column_count,filename):
|
||||
sys.stdout = open(f"{filename}.hpp", 'a')
|
||||
mat_def = f"mat<{column_count},R,T,Q>"
|
||||
print(f"""
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==({mat_def} const& m1, {mat_def} const& m2);
|
||||
""" ,end="")
|
||||
sys.stdout.close()
|
||||
|
||||
sys.stdout = open(f"{filename}.inl", 'a')
|
||||
print(f"""
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==({mat_def} const& m1, {mat_def} const& m2) {{
|
||||
return {" && ".join([f"(m1[{i}] == m2[{i}])" for i in range(0,column_count)])};
|
||||
}}
|
||||
""" ,end="")
|
||||
sys.stdout.close()
|
||||
|
||||
def make_binary_scalar_funcs(op_symbols,column_count,filename):
|
||||
mat_def = f"mat<{column_count},R,T,Q>"
|
||||
col_range = range(0,column_count)
|
||||
template = """
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<{column_count},R, T, Q> operator{op_symbol}(mat<{column_count},R, T, Q> const& m, T scalar);
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR mat<{column_count},R, T, Q> operator{op_symbol}(T scalar,mat<{column_count},R, T, Q> const& m);
|
||||
"""
|
||||
sys.stdout = open(f"{filename}.hpp", 'a')
|
||||
for op_symbol in op_symbols:
|
||||
print(template.format(
|
||||
op_symbol= op_symbol,
|
||||
column_count= column_count
|
||||
),end="")
|
||||
sys.stdout.close()
|
||||
|
||||
|
||||
sys.stdout = open(f"{filename}.inl", 'a')
|
||||
for op_symbol in op_symbols:
|
||||
print(f"""
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<{column_count},R, T, Q> operator{op_symbol}(mat<{column_count},R, T, Q> const& m, T scalar) {{
|
||||
return mat<{column_count},R,T,Q>({",".join([f"m[{i}] {op_symbol} scalar" for i in range(0,column_count)])});
|
||||
}}
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<{column_count},R, T, Q> operator{op_symbol}(T scalar,mat<{column_count},R, T, Q> const& m) {{
|
||||
return mat<{column_count},R,T,Q>({",".join([f"scalar {op_symbol} m[{i}]" for i in range(0,column_count)])});
|
||||
}}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR {mat_def}& operator{op_symbol}=({mat_def}& m, U scalar) {{
|
||||
{" ".join([f"m[{i}] {op_symbol}= scalar;" + ("\n" if i != col_range.stop-1 else "") for i in col_range])}
|
||||
return m;
|
||||
}}
|
||||
""",end="")
|
||||
sys.stdout.close()
|
||||
|
||||
|
||||
def make_binary_mat_funcs(op_symbols,column_count,filename):
|
||||
col_range = range(0,column_count)
|
||||
mat_def = f"mat<{column_count},R,T,Q>"
|
||||
mat_def_U = f"mat<{column_count},R,U,Q>"
|
||||
|
||||
sys.stdout = open(f"{filename}.hpp", 'a')
|
||||
for op_symbol in op_symbols:
|
||||
|
||||
print(f"""
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR {mat_def} operator{op_symbol}({mat_def} const& m1, {mat_def} const& m2);
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR {mat_def}& operator{op_symbol}=({mat_def}& m1, {mat_def_U} const& m2);
|
||||
""",end="")
|
||||
sys.stdout.close()
|
||||
|
||||
|
||||
sys.stdout = open(f"{filename}.inl", 'a')
|
||||
for op_symbol in op_symbols:
|
||||
print(f"""
|
||||
template<length_t R, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR {mat_def} operator{op_symbol}({mat_def} const& m1, {mat_def} const& m2) {{
|
||||
return {mat_def}({",".join([f"m1[{i}] {op_symbol} m2[{i}]" for i in col_range])});
|
||||
}}
|
||||
template<length_t R, typename T, qualifier Q,typename U>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR {mat_def}& operator{op_symbol}=({mat_def}& m1, {mat_def_U} const& m2) {{
|
||||
{" ".join([f"m1[{i}] {op_symbol}= m2[{i}];" + ("\n" if i != col_range.stop-1 else "") for i in col_range])}
|
||||
return m1;
|
||||
}}
|
||||
""",end="")
|
||||
sys.stdout.close()
|
||||
|
||||
|
||||
def make_scalar_commutative_operators(op_symbols,filename):
|
||||
template = """
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator{op_symbol}(T scalar,vec<L, T, Q> const& v);
|
||||
"""
|
||||
sys.stdout = open(f"{filename}.hpp", 'a')
|
||||
for op_symbol in op_symbols:
|
||||
print(template.format(
|
||||
op_symbol= op_symbol
|
||||
),end="")
|
||||
sys.stdout.close()
|
||||
|
||||
template = """
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator{op_symbol}(T scalar,vec<L, T, Q> const& v) {{
|
||||
return v {op_symbol} scalar;
|
||||
}}
|
||||
"""
|
||||
sys.stdout = open(f"{filename}.inl", 'a')
|
||||
for op_symbol in op_symbols:
|
||||
print(template.format(
|
||||
op_symbol= op_symbol
|
||||
),end="")
|
||||
sys.stdout.close()
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
for C in range(2,5):
|
||||
filename = f"mat{C}xR_common_operators"
|
||||
sys.stdout = open(f"{filename}.hpp",'w')
|
||||
print("""
|
||||
#pragma once
|
||||
#include "qualifier.hpp"
|
||||
#include "mat_common_operators.hpp"
|
||||
namespace glm {
|
||||
""")
|
||||
sys.stdout.close()
|
||||
|
||||
sys.stdout = open(f"{filename}.inl",'w')
|
||||
print("""
|
||||
namespace glm {
|
||||
""")
|
||||
sys.stdout.close()
|
||||
|
||||
make_unary_minus(C,filename)
|
||||
make_prefix_incr_decr_funcs(C,filename)
|
||||
make_equality_funcs(C,filename)
|
||||
make_binary_mat_funcs(['+', '-'],C,filename)
|
||||
make_binary_scalar_funcs(['+', '-', '*','/'],C,filename)
|
||||
|
||||
sys.stdout = open(f"{filename}.hpp",'a')
|
||||
print(f"""
|
||||
}}
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
#include "{filename}.inl"
|
||||
#endif
|
||||
""")
|
||||
sys.stdout.close()
|
||||
|
||||
|
||||
sys.stdout = open(f"{filename}.inl",'a')
|
||||
print("""
|
||||
}
|
||||
""")
|
||||
sys.stdout.close()
|
||||
|
||||
#make_scalar_commutative_operators(['+', '*'],"mat")
|
99
util/generate_common_vector_operators.py
Normal file
99
util/generate_common_vector_operators.py
Normal file
|
@ -0,0 +1,99 @@
|
|||
import itertools
|
||||
import sys
|
||||
|
||||
def write_to_file(text,filename,mode='a'):
|
||||
with open(filename,mode) as file:
|
||||
file.write(text)
|
||||
|
||||
def make_binary_funcs(filename,op_symbols):
|
||||
for op_symbol in op_symbols:
|
||||
write_to_file(f"""
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L, T, Q>& operator{op_symbol}=(vec<L, T, Q>& a, vec<1,U,P> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator{op_symbol}(vec<L, T, Q> const& a, vec<1,T,Q> const& b);
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator{op_symbol}(vec<1, T, Q> const& a, vec<L,T,Q> const& b);
|
||||
""",f"{filename}.hpp")
|
||||
write_to_file(f"""
|
||||
template<length_t L, typename T, qualifier Q,typename U,qualifier P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q>& operator{op_symbol}=(vec<L, T, Q>& a, vec<1,U,P> const& b) {{
|
||||
return a {op_symbol}= b.x;
|
||||
}}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator{op_symbol}(vec<L, T, Q> const& a, vec<1,T,Q> const& b) {{
|
||||
return a {op_symbol} b.x;
|
||||
}}
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator{op_symbol}(vec<1, T, Q> const& a, vec<L,T,Q> const& b) {{
|
||||
return a.x {op_symbol} b;
|
||||
}}
|
||||
""",f"{filename}.inl")
|
||||
|
||||
|
||||
def make_scalar_commutative_operators(filename,op_symbols):
|
||||
for op_symbol in op_symbols:
|
||||
write_to_file(f"""
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> operator{op_symbol}(T scalar,vec<L, T, Q> const& v);
|
||||
""",f"{filename}.hpp")
|
||||
write_to_file(f"""
|
||||
template<length_t L, typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> operator{op_symbol}(T scalar,vec<L, T, Q> const& v) {{
|
||||
return v {op_symbol} scalar;
|
||||
}}""",f"{filename}.inl")
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
filename = "vec_common_operators"
|
||||
write_to_file("""#pragma once
|
||||
#include "qualifier.hpp"
|
||||
namespace glm {
|
||||
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L,T,Q> operator++(vec<L,T,Q>& v,int);
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_DISCARD_DECL GLM_CONSTEXPR vec<L,T,Q> operator--(vec<L,T,Q>& v,int);
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR vec<L,T,Q> operator+(vec<L,T,Q> const& v);
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<L,T,Q> const& a,vec<L,T,Q> const& b);
|
||||
""",f"{filename}.hpp",'w')
|
||||
|
||||
write_to_file("""namespace glm {
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L,T,Q> operator++(vec<L,T,Q>& v,int) {{
|
||||
const vec<L,T,Q> Result(v);
|
||||
++v;
|
||||
return Result;
|
||||
}}
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L,T,Q> operator--(vec<L,T,Q>& v,int) {
|
||||
const vec<L,T,Q> Result(v);
|
||||
--v;
|
||||
return Result;
|
||||
}
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L,T,Q> operator+(vec<L,T,Q> const& v) {
|
||||
return v;
|
||||
}
|
||||
template<length_t L,typename T,qualifier Q>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(vec<L,T,Q> const& a,vec<L,T,Q> const& b) {
|
||||
return !(a == b);
|
||||
}
|
||||
""",f"{filename}.inl",'w')
|
||||
make_binary_funcs(filename,['+', '-', '*', '/', '%', '&', '|', '^', '<<', '>>'])
|
||||
make_scalar_commutative_operators(filename,['+', '*', '&', '|', '^'])
|
||||
|
||||
write_to_file("""
|
||||
} // namespace glm
|
||||
""",f"{filename}.inl")
|
||||
|
||||
write_to_file(f"""}} // namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
#include "{filename}.inl"
|
||||
#endif
|
||||
""",f"{filename}.hpp")
|
18
util/generate_swizzle_functions.py
Normal file
18
util/generate_swizzle_functions.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import itertools
|
||||
|
||||
def make_swizzlers(letters, vector_length):
|
||||
if vector_length == 4:
|
||||
template = "template<typename T, qualifier Q> GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<{vector_length},T,Q> {function_name}(vec<4,T,Q> const& v) {{ return vec<4,T,Q>({swizzle}); }}"
|
||||
else:
|
||||
template = "template<length_t L, typename T, qualifier Q> GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<{vector_length},T,Q> {function_name}(vec<L,T,Q> const& v) {{ return vec<{vector_length},T,Q>({swizzle}); }}"
|
||||
for perm in itertools.product(letters, repeat=vector_length):
|
||||
print(template.format(
|
||||
vector_length=vector_length,
|
||||
function_name=''.join(perm),
|
||||
swizzle=', '.join([f'v.{i}' for i in perm])
|
||||
))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
for i in range(2,5):
|
||||
make_swizzlers(['x', 'y', 'z', 'w'], i)
|
Loading…
Add table
Reference in a new issue