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
| Name | Type | Summary |
|---|---|---|
| trackableId | TrackableId | - |
Overload 1
public XRVps2Anchor(TrackableId trackableId, bool initializing)
Parameters
| Name | Type | Summary |
|---|---|---|
| trackableId | TrackableId | - |
| initializing | bool | - |
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
| Name | Type | Summary |
|---|---|---|
| trackableId | TrackableId | The TrackableId associated with this anchor. |
| pose | Pose | The Pose, in session space, of the anchor. |
| trackingState | TrackingState | The TrackingState of the anchor. |
| trackingStateReason | Vps2AnchorTrackingStateReason | The reason for the current tracking state. |
| xrVps2AnchorPayload | XRVps2AnchorPayload | The payload associated with the anchor. |
| timestampMs | ulong | - |
| trackingConfidence | float | Positive number representing confidence we have in latest tracking update. |
| geolocation | Nullable<XRGeolocation> | - |
Properties
| Name | Type | Summary |
|---|---|---|
| static readonly defaultValue | XRVps2Anchor | 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 geolocation | Nullable<XRGeolocation> | - |
| readonly nativePtr | nint | A native pointer associated with the anchor. The data pointed to by this pointer is implementation-specific. |
| readonly pose | Pose | Get the Pose, in session space, for this anchor. |
| readonly timestampMs | ulong | Get the timestamp in miliseconds of the latest update for this anchor. The timestamp has the same base as the frame. |
| readonly trackableId | TrackableId | Get the TrackableId associated with this anchor. |
| readonly trackingConfidence | float | Get the trackingConfidence of this anchor. |
| readonly trackingState | TrackingState | Get the TrackingState of this anchor. |
| readonly trackingStateReason | Vps2AnchorTrackingStateReason | Get the trackingStateReason of this anchor. |
Methods
| Name | Type | Summary |
|---|---|---|
| Equals | bool | Tests for equality. |
| GetHashCode | int | Generates a hash suitable for use with containers like HashSet and Dictionary. |
Operators
| Name | Type | Summary |
|---|---|---|
| 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