Class MatrixExtension
Extension methods for Unity Matrix4x4.
Namespace: Unity.Geospatial.HighPrecision
Assembly: solution.dll
Syntax
public static class MatrixExtension
Methods
GetTRS(Matrix4x4, out double3, out quaternion, out float3)
Get the translation
, rotation
and scale
part of the given matrix
.
Declaration
public static void GetTRS(this Matrix4x4 matrix, out double3 translation, out quaternion rotation, out float3 scale)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The matrix requested to get its |
double3 | translation | Returns the position part. |
quaternion | rotation | Returns the orientation part. |
float3 | scale | Returns the resize part. |
ToDouble4x4(Matrix4x4)
Convert a unity Matrix4x4 instance to a new Unity mathematics double4x4 instance.
Declaration
public static double4x4 ToDouble4x4(this Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The instance to convert. |
Returns
Type | Description |
---|---|
double4x4 | A new double4x4 instance. |