Class FixedTransformUnityExtensions
- Namespace
- FixedMathSharp
Provides component-based interop between Unity Transform and FixedMathSharp FixedTransform.
public static class FixedTransformUnityExtensions
- Inheritance
-
FixedTransformUnityExtensions
- Inherited Members
Methods
ApplyToTransformLocal(FixedTransform, Transform)
Applies a FixedTransform's local TRS components to a Unity transform.
public static void ApplyToTransformLocal(this FixedTransform fixedTransform, Transform target)
Parameters
fixedTransformFixedTransformtargetTransform
ApplyToTransformWorld(FixedTransform, Transform)
Composes and applies a FixedTransform in the target Unity hierarchy.
public static void ApplyToTransformWorld(this FixedTransform fixedTransform, Transform target)
Parameters
fixedTransformFixedTransformtargetTransform
Exceptions
- InvalidOperationException
The world transform is not representable by the target.
ToFixedTransformLocal(Transform, FixedTransform)
Creates a FixedTransform from a Unity transform's local TRS components and an optional fixed parent.
public static FixedTransform ToFixedTransformLocal(this Transform transform, FixedTransform parent = null)
Parameters
transformTransformThe Unity transform to convert.
parentFixedTransformThe optional parent in the FixedTransform hierarchy.
Returns
- FixedTransform
The converted local transform.
TryApplyToTransformWorld(FixedTransform, Transform)
Tries to compose and apply a FixedTransform in the target Unity hierarchy.
public static bool TryApplyToTransformWorld(this FixedTransform fixedTransform, Transform target)
Parameters
fixedTransformFixedTransformtargetTransform