C Specification

XrFaceExpressionWeightsFB structure returns the facial expression.

// Provided by XR_FB_face_tracking
typedef struct XrFaceExpressionWeightsFB {
    XrStructureType             type;
    void*                       next;
    uint32_t                    weightCount;
    float*                      weights;
    uint32_t                    confidenceCount;
    float*                      confidences;
    XrFaceExpressionStatusFB    status;
    XrTime                      time;
} XrFaceExpressionWeightsFB;

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.

  • weightCount is a uint32_t describing the count of elements in weights array.

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

  • confidenceCount is a uint32_t describing the count of elements in confidences array.

  • confidences is a pointer to an application-allocated array of float that will be filled with confidence of tracking specific parts of a face.

  • status is the XrFaceExpressionStatusFB of validity status of the expression weights.

  • time is an XrTime time at which the returned expression weights are tracked or extrapolated to. Equals the time at which the expression weights were requested if the extrapolating at the time was successful.

Description

The runtime must return XR_ERROR_VALIDATION_FAILURE if weightCount is not equal to the number of blend shapes defined by the XrFaceExpressionSetFB used to create the XrFaceTrackerFB.

The runtime must return XR_ERROR_VALIDATION_FAILURE if confidenceCount is not equal to the number of confidence areas defined by the XrFaceExpressionSetFB used to create the XrFaceTrackerFB.

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

The runtime must update the weights array ordered so that the application can index elements using the corresponding facial expression enum (e.g. XrFaceExpressionFB) as described by XrFaceExpressionSetFB when creating the XrFaceTrackerFB. For example, when the XrFaceTrackerFB is created with XR_FACE_EXPRESSION_SET_DEFAULT_FB, the application sets the weightCount to XR_FACE_EXPRESSION_COUNT_FB, and the runtime must fill the weights array ordered so that it can be indexed by the XrFaceExpressionFB enum.

The runtime must update the confidences array ordered so that the application can index elements using the corresponding confidence area enum (e.g. XrFaceConfidenceFB) as described by XrFaceExpressionSetFB when creating the XrFaceTrackerFB. For example, when the XrFaceTrackerFB is created with XR_FACE_EXPRESSION_SET_DEFAULT_FB, the application sets the confidenceCount to XR_FACE_CONFIDENCE_COUNT_FB, and the runtime must fill the confidences array ordered so that it can be indexed by the XrFaceConfidenceFB enum.

Valid Usage (Implicit)
  • The XR_FB_face_tracking extension must be enabled prior to using XrFaceExpressionWeightsFB

  • type must be XR_TYPE_FACE_EXPRESSION_WEIGHTS_FB

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

  • weights must be a pointer to an array of weightCount float values

  • confidences must be a pointer to an array of confidenceCount float values

  • status must be a valid XrFaceExpressionStatusFB structure

  • The weightCount parameter must be greater than 0

  • The confidenceCount parameter must be greater than 0

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-2024, The Khronos Group Inc.