Skip to main content
←API Reference ←NianticSpatial.NSDK.AR.XRSubsystems

XRVps2Anchor


Declaration​

public struct XRVps2Anchor : ValueType, ITrackable, IEquatable<XRVps2Anchor>

Summary​

Describes session-relative data for an anchor. Note: trackingState can stay tracked while a device is disturbed, such as a covered camera or a dark room, and stays tracked indefinitely while the device stays still. It changes once confidence drops low enough. Use trackingConfidence and trackingStateReason to react more sensitively to device disturbances.

See also​

  • XRVps2Anchor

Constructors​

Constructor​

public XRVps2Anchor(TrackableId trackableId)

Parameters​

NameTypeSummary
trackableIdTrackableId
-

Overload 1​

public XRVps2Anchor(TrackableId trackableId, bool initializing)

Parameters​

NameTypeSummary
trackableIdTrackableId
-
initializingbool
-

Overload 2​

public XRVps2Anchor(TrackableId trackableId, Pose pose, TrackingState trackingState, Vps2AnchorTrackingStateReason trackingStateReason, XRVps2AnchorPayload xrVps2AnchorPayload, ulong timestampMs, float trackingConfidence, Nullable<XRGeolocation> geolocation)

Summary​

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

Parameters​

NameTypeSummary
trackableIdTrackableId
The TrackableId associated with this anchor.
posePose
The Pose, in session space, of the anchor.
trackingStateTrackingState
The TrackingState of the anchor.
trackingStateReasonVps2AnchorTrackingStateReason
The reason for the current tracking state.
xrVps2AnchorPayloadXRVps2AnchorPayload
The payload associated with the anchor.
timestampMsulong
-
trackingConfidencefloat
Positive number representing confidence we have in latest tracking update.
geolocationNullable<XRGeolocation>
-

Properties​

NameTypeSummary
static readonly defaultValueXRVps2Anchor
Gets a default-initialized XRVps2Anchor. This may be
different from the zero-initialized version (for example, the pose
is Pose.identity instead of zero-initialized).
readonly geolocationNullable<XRGeolocation>
-
readonly nativePtrnint
A native pointer associated with the anchor.
The data pointed to by this pointer is implementation-specific.
readonly posePose
Get the Pose, in session space, for this anchor.
readonly timestampMsulong
Get the timestamp in miliseconds of the latest update for this anchor.
The timestamp has the same base as the frame.
readonly trackableIdTrackableId
Get the TrackableId associated with this anchor.
readonly trackingConfidencefloat
Get the trackingConfidence of this anchor.
readonly trackingStateTrackingState
Get the TrackingState of this anchor.
readonly trackingStateReasonVps2AnchorTrackingStateReason
Get the trackingStateReason of this anchor.

Methods​

NameTypeSummary
Equalsbool
Tests for equality.
GetHashCodeint
Generates a hash suitable for use with containers like HashSet and Dictionary.

Operators​

NameTypeSummary
static !=bool
Tests for inequality. Same as !Equals.
static ==bool
Tests for equality. Same as Equals.

Relationships​

implements: UnityEngine.XR.ARSubsystems.ITrackable

implements: System.IEquatable