[]
Represents a 5x4 matrix for the built-in ColorMatrix effect.
public struct Matrix5x4 : IEquatable<Matrix5x4>, IFormattable
Initializes a new instance of the Matrix5x4 struct.
public Matrix5x4(float M11, float M12, float M13, float M14, float M21, float M22, float M23, float M24, float M31, float M32, float M33, float M34, float M41, float M42, float M43, float M44, float M51, float M52, float M53, float M54)
M11
floatThe value to assign at row 1 column 1 of the Matrix5x4.
M12
floatThe value to assign at row 1 column 2 of the Matrix5x4.
M13
floatThe value to assign at row 1 column 3 of the Matrix5x4.
M14
floatThe value to assign at row 1 column 4 of the Matrix5x4.
M21
floatThe value to assign at row 2 column 1 of the Matrix5x4.
M22
floatThe value to assign at row 2 column 2 of the Matrix5x4.
M23
floatThe value to assign at row 2 column 3 of the Matrix5x4.
M24
floatThe value to assign at row 2 column 4 of the Matrix5x4.
M31
floatThe value to assign at row 3 column 1 of the Matrix5x4.
M32
floatThe value to assign at row 3 column 2 of the Matrix5x4.
M33
floatThe value to assign at row 3 column 3 of the Matrix5x4.
M34
floatThe value to assign at row 3 column 4 of the Matrix5x4.
M41
floatThe value to assign at row 4 column 1 of the Matrix5x4.
M42
floatThe value to assign at row 4 column 2 of the Matrix5x4.
M43
floatThe value to assign at row 4 column 3 of the Matrix5x4.
M44
floatThe value to assign at row 4 column 4 of the Matrix5x4.
M51
floatThe value to assign at row 5 column 1 of the Matrix5x4.
M52
floatThe value to assign at row 5 column 2 of the Matrix5x4.
M53
floatThe value to assign at row 5 column 3 of the Matrix5x4.
M54
floatThe value to assign at row 5 column 4 of the Matrix5x4.
Initializes a new instance of the Matrix5x4 struct.
public Matrix5x4(float value)
value
floatThe value that will be assigned to all components.
Initializes a new instance of the Matrix5x4 struct.
public Matrix5x4(float[] values)
values
float[]The values to assign to the components of the Matrix5x4. This must be an array with 20 elements.
Thrown when values
is null
.
Thrown when values
contains more or less than sixteen elements.
The identity Matrix5x4.
public static readonly Matrix5x4 Identity
Value at row 1 column 1 of the Matrix5x4.
public float M11
Value at row 1 column 2 of the Matrix5x4.
public float M12
Value at row 1 column 3 of the Matrix5x4.
public float M13
Value at row 1 column 4 of the Matrix5x4.
public float M14
Value at row 2 column 1 of the Matrix5x4.
public float M21
Value at row 2 column 2 of the Matrix5x4.
public float M22
Value at row 2 column 3 of the Matrix5x4.
public float M23
Value at row 2 column 4 of the Matrix5x4.
public float M24
Value at row 3 column 1 of the Matrix5x4.
public float M31
Value at row 3 column 2 of the Matrix5x4.
public float M32
Value at row 3 column 3 of the Matrix5x4.
public float M33
Value at row 3 column 4 of the Matrix5x4.
public float M34
Value at row 4 column 1 of the Matrix5x4.
public float M41
Value at row 4 column 2 of the Matrix5x4.
public float M42
Value at row 4 column 3 of the Matrix5x4.
public float M43
Value at row 4 column 4 of the Matrix5x4.
public float M44
Value at row 5 column 1 of the Matrix5x4.
public float M51
Value at row 5 column 2 of the Matrix5x4.
public float M52
Value at row 5 column 3 of the Matrix5x4.
public float M53
Value at row 5 column 4 of the Matrix5x4.
public float M54
The size of the Matrix5x4 type, in bytes.
public const int SizeInBytes = 80
A Matrix5x4 with all of its components set to zero.
public static readonly Matrix5x4 Zero
Gets a value indicating whether this instance is an identity Matrix5x4.
public bool IsIdentity { get; }
true
if this instance is an identity Matrix5x4; otherwise, false
.
Gets or sets the component at the specified index.
public float this[int row, int column] { get; set; }
row
intThe row of the Matrix5x4 to access.
column
intThe column of the Matrix5x4 to access.
The value of the Matrix5x4 component, depending on the index.
Thrown when the row
or column
is out of the range [0, 3].
Gets or sets the component at the specified index.
public float this[int index] { get; set; }
index
intThe zero-based index of the component to access.
The value of the Matrix5x4 component, depending on the index.
Thrown when the index
is out of the range [0, 15].
Gets or sets the first row in the Matrix5x4; that is M11, M12, M13, and M14.
public Vector4 Row1 { get; set; }
Gets or sets the second row in the Matrix5x4; that is M21, M22, M23, and M24.
public Vector4 Row2 { get; set; }
Gets or sets the third row in the Matrix5x4; that is M31, M32, M33, and M34.
public Vector4 Row3 { get; set; }
Gets or sets the fourth row in the Matrix5x4; that is M41, M42, M43, and M44.
public Vector4 Row4 { get; set; }
Gets or sets the fifth row in the Matrix5x4; that is M51, M52, M53, and M54.
public Vector4 Row5 { get; set; }
Determines the sum of two matrices.
public static Matrix5x4 Add(in Matrix5x4 left, in Matrix5x4 right)
The sum of the two matrices.
Divides a Matrix5x4 by the given value.
public static Matrix5x4 Divide(in Matrix5x4 left, float right)
left
Matrix5x4The Matrix5x4 to divide.
right
floatThe amount by which to divide.
The resulting Matrix5x4.
Determines whether the specified Matrix5x4 is equal to this instance.
public bool Equals(Matrix5x4 other)
other
Matrix5x4Determines whether two instances of Matrix5x4 are equal.
public static bool Equals(in Matrix5x4 left, in Matrix5x4 right)
Determines whether the specified object is equal to this instance.
public override bool Equals(object value)
value
objectReturns a hash code for this instance.
public override int GetHashCode()
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Performs a linear interpolation between two matrices based on the given weighting.
public static Matrix5x4 Lerp(in Matrix5x4 matrix1, in Matrix5x4 matrix2, float amount)
matrix1
Matrix5x4The first matrix.
matrix2
Matrix5x4The second matrix.
amount
floatA value between 0 and 1 that indicates the weight of matrix2.
The interpolated matrix.
Scales a Matrix5x4 by the given value.
public static Matrix5x4 Multiply(in Matrix5x4 left, float right)
left
Matrix5x4The Matrix5x4 to scale.
right
floatThe amount by which to scale.
The scaled matrix.
Negates a Matrix5x4.
public static Matrix5x4 Negate(in Matrix5x4 value)
value
Matrix5x4The Matrix5x4 to be negated.
Negates a Matrix5x4.
public static void NegateRef(ref Matrix5x4 value)
value
Matrix5x4The Matrix5x4 to be negated.
Determines the difference between two matrices.
public static Matrix5x4 Subtract(in Matrix5x4 left, in Matrix5x4 right)
The difference between the two matrices.
Creates an array containing the elements of the Matrix5x4.
public float[] ToArray()
Returns a string that represents the current object.
public override string ToString()
Returns a string that represents this instance.
public string ToString(IFormatProvider formatProvider)
formatProvider
System.IFormatProviderThe format provider.
A string that represents this instance.
Returns a string that represents this instance.
public string ToString(string format, IFormatProvider formatProvider)
format
stringThe format.
formatProvider
System.IFormatProviderThe format provider.
A string that represents this instance.
Returns a string that represents this instance.
public string ToString(string format)
format
stringThe format.
A string that represents this instance.
Adds two matricies.
public static Matrix5x4 operator +(in Matrix5x4 left, in Matrix5x4 right)
The sum of the two matricies.
Scales a Matrix5x4 by a given value.
public static Matrix5x4 operator /(in Matrix5x4 left, float right)
left
Matrix5x4The Matrix5x4 to scale.
right
floatThe amount by which to scale.
The scaled Matrix5x4.
Tests for equality between two objects.
public static bool operator ==(in Matrix5x4 left, in Matrix5x4 right)
true
if left
has the same value as right
; otherwise, false
.
Tests for inequality between two objects.
public static bool operator !=(in Matrix5x4 left, in Matrix5x4 right)
true
if left
has a different value than right
; otherwise, false
.
Scales a Matrix5x4 by a given value.
public static Matrix5x4 operator *(in Matrix5x4 left, float right)
left
Matrix5x4The Matrix5x4 to scale.
right
floatThe amount by which to scale.
The scaled Matrix5x4.
Scales a Matrix5x4 by a given value.
public static Matrix5x4 operator *(float left, in Matrix5x4 right)
left
floatThe amount by which to scale.
right
Matrix5x4The Matrix5x4 to scale.
The scaled Matrix5x4.
Subtracts two matricies.
public static Matrix5x4 operator -(in Matrix5x4 left, in Matrix5x4 right)
The difference between the two matricies.
Negates a Matrix5x4.
public static Matrix5x4 operator -(in Matrix5x4 value)
value
Matrix5x4The Matrix5x4 to negate.
The negated Matrix5x4.