OpenXRSpatialPlaneTrackingCapability
Implementation for handling spatial entity plane tracking logic.
Implementation for handling spatial entity plane tracking logic.
This class handles the OpenXR plane tracking spatial entity extension.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OpenXRSpatialPlaneTrackingCapabilityConstructor
public OpenXRSpatialPlaneTrackingCapability();Methods5
GetBuiltInTrackingStateOpenXRSpatialEntityExtension.TrackingState
public OpenXRSpatialEntityExtension.TrackingState GetBuiltInTrackingState();Returns the state of the built-in tracking system.
OpenXRSpatialEntityExtension.TrackingStateIsSupportedbool
public bool IsSupported();Returns true if plane tracking is supported by the current device.
boolStartBuiltInTrackingbool
public bool StartBuiltInTracking();Starts the built-in plane tracking logic. This will fail if built-in tracking is already enabled.
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 plane entities associated with spatial_context.
component_data are the OpenXRSpatialComponentDatas to discover for this plane 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 plane tracking logic.
| Name | Type | Default |
|---|---|---|
clearTrackers | bool | true |