|
The Open Toolkit library
1.0
|
Represents a 2x2 matrix More...
Inherits IEquatable< Matrix2 >.
Public Member Functions | |
| Matrix2 (Vector2 row0, Vector2 row1) | |
| Constructs a new instance. More... | |
| Matrix2 (float m00, float m01, float m10, float m11) | |
| Constructs a new instance More... | |
| void | Transpose () |
| Converts this instance to it's transpose. More... | |
| void | Invert () |
| Converts this instance into its inverse. More... | |
| override string | ToString () |
| Returns a System.String that represents the current Matrix4. More... | |
| override int | GetHashCode () |
| Returns the hashcode for this instance. More... | |
| override bool | Equals (object obj) |
| Indicates whether this instance and a specified object are equal. More... | |
| bool | Equals (Matrix2 other) |
| Indicates whether the current matrix is equal to another matrix. More... | |
Static Public Member Functions | |
| static void | CreateRotation (float angle, out Matrix2 result) |
| Builds a rotation matrix. More... | |
| static Matrix2 | CreateRotation (float angle) |
| Builds a rotation matrix. More... | |
| static void | CreateScale (float scale, out Matrix2 result) |
| Creates a scale matrix. More... | |
| static Matrix2 | CreateScale (float scale) |
| Creates a scale matrix. More... | |
| static void | CreateScale (Vector2 scale, out Matrix2 result) |
| Creates a scale matrix. More... | |
| static Matrix2 | CreateScale (Vector2 scale) |
| Creates a scale matrix. More... | |
| static void | CreateScale (float x, float y, out Matrix2 result) |
| Creates a scale matrix. More... | |
| static Matrix2 | CreateScale (float x, float y) |
| Creates a scale matrix. More... | |
| static void | Mult (ref Matrix2 left, float right, out Matrix2 result) |
| Multiplies and instance by a scalar. More... | |
| static Matrix2 | Mult (Matrix2 left, float right) |
| Multiplies and instance by a scalar. More... | |
| static void | Mult (ref Matrix2 left, ref Matrix2 right, out Matrix2 result) |
| Multiplies two instances. More... | |
| static Matrix2 | Mult (Matrix2 left, Matrix2 right) |
| Multiplies two instances. More... | |
| static void | Mult (ref Matrix2 left, ref Matrix2x3 right, out Matrix2x3 result) |
| Multiplies two instances. More... | |
| static Matrix2x3 | Mult (Matrix2 left, Matrix2x3 right) |
| Multiplies two instances. More... | |
| static void | Mult (ref Matrix2 left, ref Matrix2x4 right, out Matrix2x4 result) |
| Multiplies two instances. More... | |
| static Matrix2x4 | Mult (Matrix2 left, Matrix2x4 right) |
| Multiplies two instances. More... | |
| static void | Add (ref Matrix2 left, ref Matrix2 right, out Matrix2 result) |
| Adds two instances. More... | |
| static Matrix2 | Add (Matrix2 left, Matrix2 right) |
| Adds two instances. More... | |
| static void | Subtract (ref Matrix2 left, ref Matrix2 right, out Matrix2 result) |
| Subtracts two instances. More... | |
| static Matrix2 | Subtract (Matrix2 left, Matrix2 right) |
| Subtracts two instances. More... | |
| static void | Invert (ref Matrix2 mat, out Matrix2 result) |
| Calculate the inverse of the given matrix More... | |
| static Matrix2 | Invert (Matrix2 mat) |
| Calculate the inverse of the given matrix More... | |
| static void | Transpose (ref Matrix2 mat, out Matrix2 result) |
| Calculate the transpose of the given matrix. More... | |
| static Matrix2 | Transpose (Matrix2 mat) |
| Calculate the transpose of the given matrix. More... | |
| static Matrix2 | operator* (float left, Matrix2 right) |
| Scalar multiplication. More... | |
| static Matrix2 | operator* (Matrix2 left, float right) |
| Scalar multiplication. More... | |
| static Matrix2 | operator* (Matrix2 left, Matrix2 right) |
| Matrix multiplication More... | |
| static Matrix2x3 | operator* (Matrix2 left, Matrix2x3 right) |
| Matrix multiplication More... | |
| static Matrix2x4 | operator* (Matrix2 left, Matrix2x4 right) |
| Matrix multiplication More... | |
| static Matrix2 | operator+ (Matrix2 left, Matrix2 right) |
| Matrix addition More... | |
| static Matrix2 | operator- (Matrix2 left, Matrix2 right) |
| Matrix subtraction More... | |
| static bool | operator== (Matrix2 left, Matrix2 right) |
| Compares two instances for equality. More... | |
| static bool | operator!= (Matrix2 left, Matrix2 right) |
| Compares two instances for inequality. More... | |
Public Attributes | |
| Vector2 | Row0 |
| Top row of the matrix. More... | |
| Vector2 | Row1 |
| Bottom row of the matrix. More... | |
Static Public Attributes | |
| static readonly Matrix2 | Identity = new Matrix2(Vector2.UnitX, Vector2.UnitY) |
| The identity matrix. More... | |
| static readonly Matrix2 | Zero = new Matrix2(Vector2.Zero, Vector2.Zero) |
| The zero matrix. More... | |
Properties | |
| float | Determinant [get] |
| Gets the determinant of this matrix. More... | |
| Vector2 | Column0 [get, set] |
| Gets or sets the first column of this matrix. More... | |
| Vector2 | Column1 [get, set] |
| Gets or sets the second column of this matrix. More... | |
| float | M11 [get, set] |
| Gets or sets the value at row 1, column 1 of this instance. More... | |
| float | M12 [get, set] |
| Gets or sets the value at row 1, column 2 of this instance. More... | |
| float | M21 [get, set] |
| Gets or sets the value at row 2, column 1 of this instance. More... | |
| float | M22 [get, set] |
| Gets or sets the value at row 2, column 2 of this instance. More... | |
| Vector2 | Diagonal [get, set] |
| Gets or sets the values along the main diagonal of the matrix. More... | |
| float | Trace [get] |
| Gets the trace of the matrix, the sum of the values along the diagonal. More... | |
| float | this[int rowIndex, int columnIndex] [get, set] |
| Gets or sets the value at a specified row and column. More... | |
Represents a 2x2 matrix
Constructs a new instance.
| row0 | Top row of the matrix. |
| row1 | Bottom row of the matrix. |
| OpenTK.Matrix2.Matrix2 | ( | float | m00, |
| float | m01, | ||
| float | m10, | ||
| float | m11 | ||
| ) |
Constructs a new instance
| m00 | First item of the first row of the matrix. |
| m01 | Second item of the first row of the matrix. |
| m10 | First item of the second row of the matrix. |
| m11 | Second item of the second row of the matrix. |
Adds two instances.
| left | The left operand of the addition. |
| right | The right operand of the addition. |
| result | A new instance that is the result of the addition. |
Adds two instances.
| left | The left operand of the addition. |
| right | The right operand of the addition. |
|
static |
Builds a rotation matrix.
| angle | The counter-clockwise angle in radians. |
| result | The resulting Matrix2 instance. |
|
static |
Builds a rotation matrix.
| angle | The counter-clockwise angle in radians. |
|
static |
Creates a scale matrix.
| scale | Single scale factor for the x, y, and z axes. |
| result | A scale matrix. |
|
static |
Creates a scale matrix.
| scale | Single scale factor for the x and y axes. |
Creates a scale matrix.
| scale | Scale factors for the x and y axes. |
| result | A scale matrix. |
Creates a scale matrix.
| scale | Scale factors for the x and y axes. |
|
static |
Creates a scale matrix.
| x | Scale factor for the x axis. |
| y | Scale factor for the y axis. |
| result | A scale matrix. |
|
static |
Creates a scale matrix.
| x | Scale factor for the x axis. |
| y | Scale factor for the y axis. |
| override bool OpenTK.Matrix2.Equals | ( | object | obj | ) |
Indicates whether this instance and a specified object are equal.
| obj | The object to compare to. |
| bool OpenTK.Matrix2.Equals | ( | Matrix2 | other | ) |
Indicates whether the current matrix is equal to another matrix.
| other | An matrix to compare with this matrix. |
| override int OpenTK.Matrix2.GetHashCode | ( | ) |
Returns the hashcode for this instance.
| void OpenTK.Matrix2.Invert | ( | ) |
Converts this instance into its inverse.
Calculate the inverse of the given matrix
| mat | The matrix to invert |
| result | The inverse of the given matrix if it has one, or the input if it is singular |
| InvalidOperationException | Thrown if the Matrix2 is singular. |
Calculate the inverse of the given matrix
| mat | The matrix to invert |
| InvalidOperationException | Thrown if the Matrix2 is singular. |
Multiplies and instance by a scalar.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
| result | A new instance that is the result of the multiplication. |
Multiplies and instance by a scalar.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
Multiplies two instances.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
| result | A new instance that is the result of the multiplication. |
Multiplies two instances.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
|
static |
Multiplies two instances.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
| result | A new instance that is the result of the multiplication. |
Multiplies two instances.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
|
static |
Multiplies two instances.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
| result | A new instance that is the result of the multiplication. |
Multiplies two instances.
| left | The left operand of the multiplication. |
| right | The right operand of the multiplication. |
Compares two instances for inequality.
| left | The first instance. |
| right | The second instance. |
Scalar multiplication.
| left | left-hand operand |
| right | right-hand operand |
Scalar multiplication.
| left | left-hand operand |
| right | right-hand operand |
Matrix multiplication
| left | left-hand operand |
| right | right-hand operand |
Matrix multiplication
| left | left-hand operand |
| right | right-hand operand |
Matrix multiplication
| left | left-hand operand |
| right | right-hand operand |
Matrix addition
| left | left-hand operand |
| right | right-hand operand |
Matrix subtraction
| left | left-hand operand |
| right | right-hand operand |
Compares two instances for equality.
| left | The first instance. |
| right | The second instance. |
|
static |
Subtracts two instances.
| left | The left operand of the subtraction. |
| right | The right operand of the subtraction. |
| result | A new instance that is the result of the subtraction. |
Subtracts two instances.
| left | The left operand of the subtraction. |
| right | The right operand of the subtraction. |
| override string OpenTK.Matrix2.ToString | ( | ) |
Returns a System.String that represents the current Matrix4.
| void OpenTK.Matrix2.Transpose | ( | ) |
Converts this instance to it's transpose.
Calculate the transpose of the given matrix.
| mat | The matrix to transpose. |
| result | The transpose of the given matrix. |
Calculate the transpose of the given matrix.
| mat | The matrix to transpose. |
|
static |
The identity matrix.
| Vector2 OpenTK.Matrix2.Row0 |
Top row of the matrix.
| Vector2 OpenTK.Matrix2.Row1 |
Bottom row of the matrix.
The zero matrix.
|
getset |
Gets or sets the first column of this matrix.
|
getset |
Gets or sets the second column of this matrix.
|
get |
Gets the determinant of this matrix.
|
getset |
Gets or sets the values along the main diagonal of the matrix.
|
getset |
Gets or sets the value at row 1, column 1 of this instance.
|
getset |
Gets or sets the value at row 1, column 2 of this instance.
|
getset |
Gets or sets the value at row 2, column 1 of this instance.
|
getset |
Gets or sets the value at row 2, column 2 of this instance.
|
getset |
Gets or sets the value at a specified row and column.
|
get |
Gets the trace of the matrix, the sum of the values along the diagonal.