Browse Source

Progress on vec1 support

Christophe Riccio 11 years ago
parent
commit
a08aca94f3
1 changed files with 83 additions and 3 deletions
  1. 83 3
      glm/detail/type_vec3.hpp

+ 83 - 3
glm/detail/type_vec3.hpp

@@ -170,18 +170,26 @@ namespace detail
 		template <typename U> 
 		GLM_FUNC_DECL tvec3<T, P> & operator+=(U s);
 		template <typename U> 
+		GLM_FUNC_DECL tvec3<T, P> & operator+=(tvec1<U, P> const & v);
+		template <typename U> 
 		GLM_FUNC_DECL tvec3<T, P> & operator+=(tvec3<U, P> const & v);
 		template <typename U> 
 		GLM_FUNC_DECL tvec3<T, P> & operator-=(U s);
 		template <typename U> 
+		GLM_FUNC_DECL tvec3<T, P> & operator-=(tvec1<U, P> const & v);
+		template <typename U> 
 		GLM_FUNC_DECL tvec3<T, P> & operator-=(tvec3<U, P> const & v);
 		template <typename U> 
 		GLM_FUNC_DECL tvec3<T, P> & operator*=(U s);
 		template <typename U> 
+		GLM_FUNC_DECL tvec3<T, P> & operator*=(tvec1<U, P> const & v);
+		template <typename U> 
 		GLM_FUNC_DECL tvec3<T, P> & operator*=(tvec3<U, P> const & v);
 		template <typename U> 
 		GLM_FUNC_DECL tvec3<T, P> & operator/=(U s);
 		template <typename U> 
+		GLM_FUNC_DECL tvec3<T, P> & operator/=(tvec1<U, P> const & v);
+		template <typename U> 
 		GLM_FUNC_DECL tvec3<T, P> & operator/=(tvec3<U, P> const & v);
 
 		//////////////////////////////////////
@@ -198,62 +206,98 @@ namespace detail
 		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator%= (U s);
 		template <typename U>
+		GLM_FUNC_DECL tvec3<T, P> & operator%= (tvec1<U, P> const & v);
+		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator%= (tvec3<U, P> const & v);
 		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator&= (U s);
 		template <typename U>
+		GLM_FUNC_DECL tvec3<T, P> & operator&= (tvec1<U, P> const & v);
+		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator&= (tvec3<U, P> const & v);
 		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator|= (U s);
 		template <typename U>
+		GLM_FUNC_DECL tvec3<T, P> & operator|= (tvec1<U, P> const & v);
+		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator|= (tvec3<U, P> const & v);
 		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator^= (U s);
 		template <typename U>
+		GLM_FUNC_DECL tvec3<T, P> & operator^= (tvec1<U, P> const & v);
+		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator^= (tvec3<U, P> const & v);
 		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator<<=(U s);
 		template <typename U>
+		GLM_FUNC_DECL tvec3<T, P> & operator<<=(tvec1<U, P> const & v);
+		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator<<=(tvec3<U, P> const & v);
 		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator>>=(U s);
 		template <typename U>
+		GLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec1<U, P> const & v);
+		template <typename U>
 		GLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec3<U, P> const & v);
 	};
 
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator+(T const & s, tvec3<T, P> const & v);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator+(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
 
 	template <typename T, precision P>
-	GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, 	T const & s);
+	GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, T const & s);
+
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, tvec1<T, P> const & s);
 
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator-(T const & s, tvec3<T, P> const & v);
 
 	template <typename T, precision P>
-	GLM_FUNC_DECL tvec3<T, P> operator-	(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
+	GLM_FUNC_DECL tvec3<T, P> operator-(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
 
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, T const & s);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator*(T const & s, tvec3<T, P> const & v);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator*(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
 
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v, T const & s);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator/(T const & s, tvec3<T, P> const & v);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator/(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
 
@@ -263,54 +307,90 @@ namespace detail
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, T const & s);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator%(T const & s, tvec3<T, P> const & v);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator%(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
 
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v, T const & s);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator&(T const & s, tvec3<T, P> const & v);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator&(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
 
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v, T const & s);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator|(T const & s, tvec3<T, P> const & v);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator|(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
-		
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v, T const & s);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator^(T const & s, tvec3<T, P> const & v);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator^(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
 
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v, T const & s);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator<<(T const & s, tvec3<T, P> const & v);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator<<(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
 
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v, T const & s);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v, tvec1<T, P> const & s);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator>>(T const & s, tvec3<T, P> const & v);
 
+	template <typename T, precision P>
+	GLM_FUNC_DECL tvec3<T, P> operator>>(tvec1<T, P> const & s, tvec3<T, P> const & v);
+
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v1, tvec3<T, P> const & v2);