Updated component modes management

This commit is contained in:
Christophe Riccio
2011-01-19 15:01:17 +00:00
parent c7f863e0b4
commit 7c177c0ea3
7 changed files with 124 additions and 137 deletions

View File

@@ -49,11 +49,11 @@ namespace glm
//////////////////////////////////////
// Data
# if defined(GLM_USE_ONLY_XYZW)
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
value_type x;
# else//GLM_USE_ONLY_XYZW
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
union {value_type x, r, s;};
# endif//GLM_USE_ONLY_XYZW
# endif//GLM_COMPONENT
//////////////////////////////////////
// Accesses

View File

@@ -47,21 +47,19 @@ namespace glm
//////////////////////////////////////
// Data
# if defined(GLM_USE_ONLY_XYZW)
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
value_type x, y;
# else//GLM_USE_ONLY_XYZW
# ifdef GLM_USE_ANONYMOUS_UNION
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
union
{
struct{value_type x, y;};
struct{value_type r, g;};
struct{value_type s, t;};
};
# else//GLM_USE_ANONYMOUS_UNION
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
union {value_type x, r, s;};
union {value_type y, g, t;};
# endif//GLM_USE_ANONYMOUS_UNION
# endif//GLM_USE_ONLY_XYZW
# endif//GLM_COMPONENT
//////////////////////////////////////
// Accesses

View File

@@ -46,22 +46,20 @@ namespace glm
//////////////////////////////////////
// Data
# if defined(GLM_USE_ONLY_XYZW)
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
value_type x, y, z;
# else//GLM_USE_ONLY_XYZW
# ifdef GLM_USE_ANONYMOUS_UNION
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
union
{
struct{value_type x, y, z;};
struct{value_type r, g, b;};
struct{value_type s, t, p;};
};
# else//GLM_USE_ANONYMOUS_UNION
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
union {value_type x, r, s;};
union {value_type y, g, t;};
union {value_type z, b, p;};
# endif//GLM_USE_ANONYMOUS_UNION
# endif//GLM_USE_ONLY_XYZW
# endif//GLM_COMPONENT
//////////////////////////////////////
// Accesses

View File

@@ -47,23 +47,21 @@ namespace glm
//////////////////////////////////////
// Data
# if defined(GLM_USE_ONLY_XYZW)
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
value_type x, y, z, w;
# else//GLM_USE_ONLY_XYZW
# ifdef GLM_USE_ANONYMOUS_UNION
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
union
{
struct{value_type x, y, z, w;};
struct{value_type r, g, b, a;};
struct{value_type s, t, p, q;};
};
# else//GLM_USE_ANONYMOUS_UNION
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
union {value_type x, r, s;};
union {value_type y, g, t;};
union {value_type z, b, p;};
union {value_type w, a, q;};
# endif//GLM_USE_ANONYMOUS_UNION
# endif//GLM_USE_ONLY_XYZW
# endif//GLM_COMPONENT
//////////////////////////////////////
// Accesses