Share via


RenderingConnection.SpatialQuerySphereAsync(SpatialQuerySphere) Method

Definition

Performs a spatial query on the remote scene using a sphere as the query volume.

public:
 System::Threading::Tasks::Task<Microsoft::Azure::RemoteRendering::SpatialQueryResult ^> ^ SpatialQuerySphereAsync(Microsoft::Azure::RemoteRendering::SpatialQuerySphere query);
public System.Threading.Tasks.Task<Microsoft.Azure.RemoteRendering.SpatialQueryResult> SpatialQuerySphereAsync (Microsoft.Azure.RemoteRendering.SpatialQuerySphere query);
member this.SpatialQuerySphereAsync : Microsoft.Azure.RemoteRendering.SpatialQuerySphere -> System.Threading.Tasks.Task<Microsoft.Azure.RemoteRendering.SpatialQueryResult>
Public Function SpatialQuerySphereAsync (query As SpatialQuerySphere) As Task(Of SpatialQueryResult)

Parameters

query
SpatialQuerySphere

The query input parameters.

Returns

Task with return type SpatialQueryResult, which holds the array of overlapping mesh components. The async will complete during an Update() tick.

Remarks

This is a fast way to gather all mesh parts that overlap with given bounds. The individual check is performed based on each mesh part's bounds in the scene, not on individual triangles. All the information to perform this query locally are available on the client, but for scenes with large number of parts this would be impractical. This call returns immediately and emits an event when the spatial query result has arrived. The query will be performed on the server against the state of the world on the frame that the query was issued on. The result list is not sorted. Also, when the maximum number of results is exceeded, this query returns the first n results.

Applies to

See also