C Specification

XrFaceStateANDROID structure returns the face tracking state and facial expressions.

// Provided by XR_ANDROID_face_tracking
typedef struct XrFaceStateANDROID {
    XrStructureType               type;
    void*                         next;
    uint32_t                      parametersCapacityInput;
    uint32_t                      parametersCountOutput;
    float*                        parameters;
    XrFaceTrackingStateANDROID    faceTrackingState;
    XrTime                        sampleTime;
    XrBool32                      isValid;
    uint32_t                      regionConfidencesCapacityInput;
    uint32_t                      regionConfidencesCountOutput;
    float*                        regionConfidences;
} XrFaceStateANDROID;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.

  • parametersCapacityInput is a uint32_t describing the capacity of the parameters array, or 0 to indicate a request to retrieve the required capacity.

  • parametersCountOutput is a uint32_t describing the number of parameters, or the required capacity in the case that parametersCapacityInput is insufficient.

  • parameters is a pointer to an application-allocated array of float that will be filled with weights of facial expression blend shapes.

  • faceTrackingState is the XrFaceTrackingStateANDROID of validity status of face tracking.

  • sampleTime is an XrTime time at which the returned expressions are tracked or extrapolated to. It equals the time at which the expression weights were requested if the extrapolation at the time was successful.

  • isValid indicates if the data is valid even if it is not from the current frame.

  • regionConfidencesCapacityInput is a uint32_t describing the capacity of the regionConfidences array, or 0 to indicate a request to retrieve the required capacity.

  • regionConfidencesCountOutput is a uint32_t describing the number of regionConfidences, or the required capacity in the case that regionConfidencesCapacityInput is insufficient.

  • regionConfidences is a pointer to an application-allocated array of XrFaceConfidenceRegionsANDROID that will be filled with confidences of facial expression regions.

  • See the https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-buffer-size-parameters section for a detailed description of retrieving the required parameters size.

Description

The application can set parametersCapacityInput to XR_FACE_PARAMETER_COUNT_ANDROID to get facial expressions which are indexed by XrFaceParameterIndicesANDROID.

The runtime must return parameters representing the weights of blend shapes of current facial expressions.

The runtime must update the parameters array ordered so that the application can index elements using the corresponding facial expression enum (e.g. XrFaceParameterIndicesANDROID).

Valid Usage (Implicit)
  • The XR_ANDROID_face_tracking extension must be enabled prior to using XrFaceStateANDROID

  • type must be XR_TYPE_FACE_STATE_ANDROID

  • next must be NULL or a valid pointer to the next structure in a structure chain

  • If parametersCapacityInput is not 0, parameters must be a pointer to an array of parametersCapacityInput float values

  • faceTrackingState must be a valid XrFaceTrackingStateANDROID value

  • If regionConfidencesCapacityInput is not 0, regionConfidences must be a pointer to an array of regionConfidencesCapacityInput float values

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.