Class Fixed4x4UnityExtensions
- Namespace
- FixedMathSharp
Provides semantic conversions between FixedMathSharp row-vector matrices and Unity column-vector matrices, plus strict Unity Transform application.
public static class Fixed4x4UnityExtensions
- Inheritance
-
Fixed4x4UnityExtensions
- Inherited Members
Methods
ApplyToTransformLocal(Fixed4x4, Transform)
Applies a strict local TRS matrix to a Unity transform.
public static void ApplyToTransformLocal(this Fixed4x4 matrix, Transform transform)
Parameters
matrixFixed4x4transformTransform
Exceptions
- InvalidOperationException
The matrix is not a strict local TRS matrix.
ApplyToTransformWorld(Fixed4x4, Transform)
Applies a world matrix within the Unity transform's current hierarchy.
public static void ApplyToTransformWorld(this Fixed4x4 matrix, Transform transform)
Parameters
matrixFixed4x4transformTransform
Exceptions
- InvalidOperationException
The matrix cannot be represented by the target transform.
CreateTransformLocal(Fixed4x4, string, Transform)
Creates a Unity transform from a strict local TRS matrix.
public static Transform CreateTransformLocal(this Fixed4x4 matrix, string name = "Fixed4x4 Transform", Transform parent = null)
Parameters
matrixFixed4x4The local TRS matrix to decompose.
namestringThe new GameObject's name.
parentTransformThe optional parent transform.
Returns
- Transform
The created transform.
Exceptions
- InvalidOperationException
The matrix is not a strict local TRS matrix.
CreateTransformWorld(Fixed4x4, string, Transform)
Creates a Unity transform from a world matrix relative to an optional parent.
public static Transform CreateTransformWorld(this Fixed4x4 matrix, string name = "Fixed4x4 Transform", Transform parent = null)
Parameters
matrixFixed4x4The desired world matrix.
namestringThe new GameObject's name.
parentTransformThe optional parent transform.
Returns
- Transform
The created transform.
Exceptions
- InvalidOperationException
The matrix cannot be represented in the requested hierarchy.
ToFixed4x4(Matrix4x4)
Converts a Unity column-vector matrix to a FixedMathSharp row-vector matrix.
public static Fixed4x4 ToFixed4x4(this Matrix4x4 matrix)
Parameters
matrixMatrix4x4
Returns
ToFixed4x4LocalMatrix(Transform)
Creates a FixedMathSharp matrix from a Unity transform's local TRS components.
public static Fixed4x4 ToFixed4x4LocalMatrix(this Transform transform)
Parameters
transformTransform
Returns
ToFixed4x4WorldMatrix(Transform)
Converts a Unity transform's local-to-world matrix to FixedMathSharp convention.
public static Fixed4x4 ToFixed4x4WorldMatrix(this Transform transform)
Parameters
transformTransform
Returns
ToMatrix4x4(Fixed4x4)
Converts a FixedMathSharp row-vector matrix to a Unity column-vector matrix.
public static Matrix4x4 ToMatrix4x4(this Fixed4x4 matrix)
Parameters
matrixFixed4x4
Returns
- Matrix4x4
TryApplyToTransformLocal(Fixed4x4, Transform)
Tries to apply a strict local TRS matrix to a Unity transform.
public static bool TryApplyToTransformLocal(this Fixed4x4 matrix, Transform transform)
Parameters
matrixFixed4x4transformTransform
Returns
TryApplyToTransformWorld(Fixed4x4, Transform)
Tries to apply a world matrix within the Unity transform's current hierarchy.
public static bool TryApplyToTransformWorld(this Fixed4x4 matrix, Transform transform)
Parameters
matrixFixed4x4transformTransform