Simplify swizzling implementation into one swizzle class

master
athile ago%!(EXTRA string=14 years)
parent 44bd721a41
commit 6d83744b39
  1. 1325
      glm/core/_swizzle.hpp
  2. 12
      glm/core/type_vec2.hpp
  3. 12
      glm/core/type_vec3.hpp
  4. 12
      glm/core/type_vec4.hpp

File diff suppressed because it is too large Load Diff

@ -115,17 +115,7 @@ namespace detail
tvec2(tref2<T> const & r);
template <int E0, int E1>
GLM_FUNC_DECL tvec2(glm::detail::swizzle2<T,tvec2<T>,E0,E1>& that)
{
*this = that();
}
template <int E0, int E1>
GLM_FUNC_DECL tvec2(glm::detail::swizzle3_2<T,tvec2<T>,E0,E1>& that)
{
*this = that();
}
template <int E0, int E1>
GLM_FUNC_DECL tvec2(glm::detail::swizzle4_2<T,tvec2<T>,E0,E1>& that)
GLM_FUNC_DECL tvec2(const glm::detail::swizzle<2,T,tvec2<T>,E0,E1,-1,-2>& that)
{
*this = that();
}

@ -117,17 +117,7 @@ namespace detail
GLM_FUNC_DECL tvec3(tref3<T> const & r);
template <int E0, int E1, int E2>
GLM_FUNC_DECL tvec3(glm::detail::swizzle2_3<T,tvec3<T>,E0,E1,E2>& that)
{
*this = that();
}
template <int E0, int E1, int E2>
GLM_FUNC_DECL tvec3(glm::detail::swizzle3<T,tvec3<T>,E0,E1,E2>& that)
{
*this = that();
}
template <int E0, int E1, int E2>
GLM_FUNC_DECL tvec3(glm::detail::swizzle4_3<T,tvec3<T>,E0,E1,E2>& that)
GLM_FUNC_DECL tvec3(const glm::detail::swizzle<3,T,tvec3<T>,E0,E1,E2,-1>& that)
{
*this = that();
}

@ -119,17 +119,7 @@ namespace detail
GLM_FUNC_DECL tvec4(tref4<T> const & r);
template <int E0, int E1, int E2, int E3>
GLM_FUNC_DECL tvec4(glm::detail::swizzle2_4<T,tvec4<T>,E0,E1,E2,E3>& that)
{
*this = that();
}
template <int E0, int E1, int E2, int E3>
GLM_FUNC_DECL tvec4(glm::detail::swizzle3_4<T,tvec4<T>,E0,E1,E2,E3>& that)
{
*this = that();
}
template <int E0, int E1, int E2, int E3>
GLM_FUNC_DECL tvec4(glm::detail::swizzle4<T,tvec4<T>,E0,E1,E2,E3>& that)
GLM_FUNC_DECL tvec4(const glm::detail::swizzle<4,T,tvec4<T>,E0,E1,E2,E3>& that)
{
*this = that();
}

Loading…
Cancel
Save