C Specification

Applications can request the velocities of spaces by chaining the XrSpaceVelocitiesKHR structure to the next pointer of XrSpaceLocationsKHR when calling xrLocateSpacesKHR.

The XrSpaceVelocitiesKHR structure is defined as:

// Provided by XR_KHR_locate_spaces
// XrSpaceVelocitiesKHR is an alias for XrSpaceVelocities
typedef struct XrSpaceVelocities {
    XrStructureType         type;
    void*                   next;
    uint32_t                velocityCount;
    XrSpaceVelocityData*    velocities;
} XrSpaceVelocities;

typedef XrSpaceVelocities XrSpaceVelocitiesKHR;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain.

  • velocityCount is a uint32_t specifying the count of elements in the velocities array.

  • velocities is an array of XrSpaceVelocityDataKHR for the runtime to populate with the velocities of the specified spaces in the XrSpacesLocateInfoKHR::baseSpace at the specified XrSpacesLocateInfoKHR::time.

Description

The velocities member contains an array of space velocities in the member velocities, to be used as output for xrLocateSpacesKHR. The application must allocate this array to be populated with the function output. The velocityCount value must be the same as XrSpacesLocateInfoKHR::spaceCount, otherwise, the xrLocateSpacesKHR function must return XR_ERROR_VALIDATION_FAILURE.

Valid Usage (Implicit)

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 2014-2025 The Khronos Group Inc.