mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
Fixed swizzle functions
This commit is contained in:
parent
66a8720bc0
commit
e298ecfe1a
@ -38,7 +38,7 @@
|
||||
#define GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \
|
||||
SWIZZLED_TYPE<TMPL_TYPE> A ## B ## C() CONST \
|
||||
{ \
|
||||
return SWIZZLED_TYPE<TMPL_TYPE>(this->A, this->B, this->B); \
|
||||
return SWIZZLED_TYPE<TMPL_TYPE>(this->A, this->B, this->C); \
|
||||
}
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \
|
||||
@ -58,7 +58,7 @@
|
||||
template <typename TMPL_TYPE> \
|
||||
SWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE>::A ## B ## C() CONST \
|
||||
{ \
|
||||
return SWIZZLED_TYPE<TMPL_TYPE>(this->A, this->B, this->B); \
|
||||
return SWIZZLED_TYPE<TMPL_TYPE>(this->A, this->B, this->C); \
|
||||
}
|
||||
|
||||
#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \
|
||||
@ -98,8 +98,8 @@
|
||||
GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B, A)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C)
|
||||
GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \
|
||||
GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C)
|
||||
|
||||
#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE) \
|
||||
GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, x, y, z) \
|
||||
|
@ -229,7 +229,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_DECL tref2(T & x, T & y);
|
||||
GLM_FUNC_DECL tref2(tref2<T> const & r);
|
||||
GLM_FUNC_DECL tref2(tvec2<T> const & v);
|
||||
GLM_FUNC_DECL explicit tref2(tvec2<T> const & v);
|
||||
|
||||
GLM_FUNC_DECL tref2<T> & operator= (tref2<T> const & r);
|
||||
GLM_FUNC_DECL tref2<T> & operator= (tvec2<T> const & v);
|
||||
|
@ -254,7 +254,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_DECL tref3(T & x, T & y, T & z);
|
||||
GLM_FUNC_DECL tref3(tref3<T> const & r);
|
||||
GLM_FUNC_DECL tref3(tvec3<T> const & v);
|
||||
GLM_FUNC_DECL explicit tref3(tvec3<T> const & v);
|
||||
|
||||
GLM_FUNC_DECL tref3<T> & operator= (tref3<T> const & r);
|
||||
GLM_FUNC_DECL tref3<T> & operator= (tvec3<T> const & v);
|
||||
|
@ -310,7 +310,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_DECL tref4(T & x, T & y, T & z, T & w);
|
||||
GLM_FUNC_DECL tref4(tref4<T> const & r);
|
||||
GLM_FUNC_DECL tref4(tvec4<T> const & v);
|
||||
GLM_FUNC_DECL explicit tref4(tvec4<T> const & v);
|
||||
|
||||
GLM_FUNC_DECL tref4<T> & operator= (tref4<T> const & r);
|
||||
GLM_FUNC_DECL tref4<T> & operator= (tvec4<T> const & v);
|
||||
|
@ -7,7 +7,7 @@
|
||||
// File : test/core/core_func_swizzle.cpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#define GLM_FORCE_ONLY_XYZW
|
||||
#define GLM_FORCE_ONLY_XYZW
|
||||
//#define GLM_FORCE_PURE
|
||||
#define GLM_MESSAGES
|
||||
#define GLM_SWIZZLE
|
||||
|
Loading…
Reference in New Issue
Block a user