Creates the matrix. Default is an identity matrix.
Returns true if the matrices are equal
Returns a reference to the internal array storing the matrix values.
The array will be ordered as follows:
| m00 m01 m02 m03 | | 0 4 8 12 | | m10 m11 m12 m13 | | 1 5 9 13 | | m20 m21 m22 m23 | | 2 6 10 14 | | m30 m31 m32 m33 | | 3 7 11 15 |
Returns this inverse of this matrix.
If this matrix is not invertible, returns a zero matrix.
Returns the value at the given row and column
Returns true if the matrix is an identity matrix
Returns a matrix initialized with the values in the passed array
The array must be ordered as follows:
| m00 m01 m02 m03 | | 0 4 8 12 | | m10 m11 m12 m13 | | 1 5 9 13 | | m20 m21 m22 m23 | | 2 6 10 14 | | m30 m31 m32 m33 | | 3 7 11 15 |
Returns a rotation matrix that will align the global X, Y and Z axes with the specified axes.
Note that at least one axis must be specified and all specified axes must be normalized. If two or three axes are specified, they must be orthogonal to each other.
Orientation of x axis
Orientation of y axis
Orientation of z axis
Returns a transformation matrix containing the given element values
| m00 m01 m02 m03 | | m10 m11 m12 m13 | | m20 m21 m22 m23 | | m30 m31 m32 m33 |
Generated using TypeDoc
An immutable 4x4 matrix
Matrices are stored internally as a one dimensional array for performance reasons.
The mapping of matrix elements to indices of this internal array is as follows:
This is consistent with the way matrices are represented in WebGL. To exemplify, translation values are stored in elements 12,13,14; see figure below
From the OpenGL red book (page 68) v' = M*v
Note that this class is immutable.