A class representing a 3x3 matrix. It usually represents a linear transformation in 3D space.
More...
Inherits IEquatable< Matrix >, and IComparable< Matrix >.
|
|
| Matrix () |
| | Constructs an empty matrix with all elements set to zero.
|
| |
| | Matrix (float d) |
| | Constructs a matrix with the specified value for the main diagonal. More...
|
| |
| | Matrix (Vector a, Vector b, Vector c) |
| | Constructor from the three columns of the matrix. The vector coordinates are copied into the matrix own columns. The references are not preserved. More...
|
| |
| | Matrix (Vector diagonal) |
| | Constructs a matrix using the passed Vector values for the new matrix main diagonal. More...
|
| |
| | Matrix (Vector[] columns) |
| | Constructs a matrix from an array of 3 vectors used as columns. More...
|
| |
| Matrix | AddDiagonal (Vector a) |
| | Returns a new matrix adding the passed vector values to the main diagonal of this one. More...
|
| |
| int | CompareTo (Matrix m) |
| | Compares the matrices. More...
|
| |
|
bool | Equals (Matrix m) |
| | Returns true if the elements of the two matrices are exactly equal (unlike operator== which uses epsilon).
|
| |
|
override bool | Equals (object obj) |
| | Returns true if the elements of the two matrices are exactly equal (unlike operator== which uses epsilon).
|
| |
| double | GetDeterminant () |
| | Returns the determinant. More...
|
| |
|
override int | GetHashCode () |
| |
| Vector | GetRow (int i) |
| | Gets the values for the i-th row. More...
|
| |
| Matrix | Inverse () |
| | Returns the inverse matrix of this one. More...
|
| |
| Matrix | NormalTransformMatrix (bool flip=false) |
| | Creates a new matrix for transforming the normals of an object. More...
|
| |
|
Matrix | Orthogonal () |
| | Returns orthogonal matrix (each column vector is orthogonal to the other two in 3D space).
|
| |
| Matrix | Orthonormal () |
| | Returns orthonormal matrix (each column vector is normalized and orthogonal to the other two in 3D space). More...
|
| |
| Matrix | ReplaceColumn (int i, Vector column) |
| | Gets a new matrix the the i-th column values replaced with the given one. More...
|
| |
| Matrix | ReplaceRow (int i, Vector row) |
| | Gets a new matrix the the i-th row values replaced with the given one. More...
|
| |
| Matrix | Rotate (Vector axis) |
| | Returns a new matrix which is this one rotated around the given axis. More...
|
| |
| Vector | RotationAngles () |
| | Returns the tree three angles, used to compose the matrix, called Euler angles if [M] = [Rx] * [Ry] * [Rz], that is {x,y,z}, given [M], where [Ri] is a rotation matrix for a given axis and angle. Check the rotation matrix composition functions MakeRotationMatrixX(float), MakeRotationMatrixY(float) and MakeRotationMatrixZ(float) More...
|
| |
| Vector | Scale () |
| | Returns the scaling component of matrix: if [M] = [R] x {S}, that is {S}, given [M] More...
|
| |
|
override string | ToString () |
| |
| Matrix | Transpose () |
| | Returns a Transposed matrix of this one. More...
|
| |
| Matrix | WithoutScale () |
| | Returns a matrix with normalized columns. This effectively removes scaling from a transform matrix. More...
|
| |
|
| static Matrix | ComputeCholeskyDecomposition (Matrix m) |
| | Compute the Cholesky decomposition of the given matrix: M = LL* The Cholesky decomposition if valid only for symmetric, positive-definite matrices More...
|
| |
| static Tuple< Matrix, Matrix > | ComputeQRFactorization (Matrix m) |
| | Compute the QR-factorization m=q*r of a matrix m. The method fails to factorize singular and close to singular matrices. More...
|
| |
| static Matrix | FromRows (Vector row0, Vector row1, Vector row2) |
| | Constructs a matrix from the three rows. The vector row coordinates are copied into the new matrix own columns. More...
|
| |
| static Matrix | FromString (string matrix) |
| | Parses a matrix string value and returns a matrix instance. More...
|
| |
| static Matrix | MakeDiagonal (Vector values) |
| | Returns a diagonal matrix. More...
|
| |
| static Matrix | MakeOuterProduct (Vector a, Vector b) |
| | Returns an outer product matrix of the two given vectors. More...
|
| |
| static Matrix | MakeRotationMatrixX (float radians) |
| | Creates a new affine transformation matrix for rotation around the X axis. More...
|
| |
| static Matrix | MakeRotationMatrixY (float radians) |
| | Creates a new affine transformation matrix for rotation around the Y axis. More...
|
| |
| static Matrix | MakeRotationMatrixZ (float radians) |
| | Creates a new affine transformation matrix for rotation around the Z axis. More...
|
| |
|
static bool | operator!= (Matrix m0, Matrix m1) |
| |
|
static Matrix | operator* (float left, Matrix right) |
| |
|
static Matrix | operator* (Matrix left, float right) |
| |
| static Vector | operator* (Matrix m, Vector v) |
| | Multiplies a matrix by a vector. Note that this is different from multiplying the same vector by the same matrix. More...
|
| |
| static Matrix | operator* (Matrix m1, Matrix m2) |
| | Multiplies two matrices. The result is a new matrix instance. More...
|
| |
| static Vector | operator* (Vector v, Matrix m) |
| | Multiplies a vector by a matrix. Note that this is different from multiplying the same matrix by the same vector. More...
|
| |
|
static Matrix | operator+ (Matrix left, float right) |
| |
|
static Matrix | operator+ (Matrix left, Matrix right) |
| |
|
static Matrix | operator- (Matrix left, float right) |
| |
|
static Matrix | operator- (Matrix left, Matrix right) |
| |
|
static Matrix | operator- (Matrix m) |
| |
|
static float | operator/ (float x, Matrix m) |
| | Divide a number by the determinant of a matrix. Does not check if the determinant is zero.
|
| |
|
static Matrix | operator/ (Matrix left, float right) |
| |
|
static bool | operator== (Matrix m0, Matrix m1) |
| |
|
static Matrix | operator^ (Matrix m, Vector a) |
| | Cross product of a matrix and a vector.
|
| |
|
static Matrix | operator^ (Vector a, Matrix m) |
| | Cross product of a vector and a matrix.
|
| |
|
static Matrix | OuterProductMatrix (Vector a, Vector b) |
| |
| static Matrix | SimpleCompose (Vector rotation, Vector scale, Vector shear) |
| | Composes a transformation matrix from primitive operations. More...
|
| |
| static Tuple< Vector, Vector, Vector > | SimpleDecompose (Matrix matrix) |
| | Decomposes a non-singular transformation matrix into its primitive parts. More...
|
| |
A class representing a 3x3 matrix. It usually represents a linear transformation in 3D space.