C Specification

The XrFacialExpressionsHTC structure is defined as:

typedef struct XrFacialExpressionsHTC {
    XrStructureType    type;
    const void*        next;
    XrBool32           isActive;
    XrTime             sampleTime;
    uint32_t           expressionCount;
    float*             expressionWeightings;
} XrFacialExpressionsHTC;

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.

  • isActive is an XrBool32 indicating if the facial tracker is active.

  • sampleTime is when in time the expression is expressed.

  • expressionCount is a uint32_t describing the count of elements in expressionWeightings array.

  • expressionWeightings is a float array filled in by the runtime, specifying the weightings for each blend shape.

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 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.

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 (c) 2014-2021, The Khronos Group Inc.