Class TransformExtensions
Extension methods for Transform components.
Inherited Members
Namespace: Unity.XR.CoreUtils
Syntax
public static class TransformExtensions
Methods
GetLocalPose(Transform)
Gets the local position and rotation as a Pose.
Declaration
public static Pose GetLocalPose(this Transform transform)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The transform from which to get the pose. |
Returns
Type | Description |
---|---|
Pose | The local pose. |
GetWorldPose(Transform)
Gets the world position and rotation as a Pose.
Declaration
public static Pose GetWorldPose(this Transform transform)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The transform from which to get the pose. |
Returns
Type | Description |
---|---|
Pose | The world pose. |
InverseTransformPose(Transform, Pose)
Inverse transforms a Pose.
Declaration
public static Pose InverseTransformPose(this Transform transform, Pose pose)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The |
Pose | pose | The |
Returns
Type | Description |
---|---|
Pose | A new |
InverseTransformRay(Transform, Ray)
Inverse transforms a Ray.
Declaration
public static Ray InverseTransformRay(this Transform transform, Ray ray)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The |
Ray | ray | The |
Returns
Type | Description |
---|---|
Ray | A new |
SetLocalPose(Transform, Pose)
Sets the local position and rotation from a Pose.
Declaration
public static void SetLocalPose(this Transform transform, Pose pose)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The transform on which to set the pose. |
Pose | pose | Pose specifying the new position and rotation. |
SetWorldPose(Transform, Pose)
Sets the world position and rotation from a Pose.
Declaration
public static void SetWorldPose(this Transform transform, Pose pose)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The transform on which to set the pose. |
Pose | pose | Pose specifying the new position and rotation. |
TransformPose(Transform, Pose)
Transforms a Pose.
Declaration
public static Pose TransformPose(this Transform transform, Pose pose)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The |
Pose | pose | The |
Returns
Type | Description |
---|---|
Pose | A new |