Permalink
Browse files

Matrix4x2 implementation and documenting the other matrix classes.

  • Loading branch information...
1 parent df78210 commit 31ba0a36b9608218757bbaf0dddf2eb530e6bace @Robmaister Robmaister committed Jan 20, 2013
@@ -105,7 +105,7 @@ public float Determinant
}
/// <summary>
- /// Gets the first column of this matrix.
+ /// Gets or sets the first column of this matrix.
/// </summary>
public Vector2 Column0
{
@@ -114,7 +114,7 @@ public Vector2 Column0
}
/// <summary>
- /// Gets the second column of this matrix.
+ /// Gets or sets the second column of this matrix.
/// </summary>
public Vector2 Column1
{
@@ -88,7 +88,7 @@ public Matrix2x3(Vector3 row0, Vector3 row1)
#region Properties
/// <summary>
- /// Gets the first column of this matrix.
+ /// Gets or sets the first column of this matrix.
/// </summary>
public Vector2 Column0
{
@@ -97,7 +97,7 @@ public Vector2 Column0
}
/// <summary>
- /// Gets the second column of this matrix.
+ /// Gets or sets the second column of this matrix.
/// </summary>
public Vector2 Column1
{
@@ -106,7 +106,7 @@ public Vector2 Column1
}
/// <summary>
- /// Gets the third column of this matrix.
+ /// Gets or sets the third column of this matrix.
/// </summary>
public Vector2 Column2
{
@@ -499,10 +499,6 @@ public static Matrix2x3 Subtract(Matrix2x3 left, Matrix2x3 right)
#endregion
- #region Invert Functions
-
- #endregion
-
#region Transpose
/// <summary>
@@ -690,7 +686,9 @@ public override bool Equals(object obj)
#region IEquatable<Matrix2x3> Members
- /// <summary>Indicates whether the current matrix is equal to another matrix.</summary>
+ /// <summary>
+ /// Indicates whether the current matrix is equal to another matrix.
+ /// </summary>
/// <param name="other">An matrix to compare with this matrix.</param>
/// <returns>true if the current matrix is equal to the matrix parameter; otherwise, false.</returns>
public bool Equals(Matrix2x3 other)
@@ -27,6 +27,9 @@
namespace OpenTK
{
+ /// <summary>
+ /// Represents a 2x4 matrix.
+ /// </summary>
public struct Matrix2x4 : IEquatable<Matrix2x4>
{
#region Fields
@@ -86,37 +89,80 @@ public Matrix2x4(Vector4 row0, Vector4 row1)
#region Properties
+ /// <summary>
+ /// Gets or sets the first column of the matrix.
+ /// </summary>
public Vector2 Column0
{
get { return new Vector2(Row0.X, Row1.X); }
set { Row0.X = value.X; Row1.X = value.Y; }
}
+ /// <summary>
+ /// Gets or sets the second column of the matrix.
+ /// </summary>
public Vector2 Column1
{
get { return new Vector2(Row0.Y, Row1.Y); }
set { Row0.Y = value.X; Row1.Y = value.Y; }
}
+ /// <summary>
+ /// Gets or sets the third column of the matrix.
+ /// </summary>
public Vector2 Column2
{
get { return new Vector2(Row0.Z, Row1.Z); }
set { Row0.Z = value.X; Row1.Z = value.Y; }
}
+ /// <summary>
+ /// Gets or sets the fourth column of the matrix.
+ /// </summary>
public Vector2 Column3
{
get { return new Vector2(Row0.W, Row1.W); }
set { Row0.W = value.X; Row1.W = value.Y; }
}
+ /// <summary>
+ /// Gets or sets the value at row 1, column 1 of this instance.
+ /// </summary>
public float M11 { get { return Row0.X; } set { Row0.X = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 1, column 2 of this instance.
+ /// </summary>
public float M12 { get { return Row0.Y; } set { Row0.Y = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 1, column 3 of this instance.
+ /// </summary>
public float M13 { get { return Row0.Z; } set { Row0.Z = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 1, column 4 of this instance.
+ /// </summary>
public float M14 { get { return Row0.W; } set { Row0.W = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 2, column 1 of this instance.
+ /// </summary>
public float M21 { get { return Row1.X; } set { Row1.X = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 2, column 2 of this instance.
+ /// </summary>
public float M22 { get { return Row1.Y; } set { Row1.Y = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 2, column 3 of this instance.
+ /// </summary>
public float M23 { get { return Row1.Z; } set { Row1.Z = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 2, column 4 of this instance.
+ /// </summary>
public float M24 { get { return Row1.W; } set { Row1.W = value; } }
#endregion
@@ -488,10 +534,6 @@ public static Matrix2x4 Subtract(Matrix2x4 left, Matrix2x4 right)
#endregion
- #region Invert Functions
-
- #endregion
-
#region Transpose
/// <summary>
@@ -681,6 +723,11 @@ public override bool Equals(object obj)
#region IEquatable<Matrix2x4> Members
+ /// <summary>
+ /// Indicates whether the current matrix is equal to another matrix.
+ /// </summary>
+ /// <param name="other">An matrix to compare with this matrix.</param>
+ /// <returns>true if the current matrix is equal to the matrix parameter; otherwise, false.</returns>
public bool Equals(Matrix2x4 other)
{
return
@@ -439,7 +439,7 @@ public static void CreateScale(ref Vector3 scale, out Matrix3 result)
/// <param name="x">Scale factor for the x axis.</param>
/// <param name="y">Scale factor for the y axis.</param>
/// <param name="z">Scale factor for the z axis.</param>
- /// <param name="result">A scale matrix.</returns>
+ /// <param name="result">A scale matrix.</param>
public static void CreateScale(float x, float y, float z, out Matrix3 result)
{
result = Identity;
@@ -435,7 +435,7 @@ public static void CreateScale(ref Vector3d scale, out Matrix3d result)
/// <param name="x">Scale factor for the x axis.</param>
/// <param name="y">Scale factor for the y axis.</param>
/// <param name="z">Scale factor for the z axis.</param>
- /// <param name="result">A scale matrix.</returns>
+ /// <param name="result">A scale matrix.</param>
public static void CreateScale(double x, double y, double z, out Matrix3d result)
{
result = Identity;
@@ -27,6 +27,9 @@
namespace OpenTK
{
+ /// <summary>
+ /// Represents a 3x2 matrix.
+ /// </summary>
public struct Matrix3x2 : IEquatable<Matrix3x2>
{
#region Fields
@@ -93,23 +96,52 @@ public Matrix3x2(Vector2 row0, Vector2 row1, Vector2 row2)
#region Properties
+ /// <summary>
+ /// Gets or sets the first column of this matrix.
+ /// </summary>
public Vector3 Column0
{
get { return new Vector3(Row0.X, Row1.X, Row2.X); }
set { Row0.X = value.X; Row1.X = value.Y; Row2.X = value.Z; }
}
+ /// <summary>
+ /// Gets or sets the second column of this matrix.
+ /// </summary>
public Vector3 Column1
{
get { return new Vector3(Row0.Y, Row1.Y, Row2.Y); }
set { Row0.Y = value.X; Row1.Y = value.Y; Row2.Y = value.Z; }
}
+ /// <summary>
+ /// Gets or sets the value at row 1, column 1 of this instance.
+ /// </summary>
public float M11 { get { return Row0.X; } set { Row0.X = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 1, column 2 of this instance.
+ /// </summary>
public float M12 { get { return Row0.Y; } set { Row0.Y = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 2, column 1 of this instance.
+ /// </summary>
public float M21 { get { return Row1.X; } set { Row1.X = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 2, column 2 of this instance.
+ /// </summary>
public float M22 { get { return Row1.Y; } set { Row1.Y = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 3, column 1 of this instance.
+ /// </summary>
public float M31 { get { return Row2.X; } set { Row2.X = value; } }
+
+ /// <summary>
+ /// Gets or sets the value at row 3, column 2 of this instance.
+ /// </summary>
public float M32 { get { return Row2.Y; } set { Row2.Y = value; } }
#endregion
@@ -478,10 +510,6 @@ public static Matrix3x2 Subtract(Matrix3x2 left, Matrix3x2 right)
#endregion
- #region Invert Functions
-
- #endregion
-
#region Transpose
/// <summary>
@@ -669,6 +697,11 @@ public override bool Equals(object obj)
#region IEquatable<Matrix3x2> Members
+ /// <summary>
+ /// Indicates whether the current matrix is equal to another matrix.
+ /// </summary>
+ /// <param name="other">An matrix to compare with this matrix.</param>
+ /// <returns>true if the current matrix is equal to the matrix parameter; otherwise, false.</returns>
public bool Equals(Matrix3x2 other)
{
return
@@ -832,7 +832,9 @@ public override bool Equals(object obj)
#region IEquatable<Matrix3x4> Members
- /// <summary>Indicates whether the current matrix is equal to another matrix.</summary>
+ /// <summary>
+ /// Indicates whether the current matrix is equal to another matrix.
+ /// </summary>
/// <param name="other">An matrix to compare with this matrix.</param>
/// <returns>true if the current matrix is equal to the matrix parameter; otherwise, false.</returns>
public bool Equals(Matrix3x4 other)
@@ -630,7 +630,7 @@ public static void CreateScale(ref Vector3 scale, out Matrix4 result)
/// <param name="x">Scale factor for the x axis.</param>
/// <param name="y">Scale factor for the y axis.</param>
/// <param name="z">Scale factor for the z axis.</param>
- /// <param name="result">A scale matrix.</returns>
+ /// <param name="result">A scale matrix.</param>
public static void CreateScale(float x, float y, float z, out Matrix4 result)
{
result = Identity;
Oops, something went wrong.

0 comments on commit 31ba0a3

Please sign in to comment.