OpenXRFbSpatialEntityQuery

Inherits: RefCounted

Used to query spatial entities stored on the headset or in the cloud.

Description

Used to query OpenXRFbSpatialEntity objects stored on the headset or in the cloud.

Properties

int

max_results

25

float

timeout

0.0

Methods

Error

execute ( )

ComponentType

get_component_type ( ) const

QueryType

get_query_type ( ) const

StorageLocation

get_storage_location ( ) const

Array

get_uuids ( ) const

void

query_all ( )

void

query_by_component ( ComponentType component, StorageLocation location=0 )

void

query_by_uuid ( Array uuids, StorageLocation location=0 )


Signals

openxr_fb_spatial_entity_query_completed ( Array results )

Emitted when the query has finished executing.


Enumerations

enum QueryType:

QueryType QUERY_ALL = 0

Query all spatial entities.

QueryType QUERY_BY_UUID = 1

Query by UUID.

QueryType QUERY_BY_COMPONENT = 2

Query by component.


Property Descriptions

int max_results = 25

  • void set_max_results ( int value )

  • int get_max_results ( )

The maximum number of results to return as the result of executing the query.


float timeout = 0.0

  • void set_timeout ( float value )

  • float get_timeout ( )

The maximum amount of time (in seconds) to wait for the query to return before giving up.

If set to 0.0, the query won't timeout.


Method Descriptions

Error execute ( )

Executes the query. Returns Error.OK if the query can be executed; otherwise, it returns Error.ERR_ALREADY_IN_USE or Error.ERR_INVALID_DATA.

This is an asynchronous operation - the openxr_fb_spatial_entity_query_completed signal will be emitted when the query is completed.

Each query object can only be executed once. To perform multiple queries, create a new OpenXRFbSpatialEntityQuery for each one.


ComponentType get_component_type ( ) const

Gets the component type being searched for when querying by component.

See query_by_component.


QueryType get_query_type ( ) const

Gets the type of query that will be performed.

Set by using query_all, query_by_component or query_by_uuid.


StorageLocation get_storage_location ( ) const

The storage location that is being queried.


Array get_uuids ( ) const

Gets the UUIDs being searched for when querying by UUID.

See query_by_uuid.


void query_all ( )

Sets up the query to get all spatial entities in local storage (up to the limit of max_results).

Note: It's not possible to query all spatial entities stored in the cloud.


void query_by_component ( ComponentType component, StorageLocation location=0 )

Sets up the query to get all spatial entities with the given component in the given storage location (up to the limit of max_results).


void query_by_uuid ( Array uuids, StorageLocation location=0 )

Sets up the query to get all spatial entities with the given UUIDs from the given storage location.