The column-major list of matrix values.
Creates a new Matrix4 with identical elements to this one.
Sets this matrix to the transform composed of position, quaternion (for the rotation component) and scale.
The position component of the transform in this matrix.
The rotation component of the transform in this matrix.
The scale component of the transform in this matrix.
Decomposes this matrix into its position, rotation (expressed as a quaternion) and scale components.
The vector to receive the position component of this matrix.
The quaternion to receive the rotation component of this matrix.
The vector to receive the scale component of this matrix.
Computes and returns the determinant of this matrix. Based on the method outlined here.
Returns true if this matrix and the other matrix m have identical elements.
The matrix that this one will be compared to.
Extracts the rotation component of the supplied matrix m as a pure rotation matrix (i.e. without scale and translation) and copies it into this matrix's rotation component. This resets this matrix's scale, but doesn't affect its translation.
The matrix to get the rotation component from.
Sets the elements of this matrix based on an array in colum-major format.
The array to read the elements from.
The offset in the array from which to read the elements. Defaults to 0.
Sets this matrix to the inverse of the matrix m. You cannot invert a matrix with a determinant of zero. If you attempt this, the method will warn you in the console and return the identity matrix or it will throw an error if throwOnDegenerate is true. Based on the method outlined here.
The matrix to inverse and store into this one.
If true, throw an error if the matrix is degenerate (not invertible).
Gets the maximum scale value of the 3 axes.
Resets this matrix to the 4x4 identity matrix.
Calculates a rotation matrix looking from the eye point towards the target point, considering up as the general up direction, then sets it as the rotation component of this matrix. The translation component of this matrix is unaffected.
The point used with target to calculate the forward axis of this matrix.
The point used with eye to calculate the forward axis of this matrix.
A vector representing the general up direction. It is used to calculate the final up and left axes of this matrix.
Sets this matrix to the basis consisting of the three provided vectors. This method affects the rotation/scale component of the matrix and resets the translation component.
The X axis of the basis to set into this matrix.
The Y axis of the basis to set into this matrix.
The Z axis of the basis to set into this matrix.
Makes this matrix an orthographic projection matrix.
The camera frustum left plane.
The camera frustum right plane.
The camera frustum top plane.
The camera frustum bottom plane.
The camera frustum near plane.
The camera frustum far plane.
Makes this matrix a perspective projection matrix.
The camera frustum vertical field of view in degrees.
The camera frustum aspect ratiow (i.e. the width/height ratio).
The camera frustum near plane.
The camera frustum far plane.
Sets this matrix as a rotation transform around the axis by theta radians. This is a somewhat controversial but mathematically sound alternative to rotating via Quaternions. See the discussion here.
A normalized rotation axis.
The rotation angle in radians.
Sets the rotation component (the upper left 3x3 matrix) of this matrix to the rotation specified by the given euler transform. The rest of the matrix is set to the identity. Depending on the order of the euler, there are six possible outcomes. See this page for a complete list.
The euler transform to get the rotation from.
Sets the rotation component of this matrix to the rotation specified by the quaternion q, as outlined here. The rest of the matrix is set to the identity.
The quaternion to set this matrix rotation component from.
Sets this matrix as a rotation transform around the X axis by theta radians.
The rotation angle in radians.
Sets this matrix as a rotation transform around the Y axis by theta radians.
The rotation angle in radians.
Sets this matrix as a rotation transform around the Z axis by theta radians.
The rotation angle in radians.
Sets this matrix as a scale transform.
The scale x component.
The scale y component.
The scale z component.
Sets this matrix as a translation transform.
The x component of the translation vector.
The y component of the translation vector.
The z component of the translation vector.
Multiplies every component of this matrix by the scalar value s.
The number to multiply each component of the matrix with.
Sets the 4x4 matrix values to the given row-major sequence of values.
value to put in row 1, col 1.
value to put in row 1, col 2.
value to put in row 1, col 3.
value to put in row 1, col 4.
value to put in row 2, col 1.
value to put in row 2, col 2.
value to put in row 2, col 3.
value to put in row 2, col 4.
value to put in row 3, col 1.
value to put in row 3, col 2.
value to put in row 3, col 3.
value to put in row 3, col 4.
value to put in row 4, col 1.
value to put in row 4, col 2.
value to put in row 4, col 3.
value to put in row 4, col 4.
Writes the elements of this matrix to an array in column-major format.
The array to store the resulting vector in. If not given a new array will be created.
The offset in the array at which to put the result.
Transposes this matrix in place.
Creates and initializes the Matrix4 to the 4x4 identity matrix.