OpenXRSpatialEntityTracker
Inherits: XRPositionalTracker < XRTracker < RefCounted < Object
Inherited by: OpenXRAnchorTracker, OpenXRMarkerTracker, OpenXRPlaneTracker
Description
Section titled “Description”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.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| RID | entity |
RID() |
| EntityTrackingState | spatial_tracking_state |
2 |
| XRSystem.TrackerType | type |
8 (overrides XRTracker) |
Methods
Section titled “Methods”| 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) |
Signals
Section titled “Signals”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)
Enumerations
Section titled “Enumerations”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.
Property descriptions
Section titled “Property descriptions”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.
Method descriptions
Section titled “Method descriptions”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.
