Optionalm00: numberOptionalm01: numberOptionalm02: numberOptionalm10: numberOptionalm11: numberOptionalm12: numberOptionalm20: numberOptionalm21: numberOptionalm22: numberStatic ReadonlyidentityIdentity matrix.
Static ReadonlyzeroA matrix with all zero values.
Calculates the matrix determinant.
Determinant of the matrix.
Clones this instance and returns a new Matrix3 with identical values.
Calculates an inverse of the matrix if it exists.
Optionaltolerance: numberReturns a transpose of the matrix (switched columns and rows).
Gets a specific column in the matrix.
Index of the column in range [0, 2].
The column as Vector3.
Gets the value of the specified element in the matrix.
Row index of the element to retrieve.
Column index of the element to retrieve.
Value of the element.
Value of the specified element in the matrix using a linear index. Linear index can be calculated using the following formula: idx = row * 3 + column.
Linear index to get the value of.
Value of the element.
Decompose a matrix to rotation and scale components. Matrix must consist only of rotation and uniform scale transformations, otherwise accurate results are not guaranteed. Applying non-uniform scale guarantees results will not be accurate.
An anonymous object with the following members
rotation, the rotation quaternion.scale, the scale factors.Decomposes the matrix into a set of values.
An object containing the following objects:
matQ Columns form orthonormal bases. If your matrix is affine and doesn't use non-uniform scaling this matrix will be the rotation part of the matrix.vecD If the matrix is affine these will be scaling factors of the matrix.vecU If the matrix is affine these will be shear factors of the matrix.Sets the value of the specified element in the matrix.
Row index of the element to retrieve.
Column index of the element to retrieve.
Value of the element.
Sets value of the specified element in the matrix using a linear index. Linear index can be calculated using the following formula: idx = row * 4 + column.
Linear index to gsetet the value of.
New value of the element.
Converts an orthonormal matrix to euler angle (pitch/yaw/roll) representation with YXZ intrinsic order (RSX's default).
Euler angles in degrees representing the rotation in this matrix.
Converts an orthonormal matrix to quaternion representation.
Quaternion representing the rotation in this matrix.
Calculates the transpose of the matrix.
StaticfromCreates a rotation matrix from a quaternion rotation.
Quaternion to create the matrix from.
rotation matrix containing the equivalent rotation of the provided quaternion.
StaticisStaticmultiplyStaticwithStaticwithCreates a new matrix with the specified elements.
StaticwithCreates a rotation matrix from the provided euler angle (pitch/yaw/roll) rotation.
Pitch angle of rotation.
Yaw angle of rotation.
Roll angle of rotation.
Optionalorder: EnumValue<EulerAngleOrder>
The EulerAngleOrder in which rotations will be applied. Different rotations can be created depending on the order.
rotation matrix that can rotate an object to the specified angles.
StaticwithCreates a rotation matrix from the provided euler angle (pitch/yaw/roll) rotation.
Euler angles in degrees.
Optionalorder: EnumValue<EulerAngleOrder>
The order in which rotations will be applied. Different rotations can be created depending on the order.
rotation matrix that can rotate an object to the specified angles.
StaticwithCreates a rotation matrix from the provided euler angle (pitch/yaw/roll) rotation.
rotation matrix that can rotate an object to the specified angles.
StaticwithStaticwithStaticwithConstruct a matrix that performs rotation and scale.
Staticwith
The Matrix3 implements a 3x3 matrix that can be used for non-homogenous transformations of three dimensional vectors and points.
The class follows the 'copy-on-write' pattern, which means that every operation such as Matrix3.multiply returns a copy of the matrix with updated values. It also implies that the values of the matrix cannot be directly modified.
The concept of immutability improves sharing of objects as all types in TypeScript are assigned by identity, instead of by-value (e.g. a copy) as in other programming languages like C.
Note
The matrix storage is "row-major" meaning that elements [0...2] represents the first row. The first column is represented by the elements [0, 3, 6]