:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRSpatialEntityExtension.xml. .. _class_OpenXRSpatialEntityExtension: OpenXRSpatialEntityExtension ============================ **Experimental:** This class may be changed or removed in future versions. **Inherits:** :ref:`OpenXRExtensionWrapper` **<** :ref:`Object` OpenXR extension that handles spatial entities. .. rst-class:: classref-introduction-group Description ----------- OpenXR extension that handles spatial entities and, when enabled, allows querying those spatial entities. This extension will also automatically manage :ref:`XRTracker` objects for static entities. .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`add_spatial_entity`\ (\ spatial_context\: :ref:`RID`, entity_id\: :ref:`int`, entity\: :ref:`int`\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`OpenXRFutureResult` | :ref:`create_spatial_context`\ (\ capability_configurations\: :ref:`Array`\[:ref:`OpenXRSpatialCapabilityConfigurationBaseHeader`\], next\: :ref:`OpenXRStructureBase` = null, user_callback\: :ref:`Callable` = Callable()\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`OpenXRFutureResult` | :ref:`discover_spatial_entities`\ (\ spatial_context\: :ref:`RID`, component_types\: :ref:`PackedInt64Array`, next\: :ref:`OpenXRStructureBase` = null, user_callback\: :ref:`Callable` = Callable()\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`find_spatial_entity`\ (\ entity_id\: :ref:`int`\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`free_spatial_context`\ (\ spatial_context\: :ref:`RID`\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`free_spatial_entity`\ (\ entity\: :ref:`RID`\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`free_spatial_snapshot`\ (\ spatial_snapshot\: :ref:`RID`\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedFloat32Array` | :ref:`get_float_buffer`\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_spatial_context_handle`\ (\ spatial_context\: :ref:`RID`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_spatial_context_ready`\ (\ spatial_context\: :ref:`RID`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_spatial_entity_context`\ (\ entity\: :ref:`RID`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_spatial_entity_id`\ (\ entity\: :ref:`RID`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_spatial_snapshot_context`\ (\ spatial_snapshot\: :ref:`RID`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_spatial_snapshot_handle`\ (\ spatial_snapshot\: :ref:`RID`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string`\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`get_uint8_buffer`\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_uint16_buffer`\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_uint32_buffer`\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`get_vector2_buffer`\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`get_vector3_buffer`\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`make_spatial_entity`\ (\ spatial_context\: :ref:`RID`, entity_id\: :ref:`int`\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`query_snapshot`\ (\ spatial_snapshot\: :ref:`RID`, component_data\: :ref:`Array`\[:ref:`OpenXRSpatialComponentData`\], next\: :ref:`OpenXRStructureBase` = null\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`supports_capability`\ (\ capability\: :ref:`Capability`\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`supports_component_type`\ (\ capability\: :ref:`Capability`, component_type\: :ref:`ComponentType`\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`update_spatial_entities`\ (\ spatial_context\: :ref:`RID`, entities\: :ref:`Array`\[:ref:`RID`\], component_types\: :ref:`PackedInt64Array`, next\: :ref:`OpenXRStructureBase` = null\ ) | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_OpenXRSpatialEntityExtension_signal_spatial_discovery_recommended: .. rst-class:: classref-signal **spatial_discovery_recommended**\ (\ spatial_context\: :ref:`RID`\ ) :ref:`🔗` Emitted when OpenXR recommends running a discovery query because entities managed by this spatial context have (likely) changed. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_OpenXRSpatialEntityExtension_Capability: .. rst-class:: classref-enumeration enum **Capability**: :ref:`🔗` .. _class_OpenXRSpatialEntityExtension_constant_CAPABILITY_PLANE_TRACKING: .. rst-class:: classref-enumeration-constant :ref:`Capability` **CAPABILITY_PLANE_TRACKING** = ``1000741000`` Plane tracking capability. .. _class_OpenXRSpatialEntityExtension_constant_CAPABILITY_MARKER_TRACKING_QR_CODE: .. rst-class:: classref-enumeration-constant :ref:`Capability` **CAPABILITY_MARKER_TRACKING_QR_CODE** = ``1000743000`` QR code based marker tracking capability. .. _class_OpenXRSpatialEntityExtension_constant_CAPABILITY_MARKER_TRACKING_MICRO_QR_CODE: .. rst-class:: classref-enumeration-constant :ref:`Capability` **CAPABILITY_MARKER_TRACKING_MICRO_QR_CODE** = ``1000743001`` Micro QR code based marker tracking capability. .. _class_OpenXRSpatialEntityExtension_constant_CAPABILITY_MARKER_TRACKING_ARUCO_MARKER: .. rst-class:: classref-enumeration-constant :ref:`Capability` **CAPABILITY_MARKER_TRACKING_ARUCO_MARKER** = ``1000743002`` Aruco marker based marker tracking capability. .. _class_OpenXRSpatialEntityExtension_constant_CAPABILITY_MARKER_TRACKING_APRIL_TAG: .. rst-class:: classref-enumeration-constant :ref:`Capability` **CAPABILITY_MARKER_TRACKING_APRIL_TAG** = ``1000743003`` April tag based marker tracking capability. .. _class_OpenXRSpatialEntityExtension_constant_CAPABILITY_ANCHOR: .. rst-class:: classref-enumeration-constant :ref:`Capability` **CAPABILITY_ANCHOR** = ``1000762000`` Anchor capability. .. rst-class:: classref-item-separator ---- .. _enum_OpenXRSpatialEntityExtension_ComponentType: .. rst-class:: classref-enumeration enum **ComponentType**: :ref:`🔗` .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_BOUNDED_2D: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_BOUNDED_2D** = ``1`` Component that provides the 2D bounds for a spatial entity. The corresponding list structure is ``XrSpatialComponentBounded2DListEXT``; the corresponding data structure is ``XrSpatialBounded2DDataEXT``. .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_BOUNDED_3D: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_BOUNDED_3D** = ``2`` Component that provides the 3D bounds for a spatial entity. The corresponding list structure is ``XrSpatialComponentBounded3DListEXT``; the corresponding data structure is ``XrBoxf``. .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_PARENT: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_PARENT** = ``3`` Component that provides the XrSpatialEntityIdEXT of the parent for a spatial entity. The corresponding list structure is ``XrSpatialComponentParentListEXT``; the corresponding data structure is ``XrSpatialEntityIdEXT``. .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_MESH_3D: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_MESH_3D** = ``4`` Component that provides a 3D mesh for a spatial entity. The corresponding list structure is ``XrSpatialComponentMesh3DListEXT``; the corresponding data structure is ``XrSpatialMeshDataEXT``. .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_PLANE_ALIGNMENT: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_PLANE_ALIGNMENT** = ``1000741000`` Component 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). .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_MESH_2D: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_MESH_2D** = ``1000741001`` Component 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). .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_POLYGON_2D: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_POLYGON_2D** = ``1000741002`` Component 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). .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_PLANE_SEMANTIC_LABEL: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_PLANE_SEMANTIC_LABEL** = ``1000741003`` Component 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). .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_MARKER: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_MARKER** = ``1000743000`` A 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). .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_ANCHOR: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_ANCHOR** = ``1000762000`` Component 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). .. _class_OpenXRSpatialEntityExtension_constant_COMPONENT_TYPE_PERSISTENCE: .. rst-class:: classref-enumeration-constant :ref:`ComponentType` **COMPONENT_TYPE_PERSISTENCE** = ``1000763000`` Component 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). .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_OpenXRSpatialEntityExtension_method_add_spatial_entity: .. rst-class:: classref-method :ref:`RID` **add_spatial_entity**\ (\ spatial_context\: :ref:`RID`, entity_id\: :ref:`int`, entity\: :ref:`int`\ ) :ref:`🔗` Registers an entity that was created directly on the OpenXR runtime. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_create_spatial_context: .. rst-class:: classref-method :ref:`OpenXRFutureResult` **create_spatial_context**\ (\ capability_configurations\: :ref:`Array`\[:ref:`OpenXRSpatialCapabilityConfigurationBaseHeader`\], next\: :ref:`OpenXRStructureBase` = null, user_callback\: :ref:`Callable` = Callable()\ ) :ref:`🔗` Creates a new spatial context that handles entities for the provided capability configurations. ``capability_configurations`` is an array of :ref:`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 :ref:`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 :ref:`RID` for our spatial context. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_discover_spatial_entities: .. rst-class:: classref-method :ref:`OpenXRFutureResult` **discover_spatial_entities**\ (\ spatial_context\: :ref:`RID`, component_types\: :ref:`PackedInt64Array`, next\: :ref:`OpenXRStructureBase` = null, user_callback\: :ref:`Callable` = Callable()\ ) :ref:`🔗` 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 :ref:`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 :ref:`RID` for our snapshot. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_find_spatial_entity: .. rst-class:: classref-method :ref:`RID` **find_spatial_entity**\ (\ entity_id\: :ref:`int`\ ) :ref:`🔗` Returns the :ref:`RID` for the specified spatial entity ID. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_free_spatial_context: .. rst-class:: classref-method |void| **free_spatial_context**\ (\ spatial_context\: :ref:`RID`\ ) :ref:`🔗` Frees a spatial context previously created when calling :ref:`create_spatial_context()`. If the spatial context creation is still ongoing, the asynchronous process is cancelled. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_free_spatial_entity: .. rst-class:: classref-method |void| **free_spatial_entity**\ (\ entity\: :ref:`RID`\ ) :ref:`🔗` Frees an entity previously created when calling :ref:`add_spatial_entity()` or :ref:`make_spatial_entity()`. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_free_spatial_snapshot: .. rst-class:: classref-method |void| **free_spatial_snapshot**\ (\ spatial_snapshot\: :ref:`RID`\ ) :ref:`🔗` Frees a spatial snapshot previously created when calling :ref:`discover_spatial_entities()`. If the spatial snapshot creation is still ongoing, the asynchronous process is cancelled. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_float_buffer: .. rst-class:: classref-method :ref:`PackedFloat32Array` **get_float_buffer**\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns a buffer with floats from a buffer that was retrieved when taking a snapshot. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_spatial_context_handle: .. rst-class:: classref-method :ref:`int` **get_spatial_context_handle**\ (\ spatial_context\: :ref:`RID`\ ) |const| :ref:`🔗` 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. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_spatial_context_ready: .. rst-class:: classref-method :ref:`bool` **get_spatial_context_ready**\ (\ spatial_context\: :ref:`RID`\ ) |const| :ref:`🔗` Returns ``true`` if the spatial context finished its creation and is ready to be used. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_spatial_entity_context: .. rst-class:: classref-method :ref:`RID` **get_spatial_entity_context**\ (\ entity\: :ref:`RID`\ ) |const| :ref:`🔗` Returns the spatial context for this entity. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_spatial_entity_id: .. rst-class:: classref-method :ref:`int` **get_spatial_entity_id**\ (\ entity\: :ref:`RID`\ ) |const| :ref:`🔗` Returns the internal ``XrSpatialEntityIdEXT`` associated with the entity. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_spatial_snapshot_context: .. rst-class:: classref-method :ref:`RID` **get_spatial_snapshot_context**\ (\ spatial_snapshot\: :ref:`RID`\ ) |const| :ref:`🔗` Returns the spatial context related to this spatial snapshot. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_spatial_snapshot_handle: .. rst-class:: classref-method :ref:`int` **get_spatial_snapshot_handle**\ (\ spatial_snapshot\: :ref:`RID`\ ) |const| :ref:`🔗` 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. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_string: .. rst-class:: classref-method :ref:`String` **get_string**\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns a string from a buffer that was retrieved when taking a snapshot. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_uint8_buffer: .. rst-class:: classref-method :ref:`PackedByteArray` **get_uint8_buffer**\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns a buffer with 8 bit ints from a buffer that was retrieved when taking a snapshot. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_uint16_buffer: .. rst-class:: classref-method :ref:`PackedInt32Array` **get_uint16_buffer**\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns a buffer with 16 bit ints from a buffer that was retrieved when taking a snapshot. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_uint32_buffer: .. rst-class:: classref-method :ref:`PackedInt32Array` **get_uint32_buffer**\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns a buffer with 32 bit ints from a buffer that was retrieved when taking a snapshot. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_vector2_buffer: .. rst-class:: classref-method :ref:`PackedVector2Array` **get_vector2_buffer**\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns a buffer with :ref:`Vector2` entries from a buffer that was retrieved when taking a snapshot. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_get_vector3_buffer: .. rst-class:: classref-method :ref:`PackedVector3Array` **get_vector3_buffer**\ (\ spatial_snapshot\: :ref:`RID`, buffer_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns a buffer with :ref:`Vector3` entries from a buffer that was retrieved when taking a snapshot. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_make_spatial_entity: .. rst-class:: classref-method :ref:`RID` **make_spatial_entity**\ (\ spatial_context\: :ref:`RID`, entity_id\: :ref:`int`\ ) :ref:`🔗` Creates a new entity for this ``entity_id``. The ``spatial_context`` should match the context that discovered the entity. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_query_snapshot: .. rst-class:: classref-method :ref:`bool` **query_snapshot**\ (\ spatial_snapshot\: :ref:`RID`, component_data\: :ref:`Array`\[:ref:`OpenXRSpatialComponentData`\], next\: :ref:`OpenXRStructureBase` = null\ ) :ref:`🔗` 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 :ref:`OpenXRSpatialQueryResultData` as the first entry. \ ``next`` is an optional parameter that can contain additional information passed when setting our query conditions. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_supports_capability: .. rst-class:: classref-method :ref:`bool` **supports_capability**\ (\ capability\: :ref:`Capability`\ ) :ref:`🔗` Returns ``true`` if this spatial entity ``capability`` is supported by the hardware used. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_supports_component_type: .. rst-class:: classref-method :ref:`bool` **supports_component_type**\ (\ capability\: :ref:`Capability`, component_type\: :ref:`ComponentType`\ ) :ref:`🔗` Returns ``true`` if this ``capability`` supports the ``component_type``. .. rst-class:: classref-item-separator ---- .. _class_OpenXRSpatialEntityExtension_method_update_spatial_entities: .. rst-class:: classref-method :ref:`RID` **update_spatial_entities**\ (\ spatial_context\: :ref:`RID`, entities\: :ref:`Array`\[:ref:`RID`\], component_types\: :ref:`PackedInt64Array`, next\: :ref:`OpenXRStructureBase` = null\ ) :ref:`🔗` Performs a snapshot for a limited number of entities. This is NOT an asynchronous method and will return the snapshot immediately. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`