Browse Source

Removed vector type functions named swizzle

Christophe Riccio 12 years ago
parent
commit
5d66caa7da

+ 0 - 9
glm/core/type_vec1.hpp

@@ -167,15 +167,6 @@ namespace detail
 		GLM_FUNC_DECL tvec1<T, P> & operator>>=(U const & s);
 		template <typename U> 
 		GLM_FUNC_DECL tvec1<T, P> & operator>>=(tvec1<U, P> const & v);
-
-		//////////////////////////////////////
-		// Swizzle operators
-
-		GLM_FUNC_DECL T swizzle(comp X) const;
-		GLM_FUNC_DECL tvec2<T, P> swizzle(comp X, comp Y) const;
-		GLM_FUNC_DECL tvec3<T, P> swizzle(comp X, comp Y, comp Z) const;
-		GLM_FUNC_DECL tvec4<T, P> swizzle(comp X, comp Y, comp Z, comp W) const;
-		GLM_FUNC_DECL tref1<T, P> swizzle(comp X);
 	};
 
 	template <typename T, precision P>

+ 0 - 61
glm/core/type_vec1.inl

@@ -460,67 +460,6 @@ namespace detail
 		return *this;
 	}
 
-	//////////////////////////////////////
-	// Swizzle operators
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER T tvec1<T, P>::swizzle(comp x) const
-	{
-		return (*this)[x];
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec2<T, P> tvec1<T, P>::swizzle
-	(
-		comp x, 
-		comp y
-	) const
-	{
-		return tvec2<T, P>(
-			(*this)[x],
-			(*this)[y]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec3<T, P> tvec1<T, P>::swizzle
-	(
-		comp x, 
-		comp y, 
-		comp z
-	) const
-	{
-		return tvec3<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec4<T, P> tvec1<T, P>::swizzle
-	(
-		comp x, 
-		comp y, 
-		comp z, 
-		comp w
-	) const
-	{
-		return tvec4<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z],
-			(*this)[w]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tref1<T, P> tvec1<T, P>::swizzle
-	(
-		comp x
-	)
-	{
-		return tref1<T, P>(
-			(*this)[x]);
-	}
-
 	//////////////////////////////////////
 	// Binary arithmetic operators
 

+ 0 - 9
glm/core/type_vec2.hpp

@@ -204,15 +204,6 @@ namespace detail
 		GLM_FUNC_DECL tvec2<T, P> & operator>>=(U const & s);
 		template <typename U> 
 		GLM_FUNC_DECL tvec2<T, P> & operator>>=(tvec2<U, P> const & v);
-
-		//////////////////////////////////////
-		// Swizzle operators
-
-		GLM_FUNC_DECL T swizzle(comp X) const;
-		GLM_FUNC_DECL tvec2<T, P> swizzle(comp X, comp Y) const;
-		GLM_FUNC_DECL tvec3<T, P> swizzle(comp X, comp Y, comp Z) const;
-		GLM_FUNC_DECL tvec4<T, P> swizzle(comp X, comp Y, comp Z, comp W) const;
-		GLM_FUNC_DECL tref2<T, P> swizzle(comp X, comp Y);
 	};
 
 	template <typename T, precision P>

+ 0 - 66
glm/core/type_vec2.inl

@@ -505,72 +505,6 @@ namespace detail
 		return *this;
 	}
 
-	//////////////////////////////////////
-	// Swizzle operators
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER T tvec2<T, P>::swizzle
-	(
-		comp x
-	) const
-	{
-		return (*this)[x];
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec2<T, P> tvec2<T, P>::swizzle
-	(
-		comp x,
-		comp y
-	) const
-	{
-		return tvec2<T, P>(
-			(*this)[x],
-			(*this)[y]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec3<T, P> tvec2<T, P>::swizzle
-	(
-		comp x,
-		comp y,
-		comp z
-	) const
-	{
-		return tvec3<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec4<T, P> tvec2<T, P>::swizzle
-	(
-		comp x,
-		comp y,
-		comp z,
-		comp w
-	) const
-	{
-		return tvec4<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z],
-			(*this)[w]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tref2<T, P> tvec2<T, P>::swizzle
-	(
-		comp x,
-		comp y
-	)
-	{
-		return tref2<T, P>(
-			(*this)[x],
-			(*this)[y]);
-	}
-
 	//////////////////////////////////////
 	// Binary arithmetic operators
 

+ 0 - 10
glm/core/type_vec3.hpp

@@ -228,16 +228,6 @@ namespace detail
 		GLM_FUNC_DECL tvec3<T, P> & operator>>=(U const & s);
 		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec3<U, P> const & v);
-
-		//////////////////////////////////////
-		// Swizzle operators
-
-		GLM_FUNC_DECL T swizzle(comp X) const;
-		GLM_FUNC_DECL tvec2<T, P> swizzle(comp X, comp Y) const;
-		GLM_FUNC_DECL tvec3<T, P> swizzle(comp X, comp Y, comp Z) const;
-		GLM_FUNC_DECL tvec4<T, P> swizzle(comp X, comp Y, comp Z, comp W) const;
-		GLM_FUNC_DECL tref2<T, P> swizzle(comp X, comp Y);
-		GLM_FUNC_DECL tref3<T, P> swizzle(comp X, comp Y, comp Z);
 	};
 
 	template <typename T, precision P>

+ 0 - 80
glm/core/type_vec3.inl

@@ -579,86 +579,6 @@ namespace detail
 		return *this;
 	}
 
-	//////////////////////////////////////
-	// Swizzle operators
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER T tvec3<T, P>::swizzle
-	(
-		comp x
-	) const
-	{
-		return (*this)[x];
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec2<T, P> tvec3<T, P>::swizzle
-	(
-		comp x, 
-		comp y
-	) const
-	{
-		return tvec2<T, P>(
-			(*this)[x],
-			(*this)[y]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec3<T, P> tvec3<T, P>::swizzle
-	(
-		comp x, 
-		comp y, 
-		comp z
-	) const
-	{
-		return tvec3<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec4<T, P> tvec3<T, P>::swizzle
-	(
-		comp x, 
-		comp y, 
-		comp z, 
-		comp w
-	) const
-	{
-		return tvec4<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z],
-			(*this)[w]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tref2<T, P> tvec3<T, P>::swizzle
-	(
-		comp x, 
-		comp y
-	)
-	{
-		return tref2<T, P>(
-			(*this)[x],
-			(*this)[y]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tref3<T, P> tvec3<T, P>::swizzle
-	(
-		comp x, 
-		comp y, 
-		comp z
-	)
-	{
-		return tref3<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z]);
-	}
-
 	//////////////////////////////////////
 	// Binary arithmetic operators
 

+ 0 - 11
glm/core/type_vec4.hpp

@@ -283,17 +283,6 @@ namespace detail
 		GLM_FUNC_DECL tvec4<T, P> & operator>>=(U const & s);
 		template <typename U>
 		GLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec4<U, P> const & v);
-
-		//////////////////////////////////////
-		// Swizzle operators
-
-		GLM_FUNC_DECL T swizzle(comp X) const;
-		GLM_FUNC_DECL tvec2<T, P> swizzle(comp X, comp Y) const;
-		GLM_FUNC_DECL tvec3<T, P> swizzle(comp X, comp Y, comp Z) const;
-		GLM_FUNC_DECL tvec4<T, P> swizzle(comp X, comp Y, comp Z, comp W) const;
-		GLM_FUNC_DECL tref2<T, P> swizzle(comp X, comp Y);
-		GLM_FUNC_DECL tref3<T, P> swizzle(comp X, comp Y, comp Z);
-		GLM_FUNC_DECL tref4<T, P> swizzle(comp X, comp Y, comp Z, comp W);
 	};
 
 	template <typename T, precision P>

+ 0 - 63
glm/core/type_vec4.inl

@@ -720,69 +720,6 @@ namespace detail
 		return *this;
 	}
 
-	//////////////////////////////////////
-	// Swizzle operators
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER T tvec4<T, P>::swizzle(comp x) const
-	{
-		return (*this)[x];
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec2<T, P> tvec4<T, P>::swizzle(comp x, comp y) const
-	{
-		return tvec2<T, P>(
-			(*this)[x],
-			(*this)[y]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec3<T, P> tvec4<T, P>::swizzle(comp x, comp y, comp z) const
-	{
-		return tvec3<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tvec4<T, P> tvec4<T, P>::swizzle(comp x, comp y,	comp z,	comp w) const
-	{
-		return tvec4<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z],
-			(*this)[w]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tref2<T, P> tvec4<T, P>::swizzle(comp x,	comp y)
-	{
-		return tref2<T, P>(
-			(*this)[x],
-			(*this)[y]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tref3<T, P> tvec4<T, P>::swizzle(comp x, comp y,	comp z)
-	{
-		return tref3<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z]);
-	}
-
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER tref4<T, P> tvec4<T, P>::swizzle(comp x, comp y, comp z,	comp w)
-	{
-		return tref4<T, P>(
-			(*this)[x],
-			(*this)[y],
-			(*this)[z],
-			(*this)[w]);
-	}
-
 	//////////////////////////////////////
 	// Binary arithmetic operators