Table of Contents

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

matrix Fixed4x4
transform Transform

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

matrix Fixed4x4
transform Transform

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

matrix Fixed4x4

The local TRS matrix to decompose.

name string

The new GameObject's name.

parent Transform

The 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

matrix Fixed4x4

The desired world matrix.

name string

The new GameObject's name.

parent Transform

The 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

matrix Matrix4x4

Returns

Fixed4x4

ToFixed4x4LocalMatrix(Transform)

Creates a FixedMathSharp matrix from a Unity transform's local TRS components.

public static Fixed4x4 ToFixed4x4LocalMatrix(this Transform transform)

Parameters

transform Transform

Returns

Fixed4x4

ToFixed4x4WorldMatrix(Transform)

Converts a Unity transform's local-to-world matrix to FixedMathSharp convention.

public static Fixed4x4 ToFixed4x4WorldMatrix(this Transform transform)

Parameters

transform Transform

Returns

Fixed4x4

ToMatrix4x4(Fixed4x4)

Converts a FixedMathSharp row-vector matrix to a Unity column-vector matrix.

public static Matrix4x4 ToMatrix4x4(this Fixed4x4 matrix)

Parameters

matrix Fixed4x4

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

matrix Fixed4x4
transform Transform

Returns

bool

true when the matrix can be decomposed as strict TRS; otherwise, false.

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

matrix Fixed4x4
transform Transform

Returns

bool

true when the world matrix is representable by the target transform; otherwise, false.