Author: alanmc
Date: 2006-12-19 11:26:36 -0500 (Tue, 19 Dec 2006)
New Revision: 69751

Modified:
   trunk/Mono.Xna/src/Microsoft.Xna.Framework/Matrix.cs
Log:
Whitespace fixes. Nothing important.

Modified: trunk/Mono.Xna/src/Microsoft.Xna.Framework/Matrix.cs
===================================================================
--- trunk/Mono.Xna/src/Microsoft.Xna.Framework/Matrix.cs        2006-12-19 
16:16:20 UTC (rev 69750)
+++ trunk/Mono.Xna/src/Microsoft.Xna.Framework/Matrix.cs        2006-12-19 
16:26:36 UTC (rev 69751)
@@ -158,18 +158,18 @@
             vector1.X -= cameraPosition.X;
             vector1.Y -= cameraPosition.Y;
             vector1.Z -= cameraPosition.Z;
-            
+
             float f = vector1.LengthSquared();
             if (f < 0.0001F) //What is this ?
                 vector1 = cameraForwardVector.HasValue ? 
-cameraForwardVector.Value : Vector3.Forward;
             else
                 vector1 /= f;
-            
+
             vector3 = Vector3.Cross(cameraUpVector, vector1);
             vector3.Normalize();
             vector2 = Vector3.Cross(vector1, vector3);
 
-            return new Matrix(vector3.X, vector3.Y, vector3.Z, 0, vector2.X, 
vector2.Y, vector2.Z, 0, vector1.X, 
+            return new Matrix(vector3.X, vector3.Y, vector3.Z, 0, vector2.X, 
vector2.Y, vector2.Z, 0, vector1.X,
                               vector1.Y, vector1.Z, 0, objectPosition.X, 
objectPosition.Y, objectPosition.Z, 0);
         }
 
@@ -189,24 +189,24 @@
             vector1.X -= cameraPosition.X;
             vector1.Y -= cameraPosition.Y;
             vector1.Z -= cameraPosition.Z;
-            
+
             float f2 = vector1.LengthSquared();
-            
+
             if (f2 < 0.0001F)
                 vector1 = cameraForwardVector.HasValue ? 
-cameraForwardVector.Value : Vector3.Forward;
             else
                 vector1 = Vector3.Divide(vector1, (float)Math.Sqrt(f2));
-            
+
             dot = Vector3.Dot(rotateAxis, vector1);
-            
+
             if (Math.Abs(dot) > 0.9982547F)
             {
                 if (objectForwardVector.HasValue)
                 {
                     vector2 = objectForwardVector.Value;
-                    
+
                     dot = Vector3.Dot(rotateAxis, vector2);
-                    
+
                     if (Math.Abs(dot) > 0.9982547F)
                     {
                         dot = Vector3.Dot(rotateAxis, Vector3.Forward);
@@ -218,7 +218,7 @@
                     dot = Vector3.Dot(rotateAxis, Vector3.Forward);
                     vector2 = Math.Abs(dot) > 0.9982547F ? Vector3.Right : 
Vector3.Forward;
                 }
-                
+
                 vector3 = Vector3.Cross(rotateAxis, vector2);
                 vector2 = Vector3.Cross(vector3, rotateAxis);
             }
@@ -259,7 +259,7 @@
         {
             result = CreateBillboard(objectPosition, cameraPosition, 
cameraUpVector, cameraForwardVector);
         }
- 
+
         /// <summary>Creates a new Matrix that rotates around an arbitrary 
vector.</summary>
         /// <param name="axis">The axis to rotate around.</param>
         /// <param name="angle">The angle to rotate around the vector.</param>
@@ -381,7 +381,7 @@
         {
             result = CreateOrthographic(width, height, zNearPlane, zFarPlane);
         }
-       
+
         /// <summary>Builds a customized, orthogonal projection 
matrix.</summary>
         /// <param name="left">Minimum x-value of the view volume.</param>
         /// <param name="right">Maximum x-value of the view volume.</param>
@@ -415,7 +415,7 @@
         {
             result = CreateOrthographicOffCenter(left, right, bottom, top, 
zNearPlane, zFarPlane);
         }
-        
+
         /// <summary>Builds a perspective projection matrix.</summary>
         /// <param name="width">Width of the view volume at the near 
view-plane.</param>
         /// <param name="height">Height of the view volume at the near 
view-plane.</param>
@@ -443,7 +443,7 @@
         {
             result = CreatePerspective(width, height, zNearPlane, zFarPlane);
         }
-        
+
         /// <summary>Builds a perspective projection matrix based on a field 
of view.</summary>
         /// <param name="fieldOfView">Field of view in radians.</param>
         /// <param name="aspectRatio">Aspect ratio, defined as view space 
width divided by height.</param>
@@ -473,7 +473,7 @@
         {
             result = CreatePerspectiveFieldOfView(fieldOfView, aspectRatio, 
nearPlaneDistance, farPlaneDistance);
         }
-        
+
         /// <summary>Builds a customized, perspective projection 
matrix.</summary>
         /// <param name="left">Minimum x-value of the view volume at the near 
view-plane.</param>
         /// <param name="right">Maximum x-value of the view volume at the near 
view-plane.</param>
@@ -507,7 +507,7 @@
         {
             result = CreatePerspectiveOffCenter(left, right, bottom, top, 
nearPlaneDistance, farPlaneDistance);
         }
-        
+
         /// <summary>Returns an x-axis rotation matrix.</summary>
         /// <param name="radians">The rotation in radians.</param>
         /// <returns>The rotation matrix.</returns>
@@ -525,7 +525,7 @@
         {
             result = CreateRotationX(radians);
         }
-        
+
         /// <summary>Returns a y-axis rotation matrix.</summary>
         /// <param name="radians">The rotation in radians.</param>
         /// <returns>The rotation matrix.</returns>
@@ -550,7 +550,7 @@
         {
             result = CreateRotationY(radians);
         }
-        
+
         /// <summary>Returns a z-axis rotation matrix.</summary>
         /// <param name="radians">The rotation in radians.</param>
         /// <returns>The rotation matrix.</returns>
@@ -575,7 +575,7 @@
         {
             result = CreateRotationZ(radians);
         }
-        
+
         /// <summary>Creates a scale Matrix.</summary>
         /// <param name="scale">Amount to scale by.</param>
         /// <returns>The created scale Matrix.</returns>
@@ -583,7 +583,7 @@
         {
             return CreateScale(scale, scale, scale);
         }
-       
+
         /// <summary>Creates a scale Matrix.</summary>
         /// <param name="xScale">Value to scale by on the x-axis.</param>
         /// <param name="yScale">Value to scale by on the y-axis.</param>
@@ -601,7 +601,7 @@
         {
             result = CreateScale(scales);
         }
-        
+
         /// <summary>Creates a scale Matrix.</summary>
         /// <param name="scales">Amounts to scale by on the x, y and z 
axis.</param>
         /// <returns>The created scale Matrix.</returns>
@@ -619,7 +619,7 @@
         {
             result = CreateScale(xScale, yScale, zScale);
         }
-        
+
         /// <summary>Creates a translation Matrix</summary>
         /// <param name="xPosition">Value to translate by on the 
x-axis.</param>
         /// <param name="yPosition">Value to translate by on the 
y-axis.</param>
@@ -637,7 +637,7 @@
         {
             result = CreateTranslation(position);
         }
-        
+
         /// <summary>Creates a translation Matrix</summary>
         /// <param name="position">Amounts to translate by on the x, y and z 
axis.</param>
         /// <returns>The created translation Matrix.</returns>
@@ -655,7 +655,7 @@
         {
             result = CreateTranslation(xPosition, yPosition, zPosition);
         }
-        
+
         /// <summary>Calculates the determinant of the matrix.</summary>
         /// <returns>The determinant of the matrix.</returns>
         public float Determinant()
@@ -666,11 +666,11 @@
             float s4 = (M31 * M44) - (M34 * M41);
             float s5 = (M31 * M43) - (M33 * M41);
             float s6 = (M31 * M42) - (M32 * M41);
-            
+
             return ((((M11 * (((M22 * s1) - (M23 * s2)) + (M24 * s3))) - (M12 
* (((M21 * s1) - (M23 * s4)) + (M24 * s5)))) +
                   (M13 * (((M21 * s2) - (M22 * s4)) + (M24 * s6)))) - (M14 * 
(((M21 * s3) - (M22 * s5)) + (M23 * s6))));
         }
-        
+
         /// <summary>Divides the components of a matrix by the corresponding 
components of another matrix.</summary>
         /// <param name="matrix1">Source matrix.</param>
         /// <param name="matrix2">The divisor.</param>
@@ -695,7 +695,7 @@
             matrix1.M44 /= matrix2.M44;
             return matrix1;
         }
-        
+
         /// <summary>Divides the components of a matrix by a scalar.</summary>
         /// <param name="matrix1">Source matrix.</param>
         /// <param name="divider">The divisor.</param>
@@ -738,7 +738,7 @@
         {
             result = Divide(matrix1, matrix2);
         }
-        
+
         /// <summary>
         /// Determines whether the specified System.Object is equal to the 
Matrix.
         /// </summary>
@@ -826,7 +826,7 @@
             float s2 = (((matrix.M21 * m1) - (matrix.M23 * m4)) + (matrix.M24 
* m5)) * -1;
             float s3 = ((matrix.M21 * m2) - (matrix.M22 * m4)) + (matrix.M24 * 
m6);
             float s4 = (((matrix.M21 * m3) - (matrix.M22 * m5)) + (matrix.M23 
* m6)) * -1;
-            float s5  = 1f / ((((matrix.M11 * s1) + (matrix.M12 * s2)) + 
(matrix.M13 * s3)) + (matrix.M14 * s4));
+            float s5 = 1f / ((((matrix.M11 * s1) + (matrix.M12 * s2)) + 
(matrix.M13 * s3)) + (matrix.M14 * s4));
 
             Matrix matrix1 = new Matrix();
             matrix1.M11 = s1 * s5;
@@ -847,7 +847,7 @@
             matrix1.M44 = (((matrix.M11 * m15) - (matrix.M12 * m17)) + 
(matrix.M13 * m18)) * s5;
             return matrix1;
         }
-        
+
         /// <summary>Calculates the inverse of a matrix.</summary>
         /// <param name="matrix">Source matrix.</param>
         /// <param name="result">The inverse of the matrix.</param>
@@ -855,7 +855,7 @@
         {
             result = Invert(matrix);
         }
-        
+
         /// <summary>Linearly interpolates between the corresponding values of 
two matrices.</summary>
         /// <param name="matrix1">Source matrix.</param>
         /// <param name="matrix2">Source matrix.</param>
@@ -892,7 +892,7 @@
         {
             result = Lerp(matrix1, matrix2, amount);
         }
-        
+
         /// <summary>Multiplies a matrix by another matrix.</summary>
         /// <param name="matrix1">Source matrix.</param>
         /// <param name="matrix2">Source matrix.</param>
@@ -918,7 +918,7 @@
             matrix3.M44 = (((matrix1.M41 * matrix2.M14) + (matrix1.M42 * 
matrix2.M24)) + (matrix1.M43 * matrix2.M34)) + (matrix1.M44 * matrix2.M44);
             return matrix3;
         }
-        
+
         /// <summary>Multiplies a matrix by a scalar value.</summary>
         /// <param name="matrix1">Source matrix.</param>
         /// <param name="factor">Scalar value.</param>
@@ -994,7 +994,7 @@
         {
             result = Negate(matrix);
         }
-        
+
         /// <summary>Adds a matrix to another matrix.</summary>
         /// <param name="matrix1">Source matrix.</param>
         /// <param name="matrix2">Source matrix.</param>
@@ -1003,7 +1003,7 @@
         {
             return Add(matrix1, matrix2);
         }
-        
+
         /// <summary>Divides the components of a matrix by the corresponding 
components of another matrix.</summary>
         /// <param name="matrix1">Source matrix.</param>
         /// <param name="matrix2">The divisor.</param>
@@ -1012,7 +1012,7 @@
         {
             return Divide(matrix1, matrix2);
         }
-        
+
         /// <summary>Divides the components of a matrix by a scalar.</summary>
         /// <param name="matrix1">Source matrix.</param>
         /// <param name="divider">The divisor.</param>

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to