Struct Matrix4x2d
Represents a 4x2 matrix.
Implements
Inherited Members
Namespace: OpenTK
Assembly: cs.temp.dll.dll
Syntax
public struct Matrix4x2d : IEquatable<Matrix4x2d>
Constructors
Matrix4x2d(Vector2d, Vector2d, Vector2d, Vector2d)
Constructs a new instance.
Declaration
public Matrix4x2d(Vector2d row0, Vector2d row1, Vector2d row2, Vector2d row3)
Parameters
Type | Name | Description |
---|---|---|
Vector2d | row0 | Top row of the matrix. |
Vector2d | row1 | Second row of the matrix. |
Vector2d | row2 | Third row of the matrix. |
Vector2d | row3 | Bottom row of the matrix. |
Matrix4x2d(Double, Double, Double, Double, Double, Double, Double, Double)
Constructs a new instance
Declaration
public Matrix4x2d(double m00, double m01, double m10, double m11, double m20, double m21, double m30, double m31)
Parameters
Type | Name | Description |
---|---|---|
System.Double | m00 | First item of the first row of the matrix. |
System.Double | m01 | Second item of the first row of the matrix. |
System.Double | m10 | First item of the second row of the matrix. |
System.Double | m11 | Second item of the second row of the matrix. |
System.Double | m20 | First item of the third row of the matrix. |
System.Double | m21 | Second item of the third row of the matrix. |
System.Double | m30 | First item of the fourth row of the matrix. |
System.Double | m31 | Second item of the fourth row of the matrix. |
Fields
Row0
Top row of the matrix.
Declaration
public Vector2d Row0
Field Value
Type | Description |
---|---|
Vector2d |
Row1
Second row of the matrix.
Declaration
public Vector2d Row1
Field Value
Type | Description |
---|---|
Vector2d |
Row2
Third row of the matrix.
Declaration
public Vector2d Row2
Field Value
Type | Description |
---|---|
Vector2d |
Row3
Bottom row of the matrix.
Declaration
public Vector2d Row3
Field Value
Type | Description |
---|---|
Vector2d |
Zero
The zero matrix.
Declaration
public static readonly Matrix4x2d Zero
Field Value
Type | Description |
---|---|
Matrix4x2d |
Properties
Column0
Gets or sets the first column of this matrix.
Declaration
public Vector4d Column0 { get; set; }
Property Value
Type | Description |
---|---|
Vector4d |
Column1
Gets or sets the second column of this matrix.
Declaration
public Vector4d Column1 { get; set; }
Property Value
Type | Description |
---|---|
Vector4d |
Diagonal
Gets or sets the values along the main diagonal of the matrix.
Declaration
public Vector2d Diagonal { get; set; }
Property Value
Type | Description |
---|---|
Vector2d |
Item[Int32, Int32]
Gets or sets the value at a specified row and column.
Declaration
public double this[int rowIndex, int columnIndex] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | |
System.Int32 | columnIndex |
Property Value
Type | Description |
---|---|
System.Double |
M11
Gets or sets the value at row 1, column 1 of this instance.
Declaration
public double M11 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M12
Gets or sets the value at row 1, column 2 of this instance.
Declaration
public double M12 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M21
Gets or sets the value at row 2, column 1 of this instance.
Declaration
public double M21 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M22
Gets or sets the value at row 2, column 2 of this instance.
Declaration
public double M22 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M31
Gets or sets the value at row 3, column 1 of this instance.
Declaration
public double M31 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M32
Gets or sets the value at row 3, column 2 of this instance.
Declaration
public double M32 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M41
Gets or sets the value at row 4, column 1 of this instance.
Declaration
public double M41 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M42
Gets or sets the value at row 4, column 2 of this instance.
Declaration
public double M42 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Trace
Gets the trace of the matrix, the sum of the values along the diagonal.
Declaration
public double Trace { get; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
Add(Matrix4x2d, Matrix4x2d)
Adds two instances.
Declaration
public static Matrix4x2d Add(Matrix4x2d left, Matrix4x2d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the addition. |
Matrix4x2d | right | The right operand of the addition. |
Returns
Type | Description |
---|---|
Matrix4x2d | A new instance that is the result of the addition. |
Add(ref Matrix4x2d, ref Matrix4x2d, out Matrix4x2d)
Adds two instances.
Declaration
public static void Add(ref Matrix4x2d left, ref Matrix4x2d right, out Matrix4x2d result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the addition. |
Matrix4x2d | right | The right operand of the addition. |
Matrix4x2d | result | A new instance that is the result of the addition. |
CreateRotation(Double)
Builds a rotation matrix.
Declaration
public static Matrix4x2d CreateRotation(double angle)
Parameters
Type | Name | Description |
---|---|---|
System.Double | angle | The counter-clockwise angle in radians. |
Returns
Type | Description |
---|---|
Matrix4x2d | The resulting Matrix3x2 instance. |
CreateRotation(Double, out Matrix4x2d)
Builds a rotation matrix.
Declaration
public static void CreateRotation(double angle, out Matrix4x2d result)
Parameters
Type | Name | Description |
---|---|---|
System.Double | angle | The counter-clockwise angle in radians. |
Matrix4x2d | result | The resulting Matrix3x2 instance. |
CreateScale(Vector2d)
Creates a scale matrix.
Declaration
public static Matrix4x2d CreateScale(Vector2d scale)
Parameters
Type | Name | Description |
---|---|---|
Vector2d | scale | Scale factors for the x and y axes. |
Returns
Type | Description |
---|---|
Matrix4x2d | A scale matrix. |
CreateScale(Vector2d, out Matrix4x2d)
Creates a scale matrix.
Declaration
public static void CreateScale(Vector2d scale, out Matrix4x2d result)
Parameters
Type | Name | Description |
---|---|---|
Vector2d | scale | Scale factors for the x and y axes. |
Matrix4x2d | result | A scale matrix. |
CreateScale(Double)
Creates a scale matrix.
Declaration
public static Matrix4x2d CreateScale(double scale)
Parameters
Type | Name | Description |
---|---|---|
System.Double | scale | Single scale factor for the x and y axes. |
Returns
Type | Description |
---|---|
Matrix4x2d | A scale matrix. |
CreateScale(Double, out Matrix4x2d)
Creates a scale matrix.
Declaration
public static void CreateScale(double scale, out Matrix4x2d result)
Parameters
Type | Name | Description |
---|---|---|
System.Double | scale | Single scale factor for the x, y, and z axes. |
Matrix4x2d | result | A scale matrix. |
CreateScale(Double, Double)
Creates a scale matrix.
Declaration
public static Matrix4x2d CreateScale(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | Scale factor for the x axis. |
System.Double | y | Scale factor for the y axis. |
Returns
Type | Description |
---|---|
Matrix4x2d | A scale matrix. |
CreateScale(Double, Double, out Matrix4x2d)
Creates a scale matrix.
Declaration
public static void CreateScale(double x, double y, out Matrix4x2d result)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | Scale factor for the x axis. |
System.Double | y | Scale factor for the y axis. |
Matrix4x2d | result | A scale matrix. |
Equals(Matrix4x2d)
Indicates whether the current matrix is equal to another matrix.
Declaration
public bool Equals(Matrix4x2d other)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | other | An matrix to compare with this matrix. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current matrix is equal to the matrix parameter; otherwise, false. |
Equals(Object)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | True if the instances are equal; false otherwise. |
Overrides
GetHashCode()
Returns the hashcode for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A System.Int32 containing the unique hashcode for this instance. |
Overrides
Mult(Matrix4x2d, Matrix2d)
Multiplies two instances.
Declaration
public static Matrix4x2d Mult(Matrix4x2d left, Matrix2d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the multiplication. |
Matrix2d | right | The right operand of the multiplication. |
Returns
Type | Description |
---|---|
Matrix4x2d | A new instance that is the result of the multiplication. |
Mult(Matrix4x2d, Matrix2x3d)
Multiplies two instances.
Declaration
public static Matrix4x3d Mult(Matrix4x2d left, Matrix2x3d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the multiplication. |
Matrix2x3d | right | The right operand of the multiplication. |
Returns
Type | Description |
---|---|
Matrix4x3d | A new instance that is the result of the multiplication. |
Mult(Matrix4x2d, Matrix2x4d)
Multiplies two instances.
Declaration
public static Matrix4d Mult(Matrix4x2d left, Matrix2x4d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the multiplication. |
Matrix2x4d | right | The right operand of the multiplication. |
Returns
Type | Description |
---|---|
Matrix4d | A new instance that is the result of the multiplication. |
Mult(Matrix4x2d, Double)
Multiplies and instance by a scalar.
Declaration
public static Matrix4x2d Mult(Matrix4x2d left, double right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the multiplication. |
System.Double | right | The right operand of the multiplication. |
Returns
Type | Description |
---|---|
Matrix4x2d | A new instance that is the result of the multiplication. |
Mult(ref Matrix4x2d, ref Matrix2d, out Matrix4x2d)
Multiplies two instances.
Declaration
public static void Mult(ref Matrix4x2d left, ref Matrix2d right, out Matrix4x2d result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the multiplication. |
Matrix2d | right | The right operand of the multiplication. |
Matrix4x2d | result | A new instance that is the result of the multiplication. |
Mult(ref Matrix4x2d, ref Matrix2x3d, out Matrix4x3d)
Multiplies two instances.
Declaration
public static void Mult(ref Matrix4x2d left, ref Matrix2x3d right, out Matrix4x3d result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the multiplication. |
Matrix2x3d | right | The right operand of the multiplication. |
Matrix4x3d | result | A new instance that is the result of the multiplication. |
Mult(ref Matrix4x2d, ref Matrix2x4d, out Matrix4d)
Multiplies two instances.
Declaration
public static void Mult(ref Matrix4x2d left, ref Matrix2x4d right, out Matrix4d result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the multiplication. |
Matrix2x4d | right | The right operand of the multiplication. |
Matrix4d | result | A new instance that is the result of the multiplication. |
Mult(ref Matrix4x2d, Double, out Matrix4x2d)
Multiplies and instance by a scalar.
Declaration
public static void Mult(ref Matrix4x2d left, double right, out Matrix4x2d result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the multiplication. |
System.Double | right | The right operand of the multiplication. |
Matrix4x2d | result | A new instance that is the result of the multiplication. |
Subtract(Matrix4x2d, Matrix4x2d)
Subtracts two instances.
Declaration
public static Matrix4x2d Subtract(Matrix4x2d left, Matrix4x2d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the subtraction. |
Matrix4x2d | right | The right operand of the subtraction. |
Returns
Type | Description |
---|---|
Matrix4x2d | A new instance that is the result of the subtraction. |
Subtract(ref Matrix4x2d, ref Matrix4x2d, out Matrix4x2d)
Subtracts two instances.
Declaration
public static void Subtract(ref Matrix4x2d left, ref Matrix4x2d right, out Matrix4x2d result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The left operand of the subtraction. |
Matrix4x2d | right | The right operand of the subtraction. |
Matrix4x2d | result | A new instance that is the result of the subtraction. |
ToString()
Returns a System.String that represents the current Matrix3d.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The string representation of the matrix. |
Overrides
Transpose(Matrix4x2d)
Calculate the transpose of the given matrix.
Declaration
public static Matrix2x4d Transpose(Matrix4x2d mat)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | mat | The matrix to transpose. |
Returns
Type | Description |
---|---|
Matrix2x4d | The transpose of the given matrix. |
Transpose(ref Matrix4x2d, out Matrix2x4d)
Calculate the transpose of the given matrix.
Declaration
public static void Transpose(ref Matrix4x2d mat, out Matrix2x4d result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | mat | The matrix to transpose. |
Matrix2x4d | result | The transpose of the given matrix. |
Operators
Addition(Matrix4x2d, Matrix4x2d)
Matrix addition
Declaration
public static Matrix4x2d operator +(Matrix4x2d left, Matrix4x2d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | left-hand operand |
Matrix4x2d | right | right-hand operand |
Returns
Type | Description |
---|---|
Matrix4x2d | A new Matrix4x2d which holds the result of the addition |
Equality(Matrix4x2d, Matrix4x2d)
Compares two instances for equality.
Declaration
public static bool operator ==(Matrix4x2d left, Matrix4x2d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The first instance. |
Matrix4x2d | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | True, if left equals right; false otherwise. |
Inequality(Matrix4x2d, Matrix4x2d)
Compares two instances for inequality.
Declaration
public static bool operator !=(Matrix4x2d left, Matrix4x2d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | The first instance. |
Matrix4x2d | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | True, if left does not equal right; false otherwise. |
Multiply(Matrix4x2d, Matrix2d)
Matrix multiplication
Declaration
public static Matrix4x2d operator *(Matrix4x2d left, Matrix2d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | left-hand operand |
Matrix2d | right | right-hand operand |
Returns
Type | Description |
---|---|
Matrix4x2d | A new Matrix2d which holds the result of the multiplication |
Multiply(Matrix4x2d, Matrix2x3d)
Matrix multiplication
Declaration
public static Matrix4x3d operator *(Matrix4x2d left, Matrix2x3d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | left-hand operand |
Matrix2x3d | right | right-hand operand |
Returns
Type | Description |
---|---|
Matrix4x3d | A new Matrix4x3d which holds the result of the multiplication |
Multiply(Matrix4x2d, Matrix2x4d)
Matrix multiplication
Declaration
public static Matrix4d operator *(Matrix4x2d left, Matrix2x4d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | left-hand operand |
Matrix2x4d | right | right-hand operand |
Returns
Type | Description |
---|---|
Matrix4d | A new Matrix4d which holds the result of the multiplication |
Multiply(Matrix4x2d, Double)
Scalar multiplication.
Declaration
public static Matrix4x2d operator *(Matrix4x2d left, double right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | left-hand operand |
System.Double | right | right-hand operand |
Returns
Type | Description |
---|---|
Matrix4x2d | A new Matrix4x2d which holds the result of the multiplication |
Multiply(Double, Matrix4x2d)
Scalar multiplication.
Declaration
public static Matrix4x2d operator *(double left, Matrix4x2d right)
Parameters
Type | Name | Description |
---|---|---|
System.Double | left | left-hand operand |
Matrix4x2d | right | right-hand operand |
Returns
Type | Description |
---|---|
Matrix4x2d | A new Matrix4x2d which holds the result of the multiplication |
Subtraction(Matrix4x2d, Matrix4x2d)
Matrix subtraction
Declaration
public static Matrix4x2d operator -(Matrix4x2d left, Matrix4x2d right)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x2d | left | left-hand operand |
Matrix4x2d | right | right-hand operand |
Returns
Type | Description |
---|---|
Matrix4x2d | A new Matrix4x2d which holds the result of the subtraction |