Browse Source

Fixed operators declarations

Christophe Riccio 15 years ago
parent
commit
64677b50a0

+ 8 - 8
glm/core/type_mat2x2.hpp

@@ -160,13 +160,13 @@ namespace glm
 			tmat2x2<T> const & m);
 
 		template <typename T> 
-		typename tmat2x2<T>::row_type operator* (
+		typename tmat2x2<T>::col_type operator* (
 			tmat2x2<T> const & m, 
-			typename tmat2x2<T>::col_type const & s);
+			typename tmat2x2<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat2x2<T>::col_type operator* (
-			typename tmat2x2<T>::row_type, 
+		typename tmat2x2<T>::row_type operator* (
+			typename tmat2x2<T>::col_type const & v, 
 			tmat2x2<T> const & m);
 
 		template <typename T> 
@@ -185,13 +185,13 @@ namespace glm
 			tmat2x2<T> const & m);
 
 		template <typename T> 
-		typename tmat2x2<T>::row_type operator/ (
+		typename tmat2x2<T>::col_type operator/ (
 			tmat2x2<T> const & m, 
-			typename tmat2x2<T>::col_type const & v);
+			typename tmat2x2<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat2x2<T>::col_type operator/ (
-			typename tmat2x2<T>::row_type & v, 
+		typename tmat2x2<T>::row_type operator/ (
+			typename tmat2x2<T>::col_type const & v, 
 			tmat2x2<T> const & m);
 
 		template <typename T> 

+ 5 - 5
glm/core/type_mat2x3.hpp

@@ -35,7 +35,7 @@ namespace glm
 		template <typename T> struct tmat4x3;
 		template <typename T> struct tmat4x4;
 
-		//!< \brief Template for 2 * 3 matrix of floating-point numbers.
+		//!< \brief Template for 2 columns and 3 rows matrix of floating-point numbers.
 		template <typename T> 
 		struct tmat2x3
 		{
@@ -142,13 +142,13 @@ namespace glm
 			tmat2x3<T> const & m);
 
 		template <typename T>
-		typename tmat2x3<T>::row_type operator* (
+		typename tmat2x3<T>::col_type operator* (
 			tmat2x3<T> const & m, 
-			typename tmat2x3<T>::col_type const & v);
+			typename tmat2x3<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat2x3<T>::col_type operator* (
-			typename tmat2x3<T>::row_type const & v, 
+		typename tmat2x3<T>::row_type operator* (
+			typename tmat2x3<T>::col_type const & v, 
 			tmat2x3<T> const & m);
 
 		template <typename T>

+ 5 - 5
glm/core/type_mat2x4.hpp

@@ -35,7 +35,7 @@ namespace glm
 		template <typename T> struct tmat4x3;
 		template <typename T> struct tmat4x4;
 
-		//!< \brief Template for 2 * 4 matrix of floating-point numbers.
+		//!< \brief Template for 2 columns and 4 rows matrix of floating-point numbers.
 		template <typename T> 
 		struct tmat2x4
 		{
@@ -142,13 +142,13 @@ namespace glm
 			tmat2x4<T> const & m);
 
 		template <typename T>
-		typename tmat2x4<T>::row_type operator* (
+		typename tmat2x4<T>::col_type operator* (
 			tmat2x4<T> const & m, 
-			typename tmat2x4<T>::col_type const & v);
+			typename tmat2x4<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat2x4<T>::col_type operator* (
-			typename tmat2x4<T>::row_type const & v, 
+		typename tmat2x4<T>::row_type operator* (
+			typename tmat2x4<T>::col_type const & v, 
 			tmat2x4<T> const & m);
 
 		template <typename T>

+ 12 - 1
glm/core/type_mat2x4.inl

@@ -400,6 +400,12 @@ namespace detail
             m[1] * s);
     }
    
+	//     X
+	//     X
+	// X X
+	// X X
+	// X X
+	// X X
     template <typename T>
     inline typename tmat2x4<T>::col_type operator* 
 	(
@@ -414,7 +420,12 @@ namespace detail
             m[0][3] * v.x + m[1][3] * v.y);
     }
 
-    template <typename T> 
+	//			X X
+	//			X X
+	//			X X
+	//			X X
+	// X X X X
+	template <typename T> 
     inline typename tmat2x4<T>::row_type operator* 
 	(
 		typename tmat2x4<T>::col_type const & v, 

+ 5 - 5
glm/core/type_mat3x2.hpp

@@ -35,7 +35,7 @@ namespace glm
 		template <typename T> struct tmat4x3;
 		template <typename T> struct tmat4x4;
 
-		//!< \brief Template for 3 * 2 matrix of floating-point numbers.
+		//!< \brief Template for 3 columns and 2 rows matrix of floating-point numbers.
 		template <typename T> 
 		struct tmat3x2
 		{
@@ -144,13 +144,13 @@ namespace glm
 			tmat3x2<T> const & m);
 
 		template <typename T>
-		typename tmat3x2<T>::row_type operator* (
+		typename tmat3x2<T>::col_type operator* (
 			tmat3x2<T> const & m, 
-			typename tmat3x2<T>::col_type const & v);
+			typename tmat3x2<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat3x2<T>::col_type operator* (
-			typename tmat3x2<T>::row_type const & v,
+		typename tmat3x2<T>::row_type operator* (
+			typename tmat3x2<T>::col_type const & v,
 			tmat3x2<T> const & m);
 
 		template <typename T>

+ 8 - 8
glm/core/type_mat3x3.hpp

@@ -159,13 +159,13 @@ namespace glm
 			tmat3x3<T> const & m);
 
 		template <typename T> 
-		typename tmat3x3<T>::row_type operator* (
+		typename tmat3x3<T>::col_type operator* (
 			tmat3x3<T> const & m, 
-			typename tmat3x3<T>::col_type const & v);
+			typename tmat3x3<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat3x3<T>::col_type operator* (
-			typename tmat3x3<T>::row_type const & v, 
+		typename tmat3x3<T>::row_type operator* (
+			typename tmat3x3<T>::col_type const & v, 
 			tmat3x3<T> const & m);
 
 		template <typename T> 
@@ -184,13 +184,13 @@ namespace glm
 			tmat3x3<T> const & m);
 
 		template <typename T> 
-		typename tmat3x3<T>::row_type operator/ (
+		typename tmat3x3<T>::col_type operator/ (
 			tmat3x3<T> const & m, 
-			typename tmat3x3<T>::col_type const & v);
+			typename tmat3x3<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat3x3<T>::col_type operator/ (
-			typename tmat3x3<T>::row_type const & v, 
+		typename tmat3x3<T>::row_type operator/ (
+			typename tmat3x3<T>::col_type const & v, 
 			tmat3x3<T> const & m);
 
 		template <typename T> 

+ 5 - 5
glm/core/type_mat3x4.hpp

@@ -35,7 +35,7 @@ namespace glm
 		template <typename T> struct tmat4x3;
 		template <typename T> struct tmat4x4;
 
-		//!< \brief Template for 3 * 4 matrix of floating-point numbers.
+		//!< \brief Template for 3 columns and 4 rows matrix of floating-point numbers.
 		template <typename T> 
 		struct tmat3x4
 		{
@@ -144,13 +144,13 @@ namespace glm
 			tmat3x4<T> const & m);
 
 		template <typename T>
-		typename tmat3x4<T>::row_type operator* (
+		typename tmat3x4<T>::col_type operator* (
 			tmat3x4<T> const & m, 
-			typename tmat3x4<T>::col_type const & v);
+			typename tmat3x4<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat3x4<T>::col_type operator* (
-			typename tmat3x4<T>::row_type const & v, 
+		typename tmat3x4<T>::row_type operator* (
+			typename tmat3x4<T>::col_type const & v, 
 			tmat3x4<T> const & m);
 
 		template <typename T>

+ 4 - 4
glm/core/type_mat4x2.hpp

@@ -146,13 +146,13 @@ namespace glm
 			tmat4x2<T> const & m);
 
 		template <typename T>
-		typename tmat4x2<T>::row_type operator* (
+		typename tmat4x2<T>::col_type operator* (
 			tmat4x2<T> const & m, 
-			typename tmat4x2<T>::col_type const & v);
+			typename tmat4x2<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat4x2<T>::col_type operator* (
-			typename tmat4x2<T>::row_type const & v, 
+		typename tmat4x2<T>::row_type operator* (
+			typename tmat4x2<T>::col_type const & v, 
 			tmat4x2<T> const & m);
 
 		template <typename T> 

+ 5 - 5
glm/core/type_mat4x3.hpp

@@ -35,7 +35,7 @@ namespace glm
 		template <typename T> struct tmat4x3;
 		template <typename T> struct tmat4x4;
 
-		//!< \brief Template for 4 * 3 matrix of floating-point numbers.
+		//!< \brief Template for 4 columns and 3 rows matrix of floating-point numbers.
 		template <typename T> 
 		struct tmat4x3
 		{
@@ -146,13 +146,13 @@ namespace glm
 			tmat4x3<T> const & m);
 
 		template <typename T>
-		typename tmat4x3<T>::row_type operator* (
+		typename tmat4x3<T>::col_type operator* (
 			tmat4x3<T> const & m, 
-			typename tmat4x3<T>::col_type const & v);
+			typename tmat4x3<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat4x3<T>::col_type operator* (
-			typename tmat4x3<T>::row_type const & v, 
+		typename tmat4x3<T>::row_type operator* (
+			typename tmat4x3<T>::col_type const & v, 
 			tmat4x3<T> const & m);
 
 		template <typename T> 

+ 8 - 8
glm/core/type_mat4x4.hpp

@@ -161,13 +161,13 @@ namespace glm
 			tmat4x4<T> const & m);
 
 		template <typename T> 
-		typename tmat4x4<T>::row_type operator* (
+		typename tmat4x4<T>::col_type operator* (
 			tmat4x4<T> const & m, 
-			typename tmat4x4<T>::col_type const & v);
+			typename tmat4x4<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat4x4<T>::col_type operator* (
-			typename tmat4x4<T>::row_type const & v, 
+		typename tmat4x4<T>::row_type operator* (
+			typename tmat4x4<T>::col_type const & v, 
 			tmat4x4<T> const & m);
 
 		template <typename T> 
@@ -186,13 +186,13 @@ namespace glm
 			tmat4x4<T> const & m);
 
 		template <typename T> 
-		typename tmat4x4<T>::row_type operator/ (
+		typename tmat4x4<T>::col_type operator/ (
 			tmat4x4<T> const & m, 
-			typename tmat4x4<T>::col_type const & v);
+			typename tmat4x4<T>::row_type const & v);
 
 		template <typename T> 
-		typename tmat4x4<T>::col_type operator/ (
-			typename tmat4x4<T>::row_type & v, 
+		typename tmat4x4<T>::row_type operator/ (
+			typename tmat4x4<T>::col_type & v, 
 			tmat4x4<T> const & m);
 
 		template <typename T>