Matrix33 Class
Represents the 3x3 square matrix.
public sealed class Matrix33
- Inheritance
-
Matrix33
Constructors
Matrix33(Position, Position, Position) |
Initializes a new instance of the Matrix33 class. |
Matrix33((float X, float Y, float Z), (float X, float Y, float Z), (float X, float Y, float Z)) |
Initializes a new instance of the Matrix33 class. |
Properties
Identity |
Gets the identity matrix. |
Methods
Transpose() |
Gets the transpose matrix. |
Map(Position) |
Translate the specified position. |
Map((float X, float Y, float Z)) |
Translate the specified position. |
Mul(Matrix33) |
Gets the matrix product of |
To |
Gets the quaternion representation when this matrix is the rotation matrix. |
Determinant() |
Gets the determinant of this matrix. |
Column1() |
Gets the first column vector. |
Column2() |
Gets the second column vector. |
Column3() |
Gets the third column vector. |
Column1Tuple() |
Gets the tuple representing the first column vector. |
Column2Tuple() |
Gets the tuple representing the second column vector. |
Column3Tuple() |
Gets the tuple representing the third column vector. |
Eigenvalues |
Gets the eigenvalues and eigenvectors by the Jacobi eigenvalue algorithm when this is a symmetric matrix. |
Equals(object) | (Inherited from object) |
GetHashCode() | (Inherited from object) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |
Constructors Detail
Matrix33(Position, Position, Position)
Initializes a new instance of the Matrix33 class.
public Matrix33(Position cx, Position cy, Position cz)
Parameters
- cx
- Position
The first column vector.
- cy
- Position
The second column vector.
- cz
- Position
The third column vector.
Matrix33((float X, float Y, float Z), (float X, float Y, float Z), (float X, float Y, float Z))
Initializes a new instance of the Matrix33 class.
public Matrix33(in (float X, float Y, float Z) cx, in (float X, float Y, float Z) cy, in (float X, float Y, float Z) cz)
Parameters
The first column vector.
The second column vector.
The third column vector.
Properties Detail
Identity
Gets the identity matrix.
public static Matrix33 Identity { get; }
Property Value
Methods Detail
Transpose()
Gets the transpose matrix.
public Matrix33 Transpose()
Returns
The new transpose matrix.
Map(Position)
Translate the specified position.
public Position Map(Position p)
Parameters
- p
- Position
The position, which represents the column vector.
Returns
The position representing the result of the matrix product.
Map((float X, float Y, float Z))
Translate the specified position.
public (float X, float Y, float Z) Map((float X, float Y, float Z) p)
Parameters
The position, which represents the column vector.
Returns
The position representing the result of the matrix product.
Mul(Matrix33)
Gets the matrix product of this
and a
.
public Matrix33 Mul(Matrix33 a)
Parameters
- a
- Matrix33
Another matrix.
Returns
The matrix product this
matrix and a
.
ToWxyzTuple()
Gets the quaternion representation when this matrix is the rotation matrix.
public (float W, float X, float Y, float Z) ToWxyzTuple()
Returns
The WXYZ tuple representing the quaternion.
Determinant()
Gets the determinant of this matrix.
public float Determinant()
Returns
The determinant.
Column1()
Gets the first column vector.
public Position Column1()
Returns
The first column vector, which is equivalent to the result of
this.Map(Position.XUnit)
.
Column2()
Gets the second column vector.
public Position Column2()
Returns
The second column vector, which is equivalent to the result of
this.Map(Position.YUnit)
.
Column3()
Gets the third column vector.
public Position Column3()
Returns
The third column vector, which is equivalent to the result of
this.Map(Position.ZUnit)
.
Column1Tuple()
Gets the tuple representing the first column vector.
public (float X, float Y, float Z) Column1Tuple()
Returns
The first column vector, which is equivalent to the result of
this.Map((1f, 0f, 0f))
.
Column2Tuple()
Gets the tuple representing the second column vector.
public (float X, float Y, float Z) Column2Tuple()
Returns
The second column vector, which is equivalent to the result of
this.Map((0f, 1f, 0f))
.
Column3Tuple()
Gets the tuple representing the third column vector.
public (float X, float Y, float Z) Column3Tuple()
Returns
The third column vector, which is equivalent to the result of
this.Map((0f, 0f, 1f))
.
EigenvaluesAndVectors(float)
Gets the eigenvalues and eigenvectors by the Jacobi eigenvalue algorithm when this is a symmetric matrix.
public (Matrix33 D, Matrix33 V) EigenvaluesAndVectors(float threshold)
Parameters
- threshold
- float
All absolute values of off-diagonal entries in D are less than this threshold.
Returns
The tuple containing a diagonal matrix D and an orthogonal matrix V. The diagonal entries in D and the column vectors in V represent the eigenvalues and eigenvectors of this symmetric matrix, respectively.