Class Matrix4x4Extension
Provides extension methods for the UnityEngine.Matrix4x4 class, enabling additional functionality such as decomposition.
Inherited Members
Namespace: TriLibExporter
Assembly: Assembly-CSharp.dll
Syntax
public static class Matrix4x4Extension
Methods
Decompose(Matrix4x4, out Vector3, out Quaternion, out Vector3)
Decomposes a 4x4 transformation matrix into separate components: translation, rotation, and scale.
Declaration
public static void Decompose(this Matrix4x4 matrix, out Vector3 translation, out Quaternion rotation, out Vector3 scale)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The 4x4 transformation matrix to decompose. |
Vector3 | translation | The extracted translation vector. |
Quaternion | rotation | The extracted rotation as a quaternion. |
Vector3 | scale | The extracted scale vector. |
Remarks
This method assumes that the matrix represents a valid TRS transformation (translation * rotation * scale) and does not account for skew.