Represents a series of UnityEngine.Matrix4x4 extension methods.
More...
|
static Quaternion | ExtractRotation (this Matrix4x4 matrix) |
| Extracts the rotation from a UnityEngine.Matrix4x4. More...
|
|
static Vector3 | ExtractPosition (this Matrix4x4 matrix) |
| Extracts the Position from a UnityEngine.Matrix4x4. More...
|
|
static Vector3 | ExtractScale (this Matrix4x4 matrix) |
| Extracts the scale from a UnityEngine.Matrix4x4. More...
|
|
Represents a series of UnityEngine.Matrix4x4 extension methods.
◆ ExtractPosition()
static Vector3 TriLib.MatrixExtensions.ExtractPosition |
( |
this Matrix4x4 |
matrix | ) |
|
|
static |
Extracts the Position from a UnityEngine.Matrix4x4.
- Parameters
-
matrix | UnityEngine.Matrix4x4 to extract from. |
- Returns
- Extracted position UnityEngine.Vector3.
var myMatrix = Matrix4x4.TRS(new Vector3(0f, 0f, 100f), Quaternion.Euler(0f, 90f, 0f), Vector3.one);
myGameObject.transform.position = myMatrix.ExtractRotation();
◆ ExtractRotation()
static Quaternion TriLib.MatrixExtensions.ExtractRotation |
( |
this Matrix4x4 |
matrix | ) |
|
|
static |
Extracts the rotation from a UnityEngine.Matrix4x4.
- Parameters
-
matrix | UnityEngine.Matrix4x4 to extract from. |
- Returns
- Extracted rotation UnityEngine.Quaternion.
var myMatrix = Matrix4x4.TRS(new Vector3(0f, 0f, 100f), Quaternion.Euler(0f, 90f, 0f), Vector3.one);
myGameObject.transform.rotation = myMatrix.ExtractRotation();
◆ ExtractScale()
static Vector3 TriLib.MatrixExtensions.ExtractScale |
( |
this Matrix4x4 |
matrix | ) |
|
|
static |
Extracts the scale from a UnityEngine.Matrix4x4.
- Parameters
-
matrix | UnityEngine.Matrix4x4 to extract from. |
- Returns
- Extracted scale UnityEngine.Vector3.
var myMatrix = Matrix4x4.TRS(new Vector3(0f, 0f, 100f), Quaternion.Euler(0f, 90f, 0f), Vector3.one);
myGameObject.transform.localScale = myMatrix.ExtractScale();
The documentation for this class was generated from the following file: