mirror of
https://github.com/g-truc/glm.git
synced 2025-04-07 06:25:00 +00:00
Simplify swizzling implementation into one swizzle class
This commit is contained in:
parent
44bd721a41
commit
6d83744b39
4 changed files with 560 additions and 801 deletions
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…
Add table
Reference in a new issue