C Specification
The XrSpatialRaycastInfoANDROID structure is defined as:
// Provided by XR_ANDROID_spatial_discovery_raycast
typedef struct XrSpatialRaycastInfoANDROID {
XrStructureType type;
const void* next;
XrSpace space;
XrTime time;
XrVector3f origin;
XrVector3f direction;
float maxDistance;
} XrSpatialRaycastInfoANDROID;
Members
Description
An application can include XrSpatialRaycastInfoANDROID in the
XrSpatialDiscoverySnapshotCreateInfoEXT::next chain to discover
spatial entities that intersect with the ray defined in this struct.
If an application uses XrSpatialRaycastInfoANDROID with an
XrSpatialContextEXT that was configured without enabling
XR_SPATIAL_COMPONENT_TYPE_RAYCAST_RESULT_ANDROID for any capability,
the runtime must return XR_ERROR_SPATIAL_COMPONENT_NOT_ENABLED_EXT
from xrCreateSpatialDiscoverySnapshotAsyncEXT or
xrCreateSpatialRaycastSnapshotANDROID.
The runtime must include the component data and ids of only those spatial
entities in XrSpatialSnapshotEXT that come from capabilities that
support the XR_SPATIAL_COMPONENT_TYPE_RAYCAST_RESULT_ANDROID
component.
If an application sets maxDistance to a positive value, the runtime
must not include any hit spatial entities in the snapshot that are more
than maxDistance away from the panme:origin along direction.
If maxDistance is set to 0 or a negative value, the runtime must
consider the ray unbounded.
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.