OpenXRSpatialMarkerTrackingCapability
Implementation for handling spatial entity marker tracking logic.
Implementation for handling spatial entity marker tracking logic.
This class handles the OpenXR marker tracking spatial entity extension.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OpenXRSpatialMarkerTrackingCapabilityConstructor
public OpenXRSpatialMarkerTrackingCapability();Methods9
DoEntityUpdatevoid
public void DoEntityUpdate(Rid spatialContext, Reckfell.Collections.Array<OpenXRSpatialComponentData> componentData, OpenXRStructureBase nextSnapshotCreate = null, OpenXRStructureBase nextSnapshotQuery = null);Calls OpenXRSpatialEntityExtension.UpdateSpatialEntities and OpenXRSpatialEntityExtension.QuerySnapshot with the marker entities associated with spatial_context.
component_data are the OpenXRSpatialComponentDatas to update for this marker capability.
If next_snapshot_create is non-null, then pass this to the next parameter in OpenXRSpatialEntityExtension.UpdateSpatialEntities.
If next_snapshot_query is non-null, then pass this to the next parameter in OpenXRSpatialEntityExtension.QuerySnapshot.
| Name | Type | Default |
|---|---|---|
spatialContext | Rid | — |
componentData | Reckfell.Collections.Array<OpenXRSpatialComponentData> | — |
nextSnapshotCreate | OpenXRStructureBase | null |
nextSnapshotQuery | OpenXRStructureBase | null |
GetBuiltInTrackingStateOpenXRSpatialEntityExtension.TrackingState
public OpenXRSpatialEntityExtension.TrackingState GetBuiltInTrackingState();Returns the state of the built-in tracking system.
OpenXRSpatialEntityExtension.TrackingStateIsAprilTagSupportedbool
public bool IsAprilTagSupported();Returns true if April tag marker tracking is supported by the current device.
boolIsArucoSupportedbool
public bool IsArucoSupported();Returns true if ArUco marker tracking is supported by the current device.
boolIsMicroQrcodeSupportedbool
public bool IsMicroQrcodeSupported();Returns true if micro QR code marker tracking is supported by the current device.
boolIsQrcodeSupportedbool
public bool IsQrcodeSupported();Returns true if QR code marker tracking is supported by the current device.
boolStartBuiltInTrackingbool
public bool StartBuiltInTracking(OpenXRSpatialMarkerTrackingCapability.MarkerTypeFlags markerTypes);Starts the built-in marker tracking logic for the specified marker types. This will fail if built-in tracking is already enabled.
| Name | Type | Default |
|---|---|---|
markerTypes | OpenXRSpatialMarkerTrackingCapability.MarkerTypeFlags | — |
boolStartEntityDiscoveryOpenXRFutureResult
public OpenXRFutureResult StartEntityDiscovery(Rid spatialContext, Reckfell.Collections.Array<OpenXRSpatialComponentData> componentData, OpenXRStructureBase nextSnapshotCreate = null, OpenXRStructureBase nextSnapshotQuery = null, Callable userCallback = default);Calls OpenXRSpatialEntityExtension.DiscoverSpatialEntities and OpenXRSpatialEntityExtension.QuerySnapshot with the marker entities associated with spatial_context.
component_data are the OpenXRSpatialComponentDatas to discover for this marker capability.
If next_snapshot_create is non-null, then pass this to the next parameter in OpenXRSpatialEntityExtension.DiscoverSpatialEntities.
If next_snapshot_query is non-null, then pass this to the next parameter in OpenXRSpatialEntityExtension.QuerySnapshot.
user_callback, when non-null, is called with two parameters usually twice. The first parameter is the Rid of the discovery snapshot and the second parameter is a boolean where false indicates the discovery snapshot is about to be processed, and true indicates the discovery snapshot has been processed and component_data has valid data. The second call is skipped if an error was encountered.
The returned OpenXRFutureResult is identical to the return from OpenXRSpatialEntityExtension.DiscoverSpatialEntities.
| Name | Type | Default |
|---|---|---|
spatialContext | Rid | — |
componentData | Reckfell.Collections.Array<OpenXRSpatialComponentData> | — |
nextSnapshotCreate | OpenXRStructureBase | null |
nextSnapshotQuery | OpenXRStructureBase | null |
userCallback | Callable | default |
OpenXRFutureResultStopBuiltInTrackingvoid
public void StopBuiltInTracking(bool clearTrackers = true);Stops the built-in marker tracking logic.
| Name | Type | Default |
|---|---|---|
clearTrackers | bool | true |
OpenXRSpatialMarkerTrackingCapability.MarkerTypeFlags
| Value | Description |
|---|---|
AprilTag = 8 | April tag. |
Aruco = 4 | ArUco marker. |
MicroQrCode = 2 | Micro QR Code. |
QrCode = 1 | QR Code. |