RenderingConnection.SpatialQueryObbAsync(SpatialQueryObb) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Performs a spatial query on the remote scene using an oriented box as the query volume.
public:
System::Threading::Tasks::Task<Microsoft::Azure::RemoteRendering::SpatialQueryResult ^> ^ SpatialQueryObbAsync(Microsoft::Azure::RemoteRendering::SpatialQueryObb query);
public System.Threading.Tasks.Task<Microsoft.Azure.RemoteRendering.SpatialQueryResult> SpatialQueryObbAsync (Microsoft.Azure.RemoteRendering.SpatialQueryObb query);
member this.SpatialQueryObbAsync : Microsoft.Azure.RemoteRendering.SpatialQueryObb -> System.Threading.Tasks.Task<Microsoft.Azure.RemoteRendering.SpatialQueryResult>
Public Function SpatialQueryObbAsync (query As SpatialQueryObb) As Task(Of SpatialQueryResult)
Parameters
- query
- SpatialQueryObb
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.