docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XrPosef

    A construct representing a position and orientation within a space, with position expressed in meters, and orientation represented as a unit quaternion. OpenXR Spec

    Implements
    IEquatable<XrPosef>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.OpenXR.NativeTypes
    Assembly: Unity.XR.OpenXR.dll
    Syntax
    public struct XrPosef : IEquatable<XrPosef>

    Constructors

    XrPosef(Vector3, Quaternion)

    Initializes and returns an instance of XrPosef with the provided parameters.

    Declaration
    public XrPosef(Vector3 vec3, Quaternion quaternion)
    Parameters
    Type Name Description
    Vector3 vec3

    vector3 position.

    Quaternion quaternion

    quaternion orientation.

    Fields

    Orientation

    The orientation/rotation of the pose.

    Declaration
    public XrQuaternionf Orientation
    Field Value
    Type Description
    XrQuaternionf

    Position

    The position of the pose.

    Declaration
    public XrVector3f Position
    Field Value
    Type Description
    XrVector3f

    Methods

    Equals(object)

    Compares for equality. Two instances are equal if their bits are exactly identical for the Orientation and Position fields.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The other object.

    Returns
    Type Description
    bool

    true if obj is an XrPosef and equal to this instance. Otherwise, false.

    Overrides
    ValueType.Equals(object)

    Equals(XrPosef)

    Compares for equality. Two instances are equal if their bits are exactly identical for the Orientation and Position fields.

    Declaration
    public bool Equals(XrPosef other)
    Parameters
    Type Name Description
    XrPosef other

    The other instance.

    Returns
    Type Description
    bool

    true if the instances are equal. Otherwise, false.

    GetHashCode()

    Generates a unique hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code.

    Overrides
    ValueType.GetHashCode()

    Implements

    IEquatable<T>
    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)