Skip to content

OpenXRSpatialEntityTracker

Inherits: XRPositionalTracker < XRTracker < RefCounted < Object

Inherited by: OpenXRAnchorTracker, OpenXRMarkerTracker, OpenXRPlaneTracker

Base class for Positional trackers managed by OpenXR’s spatial entity extensions.

These are trackers created and managed by OpenXR’s spatial entity extensions that give access to specific data related to OpenXR’s spatial entities. They will always be of type TRACKER_ANCHOR.

Type Name Default
RID entity RID()
EntityTrackingState spatial_tracking_state 2
XRSystem.TrackerType type 8 (overrides XRTracker)
Returns Method
void add_next(next: OpenXRStructureBase)
OpenXRStructureBase get_next() const
RID get_spatial_context() const
void remove_next(next: OpenXRStructureBase)
void set_spatial_context(spatial_context: RID)

next_changed

next_changed()

Emitted when the next-chain changes, from either add_next() or remove_next().

spatial_tracking_state_changed

spatial_tracking_state_changed(spatial_tracking_state: int)

EntityTrackingState

enum EntityTrackingState

ENTITY_TRACKING_STATE_STOPPED = 1

This anchor has stopped tracking.

ENTITY_TRACKING_STATE_PAUSED = 2

Tracking is currently paused.

ENTITY_TRACKING_STATE_TRACKING = 3

This anchor is currently being tracked.

entity

RID entity = RID()

The spatial entity associated with this tracker.

spatial_tracking_state

EntityTrackingState spatial_tracking_state = 2

The spatial tracking state for this tracker.

add_next

void add_next(next: OpenXRStructureBase)

Adds a new OpenXRStructureBase to the next-chain.

get_next() will return this next until either add_next() is called again or it’s removed in remove_next().

get_next

OpenXRStructureBase get_next() const

Gets the head OpenXRStructureBase in the next-chain.

See also add_next() and remove_next().

get_spatial_context

RID get_spatial_context() const

Gets the spatial context used to create this OpenXRSpatialEntityTracker.

remove_next

void remove_next(next: OpenXRStructureBase)

Removes a next object previously added in add_next() from the next-chain.

set_spatial_context

void set_spatial_context(spatial_context: RID)

Sets the spatial context used to create this tracker.