docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PoseExtensions

    Extension methods for the Pose struct, in order to improve the readability of some math.

    Inheritance
    object
    PoseExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.MLAgents.Sensors
    Assembly: Unity.ML-Agents.dll
    Syntax
    public static class PoseExtensions

    Methods

    Inverse(Pose)

    Compute the inverse of a Pose. For any Pose P, P.Inverse() * P will equal the identity pose (within tolerance).

    Declaration
    public static Pose Inverse(this Pose pose)
    Parameters
    Type Name Description
    Pose pose

    The pose to operate on.

    Returns
    Type Description
    Pose

    Inverse Pose.

    Multiply(Pose, Pose)

    This is equivalent to Pose.GetTransformedBy(), but keeps the order more intuitive.

    Declaration
    public static Pose Multiply(this Pose pose, Pose rhs)
    Parameters
    Type Name Description
    Pose pose

    The pose to transform by.

    Pose rhs

    The pose to be transformed.

    Returns
    Type Description
    Pose

    Multiplied Pose.

    Multiply(Pose, Vector3)

    Transform the vector by the pose. Conceptually this is equivalent to treating the Pose as a 4x4 matrix and multiplying the augmented vector. See https://en.wikipedia.org/wiki/Affine_transformation#Augmented_matrix for more details.

    Declaration
    public static Vector3 Multiply(this Pose pose, Vector3 rhs)
    Parameters
    Type Name Description
    Pose pose

    The pose to transform by.

    Vector3 rhs

    The vector to be transformed.

    Returns
    Type Description
    Vector3

    Multiplied Pose.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)