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

XRVps2Asset

Describes session-relative data for a VPS asset's origin.

Declaration​

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

Remarks​

The trackable id is the asset's UUID (see Vps2AssetId), and siteGuid identifies the site the asset belongs to. The pose is the asset's origin in AR session space. It is valid while the tracking state is Tracking; while Limited, the last known pose is kept.


Constructors​

Constructor​

public XRVps2Asset(TrackableId trackableId)

Summary​

Constructs the session-relative data for an asset whose origin is not tracked
yet: identity pose and TrackingState.None.


Overload​

public XRVps2Asset(TrackableId trackableId, Guid siteGuid, Pose pose, TrackingState trackingState, float trackingConfidence, ulong timestampMs)

Summary​

Constructs the session-relative data for an asset. This is typically provided
by the XRVps2AssetSubsystem implementation and not invoked directly.


Properties​

NameTypeSummary
static readonly defaultValueXRVps2Asset
Gets a default-initialized XRVps2Asset. This may be different
from the zero-initialized version (for example, the pose is
Pose.identity instead of zero-initialized).
readonly nativePtrnint
Not used by this subsystem; always IntPtr.Zero.
readonly posePose
Get the Pose, in AR session space, of the asset's origin.
readonly siteGuidGuid
Get the UUID of the site the asset belongs to. Guid.Empty until the
first tracking data arrives.
readonly timestampMsulong
Get the timestamp of the camera frame the pose was last updated from, in
monotonic milliseconds. The timestamp has the same base as the frame.
readonly trackableIdTrackableId
Get the TrackableId associated with this asset: its UUID,
convertible back with ToUuidString.
readonly trackingConfidencefloat
Get the confidence in the pose, from 0 (none) to 1 (full).
readonly trackingStateTrackingState
Get the TrackingState of this asset.

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