XRShareableAnchor

Represents a shareable anchor trackable by the shareable anchor subsystem.

Summary

Inheritance

Inherits from: ITrackable, IEquatable< XRShareableAnchor >

Constructors and Destructors

XRShareableAnchor(TrackableId id, Pose pose, TrackingState state, IntPtr nativePtr, TrackableId parentId, XRShareableAnchorHosts host, SerializableGuid shareableId)
Constructs a new XRShareableAnchor.
XRShareableAnchor(TrackableId id, Pose pose, TrackingState state, IntPtr nativePtr, TrackableId parentId)
Constructs a default anchor.

Public static attributes

defaultValue => new XRShareableAnchor( TrackableId.invalidId, Pose.identity, TrackingState.None, IntPtr.Zero, TrackableId.invalidId)
Gets a default-initialized XRShareableAnchor.

Public attributes

host => _host
Gets the host of this shareable anchor.
nativePtr => _nativePtr
IntPtr
Gets a native pointer to additional provider-specific data.
parentId => _parentId
TrackableId
Gets the TrackableId of the parent of this tracked object.
pose => _pose
Pose
Gets the pose of the shareable anchor in the Unity world space.
shareableId => _shareableId
SerializableGuid
Gets the shareable ID to retrieve the anchor from other clients.
trackableId => _trackableId
TrackableId
Gets the unique identifier for this shareable anchor.
trackingState => _state
TrackingState
Gets the current tracking state of the shareable anchor.

Public functions

Equals(XRShareableAnchor other)
bool
Indicates whether every field in this XRShareableAnchor is equal to the corresponding field in other .
Equals(object obj)
override bool
GetHashCode()
override int
UpdateHost(XRShareableAnchorHosts host, SerializableGuid shareableId)
void
Updates host information for a default anchor.

Public static functions

operator!=(XRShareableAnchor left, XRShareableAnchor right)
bool
Determines whether two XRShareableAnchor instances have different property values.
operator==(XRShareableAnchor left, XRShareableAnchor right)
bool
Determines whether two XRShareableAnchor instances have exactly the same property values.

Public static attributes

defaultValue

XRShareableAnchor Google::XR::Extensions::ARSubsystems::XRShareableAnchor::defaultValue =>
            new XRShareableAnchor(
                TrackableId.invalidId,
                Pose.identity,
                TrackingState.None,
                IntPtr.Zero,
                TrackableId.invalidId)

Gets a default-initialized XRShareableAnchor.

Public attributes

host

XRShareableAnchorHosts Google::XR::Extensions::ARSubsystems::XRShareableAnchor::host => _host

Gets the host of this shareable anchor.

nativePtr

IntPtr Google::XR::Extensions::ARSubsystems::XRShareableAnchor::nativePtr => _nativePtr

Gets a native pointer to additional provider-specific data.

May be IntPtr.Zero.

parentId

TrackableId Google::XR::Extensions::ARSubsystems::XRShareableAnchor::parentId => _parentId

Gets the TrackableId of the parent of this tracked object.

May be TrackableId.invalidId.

pose

Pose Google::XR::Extensions::ARSubsystems::XRShareableAnchor::pose => _pose

Gets the pose of the shareable anchor in the Unity world space.

shareableId

SerializableGuid Google::XR::Extensions::ARSubsystems::XRShareableAnchor::shareableId => _shareableId

Gets the shareable ID to retrieve the anchor from other clients.

trackableId

TrackableId Google::XR::Extensions::ARSubsystems::XRShareableAnchor::trackableId => _trackableId

Gets the unique identifier for this shareable anchor.

trackingState

TrackingState Google::XR::Extensions::ARSubsystems::XRShareableAnchor::trackingState => _state

Gets the current tracking state of the shareable anchor.

Public functions

Equals

bool Google::XR::Extensions::ARSubsystems::XRShareableAnchor::Equals(
  XRShareableAnchor other
)

Indicates whether every field in this XRShareableAnchor is equal to the corresponding field in other .

Details
Parameters
other
The XRShareableAnchor to compare with.
Returns
Returns true if all properties match. Otherwise, returns false.

Equals

override bool Google::XR::Extensions::ARSubsystems::XRShareableAnchor::Equals(
  object obj
)

GetHashCode

override int Google::XR::Extensions::ARSubsystems::XRShareableAnchor::GetHashCode()

UpdateHost

void Google::XR::Extensions::ARSubsystems::XRShareableAnchor::UpdateHost(
  XRShareableAnchorHosts host,
  SerializableGuid shareableId
)

Updates host information for a default anchor.

Details
Parameters
host
The host of this shareable anchor.
shareableId
The shareable identifier of this anchor.

XRShareableAnchor

 Google::XR::Extensions::ARSubsystems::XRShareableAnchor::XRShareableAnchor(
  TrackableId id,
  Pose pose,
  TrackingState state,
  IntPtr nativePtr,
  TrackableId parentId,
  XRShareableAnchorHosts host,
  SerializableGuid shareableId
)

Constructs a new XRShareableAnchor.

Details
Parameters
id
The unique identifier for this shareable anchor.
pose
The pose of the shareable anchor in the Unity world space.
state
The current tracking state of the shareable anchor.
nativePtr
Provider-specific native pointer, or IntPtr.Zero.
parentId
The TrackableId of the parent of this tracked object, or TrackableId.invalidId.
host
The host of this shareable anchor.
shareableId
The shareable identifier of this anchor.

XRShareableAnchor

 Google::XR::Extensions::ARSubsystems::XRShareableAnchor::XRShareableAnchor(
  TrackableId id,
  Pose pose,
  TrackingState state,
  IntPtr nativePtr,
  TrackableId parentId
)

Constructs a default anchor.

Details
Parameters
id
The unique identifier for this shareable anchor.
pose
The pose of the shareable anchor in the Unity world space.
state
The current tracking state of the shareable anchor.
nativePtr
Provider-specific native pointer, or IntPtr.Zero.
parentId
The TrackableId of the parent of this tracked object, or TrackableId.invalidId.

Public static functions

operator!=

bool Google::XR::Extensions::ARSubsystems::XRShareableAnchor::operator!=(
  XRShareableAnchor left,
  XRShareableAnchor right
)

Determines whether two XRShareableAnchor instances have different property values.

Details
Parameters
left
The first trackable to compare.
right
The second trackable to compare.
Returns
Returns true if any property differs. Otherwise, returns false.

operator==

bool Google::XR::Extensions::ARSubsystems::XRShareableAnchor::operator==(
  XRShareableAnchor left,
  XRShareableAnchor right
)

Determines whether two XRShareableAnchor instances have exactly the same property values.

Details
Parameters
left
The first trackable to compare.
right
The second trackable to compare.
Returns
Returns true if all properties match. Otherwise, returns false.