C Specification
The XrFacialExpressionsHTC structure is defined as:
// Provided by XR_HTC_facial_tracking
typedef struct XrFacialExpressionsHTC {
    XrStructureType    type;
    const void*        next;
    XrBool32           isActive;
    XrTime             sampleTime;
    uint32_t           expressionCount;
    float*             expressionWeightings;
} XrFacialExpressionsHTC;Members
Description
XrFacialExpressionsHTC structure returns data of a lip facial expression or an eye facial expression.
An application must preallocate the output expressionWeightings array
that can contain at least expressionCount of float.
expressionCount must be at least
XR_FACIAL_EXPRESSION_LIP_COUNT_HTC for
XR_FACIAL_TRACKING_TYPE_LIP_DEFAULT_HTC, and at least
XR_FACIAL_EXPRESSION_EYE_COUNT_HTC for
XR_FACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC.
The application must set expressionCount as described by the
XrFacialTrackingTypeHTC when creating the XrFacialTrackerHTC
otherwise the runtime must return XR_ERROR_VALIDATION_FAILURE.
The runtime must update the expressionWeightings array ordered so
that the application can index elements using the corresponding facial
tracker enum (e.g. XrEyeExpressionHTC or XrLipExpressionHTC) as
described by XrFacialTrackingTypeHTC when creating the
XrFacialTrackerHTC.
For example, when the XrFacialTrackerHTC is created with
XrFacialTrackerHTC::facialTrackingType set to
XR_FACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC, the application must set the
expressionCount to XR_FACIAL_EXPRESSION_EYE_COUNT_HTC, and the
runtime must fill the expressionWeightings array ordered with eye
expression data so that it can be indexed by the XrEyeExpressionHTC
enum.
If the returned isActive is true, the runtime must fill the
expressionWeightings array ordered.
If the returned isActive is false, it indicates the facial tracker did
not detect the corresponding facial input or the application lost input
focus.
If the input expressionCount is not sufficient to contain all output
indices, the runtime must return XR_ERROR_SIZE_INSUFFICIENT on calls
to xrGetFacialExpressionsHTC and not change the content in
expressionWeightings.
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-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.