OpenXR extension that handles spatial entities.
OpenXR extension that handles spatial entities and, when enabled, allows querying those spatial entities. This extension will also automatically manage XRTracker objects for static entities.
Creates a new spatial context that handles entities for the provided capability configurations. capability_configurations is an array of OpenXRSpatialCapabilityConfigurationBaseHeader with the needed capability configuration data.
next is an optional parameter that can contain additional information for creating our spatial context.
Note: This is an asynchronous method and returns an OpenXRFutureResult object with which to track the status, discarding this object will not cancel the creation process. On success user_callback will be called if specified. The result data for this function is the RID for our spatial context.
Starts a new discovery query, this will gather all objects tracked by the spatial_context that have at least one of the component types specified in component_types.
next is an optional parameter that can contain additional information for executing the discovery query.
Note: This is an asynchronous method and returns an OpenXRFutureResult object with which to track the status, discarding this object will not cancel the discovery process. On success user_callback will be called if specified. The result data for this function is the RID for our snapshot.
Convenience method when the caller only has an Array of OpenXRSpatialComponentData and needs to discover spatial entities.
Frees a spatial context previously created when calling create_spatial_context(). If the spatial context creation is still ongoing, the asynchronous process is cancelled.
Frees an entity previously created when calling add_spatial_entity() or make_spatial_entity().
Frees a spatial snapshot previously created when calling discover_spatial_entities(). If the spatial snapshot creation is still ongoing, the asynchronous process is cancelled.
Returns the OpenXR spatial context handle for this snapshot.
Note: This method is intended to be used from GDExtensions that implement spatial entity capability handlers.
Returns the OpenXR spatial snapshot handle for this snapshot.
Note: This method is intended to be used from GDExtensions that implement spatial entity capability handlers.
Returns a buffer with Vector2 entries from a buffer that was retrieved when taking a snapshot.
Returns a buffer with Vector3 entries from a buffer that was retrieved when taking a snapshot.
Creates a new entity for this entity_id. The spatial_context should match the context that discovered the entity.
Queries the snapshot data. This will find all entities in the snapshot that contain all requested components in component_data. The objects held within component_data will then be populated with the queried data. component_data must always have an object of OpenXRSpatialQueryResultData as the first entry.
next is an optional parameter that can contain additional information passed when setting our query conditions.
Returns true if this capability supports the component_type.
Performs a snapshot for a limited number of entities. This is NOT an asynchronous method and will return the snapshot immediately.
Emitted when OpenXR recommends running a discovery query because entities managed by this spatial context have (likely) changed.
CAPABILITY_PLANE_TRACKING = 1000741000Plane tracking capability.
CAPABILITY_MARKER_TRACKING_QR_CODE = 1000743000QR code based marker tracking capability.
CAPABILITY_MARKER_TRACKING_MICRO_QR_CODE = 1000743001Micro QR code based marker tracking capability.
CAPABILITY_MARKER_TRACKING_ARUCO_MARKER = 1000743002Aruco marker based marker tracking capability.
CAPABILITY_MARKER_TRACKING_APRIL_TAG = 1000743003April tag based marker tracking capability.
CAPABILITY_ANCHOR = 1000762000Anchor capability.
COMPONENT_TYPE_BOUNDED_2D = 1Component that provides the 2D bounds for a spatial entity. The corresponding list structure is XrSpatialComponentBounded2DListEXT; the corresponding data structure is XrSpatialBounded2DDataEXT.
COMPONENT_TYPE_BOUNDED_3D = 2Component that provides the 3D bounds for a spatial entity. The corresponding list structure is XrSpatialComponentBounded3DListEXT; the corresponding data structure is XrBoxf.
COMPONENT_TYPE_PARENT = 3Component that provides the XrSpatialEntityIdEXT of the parent for a spatial entity. The corresponding list structure is XrSpatialComponentParentListEXT; the corresponding data structure is XrSpatialEntityIdEXT.
COMPONENT_TYPE_MESH_3D = 4Component that provides a 3D mesh for a spatial entity. The corresponding list structure is XrSpatialComponentMesh3DListEXT; the corresponding data structure is XrSpatialMeshDataEXT.
COMPONENT_TYPE_PLANE_ALIGNMENT = 1000741000Component that provides the plane alignment enum for a spatial entity. The corresponding list structure is XrSpatialComponentPlaneAlignmentListEXT; the corresponding data structure is XrSpatialPlaneAlignmentEXT (Added by the XR_EXT_spatial_plane_tracking extension).
COMPONENT_TYPE_MESH_2D = 1000741001Component that provides a 2D mesh for a spatial entity. The corresponding list structure is XrSpatialComponentMesh2DListEXT; the corresponding data structure is XrSpatialMeshDataEXT (Added by the XR_EXT_spatial_plane_tracking extension).
COMPONENT_TYPE_POLYGON_2D = 1000741002Component that provides a 2D boundary polygon for a spatial entity. The corresponding list structure is XrSpatialComponentPolygon2DListEXT; the corresponding data structure is XrSpatialPolygon2DDataEXT (Added by the XR_EXT_spatial_plane_tracking extension).
COMPONENT_TYPE_PLANE_SEMANTIC_LABEL = 1000741003Component that provides a semantic label for a plane. The corresponding list structure is XrSpatialComponentPlaneSemanticLabelListEXT; the corresponding data structure is XrSpatialPlaneSemanticLabelEXT (Added by the XR_EXT_spatial_plane_tracking extension).
COMPONENT_TYPE_MARKER = 1000743000A component describing the marker type, ID and location. The corresponding list structure is XrSpatialComponentMarkerListEXT; the corresponding data structure is XrSpatialMarkerDataEXT (Added by the XR_EXT_spatial_marker_tracking extension).
COMPONENT_TYPE_ANCHOR = 1000762000Component that provides the location for an anchor. The corresponding list structure is XrSpatialComponentAnchorListEXT; the corresponding data structure is XrPosef (Added by the XR_EXT_spatial_anchor extension).
COMPONENT_TYPE_PERSISTENCE = 1000763000Component that provides the persisted UUID for a spatial entity. The corresponding list structure is XrSpatialComponentPersistenceListEXT; the corresponding data structure is [code]XrSpatialPersistenceDataEXT (Added by the XR_EXT_spatial_persistence extension).