Struct XRAnchor | AR Subsystems | 4.2.10
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XRAnchor

    Describes session-relative data for an anchor.

    Implements
    ITrackable
    IEquatable<XRAnchor>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: solution.dll
    Syntax
    public struct XRAnchor : ITrackable, IEquatable

    Constructors

    Name Description
    XRAnchor(TrackableId, Pose, TrackingState, IntPtr)

    Constructs the session-relative data for an anchor. This is typically provided by an implementation of the XRAnchorSubsystem and not invoked directly.

    XRAnchor(TrackableId, Pose, TrackingState, IntPtr, Guid)

    Constructs the session-relative data for anchor. This is typically provided by an implementation of the XRAnchorSubsystem and not invoked directly.

    Properties

    Name Description
    defaultValue

    Gets a default-initialized XRAnchor. This may be different from the zero-initialized version (for example, the pose is Pose.identity instead of zero-initialized).

    nativePtr

    A native pointer associated with the anchor. The data pointed to by this pointer is implementation-specific.

    pose

    Get the Pose, in session space, for this anchor.

    sessionId

    The id of the session from which this anchor originated.

    trackableId

    Get the TrackableId associated with this anchor.

    trackingState

    Get the TrackingState of this anchor.

    Methods

    Name Description
    Equals(object)

    Tests for equality.

    Equals(XRAnchor)

    Tests for equality.

    GetHashCode()

    Generates a hash suitable for use with containers like HashSet and Dictionary.

    Operators

    Name Description
    operator ==(XRAnchor, XRAnchor)

    Tests for equality. Same as Equals(XRAnchor).

    operator !=(XRAnchor, XRAnchor)

    Tests for inequality. Same as !Equals(XRAnchor).

    See Also

    XRAnchorSubsystem
    In This Article
    Back to top
    Copyright © 2024 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)