Properties
The index into Matrix4 for column 0, row 0.
The index into Matrix4 for column 0, row 1.
The index into Matrix4 for column 0, row 2.
The index into Matrix4 for column 0, row 3.
The index into Matrix4 for column 1, row 0.
The index into Matrix4 for column 1, row 1.
The index into Matrix4 for column 1, row 2.
The index into Matrix4 for column 1, row 3.
The index into Matrix4 for column 2, row 0.
The index into Matrix4 for column 2, row 1.
The index into Matrix4 for column 2, row 2.
The index into Matrix4 for column 2, row 3.
The index into Matrix4 for column 3, row 0.
The index into Matrix4 for column 3, row 1.
The index into Matrix4 for column 3, row 2.
The index into Matrix4 for column 3, row 3.
The number of elements used to pack the object into an array.
Functions
Computes a Matrix4 instance that transforms from world space to view space.
Computes a Matrix4 instance that transforms from normalized device coordinates to window coordinates.
Compares the provided matrices componentwise and returns true
if they are within the provided epsilon, false
otherwise.
Computes a Matrix4 instance from a Camera.
Computes a Matrix4 instance from a column-major order array.
Creates a rotation matrix.
Computes a Matrix4 instance from a Matrix3 representing the rotation and a Cartesian3 representing the translation.
Computes a Matrix4 instance from a row-major order array. The resulting matrix will be in column-major order.
Computes a Matrix4 instance representing a non-uniform scale.
Creates a Matrix4 instance from a Cartesian3 representing the translation.
Computes a Matrix4 instance from a translation, rotation, and scale (TRS) representation with the rotation represented as a quaternion.
Creates a Matrix4 instance from a TranslationRotationScale instance.
Computes a Matrix4 instance representing a uniform scale.
Retrieves a copy of the matrix column at the provided index as a Cartesian4 instance.
Computes the array index of the element at the provided row and column.
Gets the upper left 3x3 matrix of the provided matrix.
Computes the maximum scale assuming the matrix is an affine transformation. The maximum scale is the maximum length of the column vectors in the upper-left 3x3 matrix.
Extracts the rotation matrix assuming the matrix is an affine transformation.
Retrieves a copy of the matrix row at the provided index as a Cartesian4 instance.
Extracts the non-uniform scale assuming the matrix is an affine transformation.
Gets the translation portion of the provided matrix, assuming the matrix is an affine transformation matrix.
Computes the inverse of the provided matrix using Cramers Rule. If the determinant is zero, the matrix can not be inverted, and an exception is thrown. If the matrix is a proper rigid transformation, it is more efficient to invert it with Matrix4.inverseTransformation.
Computes the inverse of the provided matrix assuming it is a proper rigid matrix, where the upper left 3x3 elements are a rotation matrix, and the upper three elements in the fourth column are the translation. The bottom row is assumed to be 0, 0, 0, 1. The matrix is not verified to be in the proper form. This method is faster than computing the inverse for a general 4x4 matrix using Matrix4.inverse.
Computes the inverse transpose of a matrix.
Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0]
) by a 3x3 rotation matrix. This is an optimization for Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m);
with less allocations and arithmetic operations.
Computes the product of a matrix and a Cartesian3. This is equivalent to calling Matrix4.multiplyByVector with a Cartesian4 with a w
component of 1, but returns a Cartesian3 instead of a Cartesian4.
Computes the product of a matrix and a Cartesian3. This is equivalent to calling Matrix4.multiplyByVector with a Cartesian4 with a w
component of zero.
Computes the product of a matrix and a scalar.
Multiplies an affine transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0]
) by an implicit non-uniform scale matrix. This is an optimization for Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);
, where m
must be an affine matrix. This function performs fewer allocations and arithmetic operations.
Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0]
) by an implicit translation matrix defined by a Cartesian3. This is an optimization for Matrix4.multiply(m, Matrix4.fromTranslation(position), m);
with less allocations and arithmetic operations.
Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
Computes the product of a matrix and a column vector.
Computes the product of two matrices assuming the matrices are affine transformation matrices, where the upper left 3x3 elements are any matrix, and the upper three elements in the fourth column are the translation. The bottom row is assumed to be 0, 0, 0, 1. The matrix is not verified to be in the proper form. This method is faster than computing the product for general 4x4 matrices using Matrix4.multiply.
Stores the provided instance into the provided array.
Flattens an array of Matrix4s into an array of components. The components are stored in column-major order.
Sets the rotation assuming the matrix is an affine transformation.
Computes a new matrix that replaces the translation in the rightmost column of the provided matrix with the provided translation. This assumes the matrix is an affine transformation.
Computes a new matrix that replaces the scale with the provided uniform scale. This assumes the matrix is an affine transformation.
Computes an Array from the provided Matrix4 instance. The array will be in column-major order.
Unpacks an array of column-major matrix components into an array of Matrix4s.