docs.unity3d.com
    Show / Hide Table of Contents

    Class TransformExtensions

    Several method extensions to Transform for transforming and inverse-transforming additional Unity types.

    Inheritance
    Object
    TransformExtensions
    Namespace: UnityEngine.XR.ARFoundation
    Syntax
    public static class TransformExtensions : object

    Methods

    InverseTransformPointList(Transform, List<Vector3>)

    Inverse transforms a List of Vector3s.

    Declaration
    public static void InverseTransformPointList(this Transform transform, List<Vector3> points)
    Parameters
    Type Name Description
    Transform transform

    The Transform component

    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 Transform component

    Pose pose

    The Pose to inversely transform

    Returns
    Type Description
    Pose

    A new Pose representing the inversely transformed pose

    InverseTransformRay(Transform, Ray)

    Inverse transforms a Ray

    Declaration
    public static Ray InverseTransformRay(this Transform transform, Ray ray)
    Parameters
    Type Name Description
    Transform transform

    The Transform component

    Ray ray

    The Ray to inversely transform

    Returns
    Type Description
    Ray

    A new Ray representing the inversely transformed ray

    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 Transform component

    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 Transform component

    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 Transform component

    Pose pose

    The Pose to transform

    Returns
    Type Description
    Pose

    A new Pose representing the transformed pose

    TransformRay(Transform, Ray)

    Transforms a Ray

    Declaration
    public static Ray TransformRay(this Transform transform, Ray ray)
    Parameters
    Type Name Description
    Transform transform

    The Transform component

    Ray ray

    The Ray to transform

    Returns
    Type Description
    Ray

    A new Ray representing the transformed ray

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Friday, January 7, 2022
    Terms of use