C Specification
The xrCreateSpatialRaycastSnapshotANDROID function is defined as:
// Provided by XR_ANDROID_spatial_discovery_raycast
XrResult xrCreateSpatialRaycastSnapshotANDROID(
XrSpatialContextEXT spatialContext,
const XrSpatialRaycastSnapshotCreateInfoANDROID* createInfo,
XrSpatialSnapshotEXT* snapshot);
Parameters
Description
While xrCreateSpatialDiscoverySnapshotAsyncEXT is sufficient for most use cases, it is considered slow for applications that require instant raycast results. xrCreateSpatialRaycastSnapshotANDROID starts a synchronous raycasting to create a snapshot, which allows applications to start querying raycast results immediately.
The runtime must return XR_ERROR_SPATIAL_COMPONENT_NOT_ENABLED_EXT if
any of the XrSpatialComponentTypeEXT in
XrSpatialRaycastSnapshotCreateInfoANDROID::componentTypes are
not enabled for the spatial capabilities passed to
XrSpatialContextCreateInfoEXT::capabilityConfigs when creating
spatialContext.
If the application does not provide a list of spatial component types in
XrSpatialRaycastSnapshotCreateInfoANDROID::componentTypes, the
runtime must include all the spatial entities in the snapshot that have the
set of components which are enumerated in
XrSpatialCapabilityConfigurationBaseHeaderEXT::enabledComponents for
raycast supported capabilities configured for spatialContext.
The runtime must include the data for all the enabled components of the
raycast supported capabilities configured for spatialContext.
See Also
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2026 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.