From 5d66caa7da2dfe63e90b7e0a5996745578ff26a8 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 15 Sep 2013 14:45:29 +0200 Subject: [PATCH] Removed vector type functions named swizzle --- glm/core/type_vec1.hpp | 9 ----- glm/core/type_vec1.inl | 61 -------------------------------- glm/core/type_vec2.hpp | 9 ----- glm/core/type_vec2.inl | 66 ---------------------------------- glm/core/type_vec3.hpp | 10 ------ glm/core/type_vec3.inl | 80 ------------------------------------------ glm/core/type_vec4.hpp | 11 ------ glm/core/type_vec4.inl | 63 --------------------------------- 8 files changed, 309 deletions(-) diff --git a/glm/core/type_vec1.hpp b/glm/core/type_vec1.hpp index 3f52ddbb..48e776e3 100644 --- a/glm/core/type_vec1.hpp +++ b/glm/core/type_vec1.hpp @@ -167,15 +167,6 @@ namespace detail GLM_FUNC_DECL tvec1 & operator>>=(U const & s); template GLM_FUNC_DECL tvec1 & operator>>=(tvec1 const & v); - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_DECL T swizzle(comp X) const; - GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; - GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; - GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - GLM_FUNC_DECL tref1 swizzle(comp X); }; template diff --git a/glm/core/type_vec1.inl b/glm/core/type_vec1.inl index d07cf620..838ee2ef 100644 --- a/glm/core/type_vec1.inl +++ b/glm/core/type_vec1.inl @@ -460,67 +460,6 @@ namespace detail return *this; } - ////////////////////////////////////// - // Swizzle operators - - template - GLM_FUNC_QUALIFIER T tvec1::swizzle(comp x) const - { - return (*this)[x]; - } - - template - GLM_FUNC_QUALIFIER tvec2 tvec1::swizzle - ( - comp x, - comp y - ) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tvec3 tvec1::swizzle - ( - comp x, - comp y, - comp z - ) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - template - GLM_FUNC_QUALIFIER tvec4 tvec1::swizzle - ( - comp x, - comp y, - comp z, - comp w - ) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - template - GLM_FUNC_QUALIFIER tref1 tvec1::swizzle - ( - comp x - ) - { - return tref1( - (*this)[x]); - } - ////////////////////////////////////// // Binary arithmetic operators diff --git a/glm/core/type_vec2.hpp b/glm/core/type_vec2.hpp index e42a979e..2eca0fde 100644 --- a/glm/core/type_vec2.hpp +++ b/glm/core/type_vec2.hpp @@ -204,15 +204,6 @@ namespace detail GLM_FUNC_DECL tvec2 & operator>>=(U const & s); template GLM_FUNC_DECL tvec2 & operator>>=(tvec2 const & v); - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_DECL T swizzle(comp X) const; - GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; - GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; - GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); }; template diff --git a/glm/core/type_vec2.inl b/glm/core/type_vec2.inl index c732059d..453ed2db 100644 --- a/glm/core/type_vec2.inl +++ b/glm/core/type_vec2.inl @@ -505,72 +505,6 @@ namespace detail return *this; } - ////////////////////////////////////// - // Swizzle operators - - template - GLM_FUNC_QUALIFIER T tvec2::swizzle - ( - comp x - ) const - { - return (*this)[x]; - } - - template - GLM_FUNC_QUALIFIER tvec2 tvec2::swizzle - ( - comp x, - comp y - ) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tvec3 tvec2::swizzle - ( - comp x, - comp y, - comp z - ) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - template - GLM_FUNC_QUALIFIER tvec4 tvec2::swizzle - ( - comp x, - comp y, - comp z, - comp w - ) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - template - GLM_FUNC_QUALIFIER tref2 tvec2::swizzle - ( - comp x, - comp y - ) - { - return tref2( - (*this)[x], - (*this)[y]); - } - ////////////////////////////////////// // Binary arithmetic operators diff --git a/glm/core/type_vec3.hpp b/glm/core/type_vec3.hpp index b675a340..1859c1d7 100644 --- a/glm/core/type_vec3.hpp +++ b/glm/core/type_vec3.hpp @@ -228,16 +228,6 @@ namespace detail GLM_FUNC_DECL tvec3 & operator>>=(U const & s); template GLM_FUNC_DECL tvec3 & operator>>=(tvec3 const & v); - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_DECL T swizzle(comp X) const; - GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; - GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; - GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); - GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); }; template diff --git a/glm/core/type_vec3.inl b/glm/core/type_vec3.inl index 8d0c6520..b656a91a 100644 --- a/glm/core/type_vec3.inl +++ b/glm/core/type_vec3.inl @@ -579,86 +579,6 @@ namespace detail return *this; } - ////////////////////////////////////// - // Swizzle operators - - template - GLM_FUNC_QUALIFIER T tvec3::swizzle - ( - comp x - ) const - { - return (*this)[x]; - } - - template - GLM_FUNC_QUALIFIER tvec2 tvec3::swizzle - ( - comp x, - comp y - ) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tvec3 tvec3::swizzle - ( - comp x, - comp y, - comp z - ) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - template - GLM_FUNC_QUALIFIER tvec4 tvec3::swizzle - ( - comp x, - comp y, - comp z, - comp w - ) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - template - GLM_FUNC_QUALIFIER tref2 tvec3::swizzle - ( - comp x, - comp y - ) - { - return tref2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tref3 tvec3::swizzle - ( - comp x, - comp y, - comp z - ) - { - return tref3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - ////////////////////////////////////// // Binary arithmetic operators diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index ca49a235..afc11675 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -283,17 +283,6 @@ namespace detail GLM_FUNC_DECL tvec4 & operator>>=(U const & s); template GLM_FUNC_DECL tvec4 & operator>>=(tvec4 const & v); - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_DECL T swizzle(comp X) const; - GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; - GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; - GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); - GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); - GLM_FUNC_DECL tref4 swizzle(comp X, comp Y, comp Z, comp W); }; template diff --git a/glm/core/type_vec4.inl b/glm/core/type_vec4.inl index 431db1c7..01635b93 100644 --- a/glm/core/type_vec4.inl +++ b/glm/core/type_vec4.inl @@ -720,69 +720,6 @@ namespace detail return *this; } - ////////////////////////////////////// - // Swizzle operators - - template - GLM_FUNC_QUALIFIER T tvec4::swizzle(comp x) const - { - return (*this)[x]; - } - - template - GLM_FUNC_QUALIFIER tvec2 tvec4::swizzle(comp x, comp y) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tvec3 tvec4::swizzle(comp x, comp y, comp z) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - template - GLM_FUNC_QUALIFIER tvec4 tvec4::swizzle(comp x, comp y, comp z, comp w) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - template - GLM_FUNC_QUALIFIER tref2 tvec4::swizzle(comp x, comp y) - { - return tref2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tref3 tvec4::swizzle(comp x, comp y, comp z) - { - return tref3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - template - GLM_FUNC_QUALIFIER tref4 tvec4::swizzle(comp x, comp y, comp z, comp w) - { - return tref4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - ////////////////////////////////////// // Binary arithmetic operators