Class TransformExtensions
Several method extensions to Transform
for transforming and inverse-transforming additional Unity types.
Namespace: UnityEngine.XR.ARFoundation
Syntax
public static class TransformExtensions : object
Methods
InverseTransformPointList(Transform, List<Vector3>)
Inverse transforms a List
of Vector3
s.
Declaration
public static void InverseTransformPointList(this Transform transform, List<Vector3> points)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The |
List<Vector3> | points | The points to inverse transform. This is done in-place. |
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 |
SetLayerRecursively(Transform, Int32)
Sets the layer for the GameObject
associated with transform
and all its children.
Declaration
public static void SetLayerRecursively(this Transform transform, int layer)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The |
Int32 | layer | The layer in which the game object should be. |
TransformPointList(Transform, List<Vector3>)
Transforms a List
of positions.
Declaration
public static void TransformPointList(this Transform transform, List<Vector3> points)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The |
List<Vector3> | points | The points to transform. The points are transformed in-place. |
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 |
TransformRay(Transform, Ray)
Transforms a Ray
Declaration
public static Ray TransformRay(this Transform transform, Ray ray)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The |
Ray | ray | The |
Returns
Type | Description |
---|---|
Ray | A new |