docs.unity3d.com
    Show / Hide Table of Contents

    Class PoseExtensions

    Provides extension methods for class Transform and struct Pose.

    Inheritance
    Object
    PoseExtensions
    Namespace: Mechatronics.SensorSDK
    Syntax
    public static class PoseExtensions

    Methods

    Compose(in Pose, in Pose)

    Composes two poses, as if by multiplying their corresponding transformation matrices.

    Declaration
    public static Pose Compose(this in Pose lhs, in Pose rhs)
    Parameters
    Type Name Description
    Pose lhs

    The left-hand side pose.

    Pose rhs

    The right-hand side pose.

    Returns
    Type Description
    Pose

    The composed pose.

    Remarks

    Given Pose AtoB and Pose BtoC: Pose AtoC = BtoC.Compose(AtoB);

    ComputePoseBetween(in Pose, in Pose)

    Creates the pose (transformation) between the two given poses.

    Declaration
    public static Pose ComputePoseBetween(in Pose initialToXPose, in Pose finalToXPose)
    Parameters
    Type Name Description
    Pose initialToXPose

    The initial pose.

    Pose finalToXPose

    The final pose.

    Returns
    Type Description
    Pose

    The pose going from the initial pose to the final pose.

    Remarks

    For example, given AliceToCharliePose and BobToCharliePose, the function returns the AliceToBobPose. It is important that the destination (Charlie) be the same in both input poses.

    GetInverse(in Pose)

    Creates the inverse pose, as if inverting the corresponding transformation matrix.

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

    The pose to invert.

    Returns
    Type Description
    Pose

    The inverse pose.

    GetLocalToWorldPose(Transform)

    Creates a Pose out of the local-to-world transformation.

    Declaration
    public static Pose GetLocalToWorldPose(this Transform transform)
    Parameters
    Type Name Description
    Transform transform

    The Transform to extract the pose from.

    Returns
    Type Description
    Pose

    The extracted Pose.

    Transform(in Pose, in Vector3)

    Transforms the point expressed in the given pose, as if by multiplying the pose's corresponding transformation matrix to the point.

    Declaration
    public static Vector3 Transform(this in Pose pose, in Vector3 point)
    Parameters
    Type Name Description
    Pose pose

    The pose in which the point is expressed.

    Vector3 point

    The point to transform.

    Returns
    Type Description
    Vector3

    The transformed point.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023