Class Matrix3X2
- Namespace
- Alis.Core.Aspect.Math.Matrix
- Assembly
- Alis.dll
The matrix 3x class
public class Matrix3X2
Inheritance
Inherited Members
Constructors
Matrix3X2(float, float, float, float, float, float)
Creates a 3x2 matrix from the specified components.
public Matrix3X2(float m11, float m12, float m21, float m22, float m31, float m32)
Parameters
m11
float-
The value to assign to the first element in the first row.
m12
float-
The value to assign to the second element in the first row.
m21
float-
The value to assign to the first element in the second row.
m22
float-
The value to assign to the second element in the second row.
m31
float-
The value to assign to the first element in the third row.
m32
float-
The value to assign to the second element in the third row.
Fields
hashCode
The hash code
private readonly int hashCode
Field Value
Properties
Identity
Gets the multiplicative identity matrix.
private static Matrix3X2 Identity { get; }
Property Value
M11
The first element of the first row.
public float M11 { get; set; }
Property Value
M12
The second element of the first row.
public float M12 { get; set; }
Property Value
M21
The first element of the second row.
public float M21 { get; set; }
Property Value
M22
The second element of the second row.
public float M22 { get; set; }
Property Value
M31
The first element of the third row.
public float M31 { get; set; }
Property Value
M32
The second element of the third row.
public float M32 { get; set; }
Property Value
Translation
Gets or sets the translation component of this matrix.
public Vector2 Translation { set; }
Property Value
Methods
Add(Matrix3X2, Matrix3X2)
Adds each element in one matrix with its corresponding element in a second matrix.
public static Matrix3X2 Add(Matrix3X2 value1, Matrix3X2 value2)
Parameters
Returns
- Matrix3X2
-
The matrix that contains the summed values of
value1
andvalue2
.
CreateScale(Vector2)
Creates a scaling matrix from the specified vector scale.
public static Matrix3X2 CreateScale(Vector2 scales)
Parameters
scales
Vector2-
The scale to use.
Returns
- Matrix3X2
-
The scaling matrix.
CreateScale(float, float)
Creates a scaling matrix from the specified X and Y components.
public static Matrix3X2 CreateScale(float xScale, float yScale)
Parameters
Returns
- Matrix3X2
-
The scaling matrix.
Equals(Matrix3X2)
Describes whether this instance equals
private bool Equals(Matrix3X2 other)
Parameters
other
Matrix3X2-
The other
Returns
- bool
-
The bool
Equals(object)
Describes whether this instance equals
public override bool Equals(object obj)
Parameters
obj
object-
The obj
Returns
- bool
-
The bool
GetDeterminant()
Gets the determinant
public float GetDeterminant()
Returns
- float
-
The float
GetHashCode()
Gets the hash code
public override int GetHashCode()
Returns
- int
-
The int
ToString()
Returns the string
public override string ToString()
Returns
- string
-
The string
Operators
operator +(Matrix3X2, Matrix3X2)
Adds each element in one matrix with its corresponding element in a second matrix.
public static Matrix3X2 operator +(Matrix3X2 value1, Matrix3X2 value2)
Parameters
Returns
- Matrix3X2
-
The matrix that contains the summed values.
Remarks
The Alis.Core.Aspect.Math.Matrix.Matrix3X2.op_Addition(Alis.Core.Aspect.Math.Matrix.Matrix3X2,Alis.Core.Aspect.Math.Matrix.Matrix3X2) method defines the operation of the addition operator for Alis.Core.Aspect.Math.Matrix.Matrix3X2 objects.
operator ==(Matrix3X2, Matrix3X2)
Returns a value that indicates whether the specified matrices are equal.
public static bool operator ==(Matrix3X2 value1, Matrix3X2 value2)
Parameters
Returns
Remarks
Two matrices are equal if all their corresponding elements are equal.
operator !=(Matrix3X2, Matrix3X2)
Returns a value that indicates whether the specified matrices are not equal.
public static bool operator !=(Matrix3X2 value1, Matrix3X2 value2)
Parameters
Returns
operator *(Matrix3X2, Matrix3X2)
Multiplies two matrices together to compute the product.
public static Matrix3X2 operator *(Matrix3X2 value1, Matrix3X2 value2)
Parameters
Returns
- Matrix3X2
-
The product matrix.
operator *(Matrix3X2, float)
Multiplies a matrix by a float to compute the product.
public static Matrix3X2 operator *(Matrix3X2 value1, float value2)
Parameters
Returns
- Matrix3X2
-
The scaled matrix.
operator -(Matrix3X2, Matrix3X2)
Subtracts each element in a second matrix from its corresponding element in a first matrix.
public static Matrix3X2 operator -(Matrix3X2 value1, Matrix3X2 value2)
Parameters
Returns
- Matrix3X2
-
The matrix containing the values that result from subtracting each element in
value2
from its corresponding element invalue1
.
Remarks
The Alis.Core.Aspect.Math.Matrix.Matrix3X2 method defines the operation of the subtraction operator for Alis.Core.Aspect.Math.Matrix.Matrix3X2 objects.
operator -(Matrix3X2)
Negates the specified matrix by multiplying all its values by -1.
public static Matrix3X2 operator -(Matrix3X2 value)
Parameters
value
Matrix3X2-
The matrix to negate.
Returns
- Matrix3X2
-
The negated matrix.