Creates a new transform matrix using the specified matrix array.
The matrix array, expected length is 16. If empty, an identity matrix is used by default.
The array containing the matrix data.
Returns the normalized backward vector of the matrix.
Returns the normalized down vector of the matrix.
Returns the normalized forward vector of the matrix.
Returns the normalized right vector of the matrix.
Returns the position component of the matrix.
Returns the normalized left vector of the matrix.
Returns the normalized rotation quaternion of the matrix.
Returns the scaling component of the matrix.
Returns the normalized up vector of the matrix.
A default (identity) matrix
A temp matrix
Appends the given Matrix to this Matrix.
The matrix to append.
This matrix. Good for chaining method calls.
Get a new position with the current transformation applied. Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering)
The origin
The new point, transformed through this matrix
Get a new position with the inverse of the current transformation applied. Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input)
The origin
The new point, inverse-transformed through this matrix
Creates a new Matrix object with the same values as this one.
A copy of this matrix. Good for chaining method calls.
Changes the values of the given matrix to be the same as the ones in this matrix
The matrix to copy to.
The matrix given in parameter with its values updated.
Decomposes the matrix (x, y, scaleX, scaleY, and rotation) and sets the properties on to a transform.
The transform to apply the properties to.
The transform with the newly applied properties
Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows:
a = array[0] b = array[1] c = array[3] d = array[4] tx = array[2] ty = array[5]
The array that the matrix will be populated from.
Resets this Matrix to an identity (default) matrix.
This matrix. Good for chaining method calls.
Inverts this matrix
This matrix. Good for chaining method calls.
Multiplies this matrix with another matrix.
The matrix to multiply with.
Prepends the given Matrix to this Matrix.
The matrix to prepend
This matrix. Good for chaining method calls.
Applies a rotation transformation to the matrix.
The angle in radians.
This matrix. Good for chaining method calls.
Applies a scale transformation to the matrix.
The amount to scale horizontally
The amount to scale vertically
This matrix. Good for chaining method calls.
Sets the matrix properties.
Matrix component
Matrix component
Matrix component
Matrix component
Matrix component
Matrix component
This matrix. Good for chaining method calls.
Sets the matrix to the contents of the specified array.
The array.
Sets the rotation, position and scale components.
The rotation to set.
The position to set.
The scale to set.
Sets the matrix based on all the available properties
Position on the x axis
Position on the y axis
Pivot on the x axis
Pivot on the y axis
Scale on the x axis
Scale on the y axis
Rotation in radians
Skew on the x axis
Skew on the y axis
This matrix. Good for chaining method calls.
Translates the matrix on the x and y.
How much to translate x by
How much to translate y by
This matrix. Good for chaining method calls.
Calculates a matrix from the given quaternion.
The quaternion to create matrix from.
The receiving matrix. If not supplied, a new matrix will be created.
Creates a matrix from a quaternion rotation, point translation and point scale.
The rotation quaternion.
The translation point.
The scale point.
The receiving matrix. If not supplied, a new matrix will be created.
Generates a look-at matrix with the given eye position, focal point, and up axis. If you want a matrix that actually makes an object look at another object, you should use targetTo instead.
The position of the viewer.
The point the viewer is looking at.
The vector pointing up.
The receiving matrix. If not supplied, a new matrix will be created.
The left bound of the frustum.
The right bound of the frustum.
The bottom bound of the frustum.
The top bound of the frustum.
The near bound of the frustum.
The far bound of the frustum.
The receiving matrix. If not supplied, a new matrix will be created.
The vertical field of view in radians.
The aspect ratio, typically viewport width/height.
The near bound of the frustum.
The far bound of the frustum.
The receiving matrix. If not supplied, a new matrix will be created.
Rotates a matrix by the given angle around the given axis.
The matrix to rotate.
The angle in radians to rotate the matrix by.
The axis to rotate around.
The receiving matrix. If not supplied, a new matrix will be created.
Generates a matrix that makes something look at something else.
The position of the viewer.
The point the viewer is looking at.
The vector pointing up.
The receiving matrix. If not supplied, a new matrix will be created.
Generated using TypeDoc
Represents a 4x4 matrix.