Class XrFaceExpressionWeightsFB

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrFaceExpressionWeightsFB>
org.lwjgl.openxr.XrFaceExpressionWeightsFB
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrFaceExpressionWeightsFB extends org.lwjgl.system.Struct<XrFaceExpressionWeightsFB> implements org.lwjgl.system.NativeResource
Returns the facial expression.
Description

The runtime must return 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 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 FACE_EXPRESSION_SET_DEFAULT_FB, the application sets the weightCount to 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 FACE_EXPRESSION_SET_DEFAULT_FB, the application sets the confidenceCount to 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)
See Also

XrFaceExpressionStatusFB, GetFaceExpressionWeightsFB

Layout


 struct XrFaceExpressionWeightsFB {
     XrStructureType type();
     void * next();
     uint32_t weightCount();
     float * weights();
     uint32_t confidenceCount();
     float * confidences();
     XrFaceExpressionStatusFB status();
     XrTime time();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • WEIGHTCOUNT

      public static final int WEIGHTCOUNT
      The struct member offsets.
    • WEIGHTS

      public static final int WEIGHTS
      The struct member offsets.
    • CONFIDENCECOUNT

      public static final int CONFIDENCECOUNT
      The struct member offsets.
    • CONFIDENCES

      public static final int CONFIDENCES
      The struct member offsets.
    • STATUS

      public static final int STATUS
      The struct member offsets.
    • TIME

      public static final int TIME
      The struct member offsets.
  • Constructor Details

    • XrFaceExpressionWeightsFB

      public XrFaceExpressionWeightsFB(ByteBuffer container)
      Creates a XrFaceExpressionWeightsFB instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<XrFaceExpressionWeightsFB>
    • type

      public int type()
      the XrStructureType of this structure.
    • next

      public long next()
      NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.
    • weightCount

      public int weightCount()
      a uint32_t describing the count of elements in weights array.
    • weights

      public FloatBuffer weights()
      a pointer to an application-allocated array of float that will be filled with weights of facial expression blend shapes.
    • confidenceCount

      public int confidenceCount()
      a uint32_t describing the count of elements in confidences array.
    • confidences

      public FloatBuffer confidences()
      a pointer to an application-allocated array of float that will be filled with confidence of tracking specific parts of a face.
    • status

      public XrFaceExpressionStatusFB status()
      the XrFaceExpressionStatusFB of validity status of the expression weights.
    • time

      public long time()
      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.
    • type

      public XrFaceExpressionWeightsFB type(int value)
      Sets the specified value to the type() field.
    • type$Default

      public XrFaceExpressionWeightsFB type$Default()
      Sets the TYPE_FACE_EXPRESSION_WEIGHTS_FB value to the type() field.
    • next

      public XrFaceExpressionWeightsFB next(long value)
      Sets the specified value to the next() field.
    • weights

      public XrFaceExpressionWeightsFB weights(FloatBuffer value)
      Sets the address of the specified FloatBuffer to the weights() field.
    • confidences

      public XrFaceExpressionWeightsFB confidences(FloatBuffer value)
      Sets the address of the specified FloatBuffer to the confidences() field.
    • status

      Copies the specified XrFaceExpressionStatusFB to the status() field.
    • status

      Passes the status() field to the specified Consumer.
    • time

      public XrFaceExpressionWeightsFB time(long value)
      Sets the specified value to the time() field.
    • set

      public XrFaceExpressionWeightsFB set(int type, long next, FloatBuffer weights, FloatBuffer confidences, XrFaceExpressionStatusFB status, long time)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static XrFaceExpressionWeightsFB malloc()
      Returns a new XrFaceExpressionWeightsFB instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static XrFaceExpressionWeightsFB calloc()
      Returns a new XrFaceExpressionWeightsFB instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static XrFaceExpressionWeightsFB create()
      Returns a new XrFaceExpressionWeightsFB instance allocated with BufferUtils.
    • create

      public static XrFaceExpressionWeightsFB create(long address)
      Returns a new XrFaceExpressionWeightsFB instance for the specified memory address.
    • createSafe

      public static @Nullable XrFaceExpressionWeightsFB createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrFaceExpressionWeightsFB.Buffer malloc(int capacity)
      Returns a new XrFaceExpressionWeightsFB.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static XrFaceExpressionWeightsFB.Buffer calloc(int capacity)
      Returns a new XrFaceExpressionWeightsFB.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrFaceExpressionWeightsFB.Buffer create(int capacity)
      Returns a new XrFaceExpressionWeightsFB.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrFaceExpressionWeightsFB.Buffer create(long address, int capacity)
      Create a XrFaceExpressionWeightsFB.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable XrFaceExpressionWeightsFB.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrFaceExpressionWeightsFB malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XrFaceExpressionWeightsFB instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static XrFaceExpressionWeightsFB calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XrFaceExpressionWeightsFB instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static XrFaceExpressionWeightsFB.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrFaceExpressionWeightsFB.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static XrFaceExpressionWeightsFB.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrFaceExpressionWeightsFB.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nnext

      public static long nnext(long struct)
      Unsafe version of next().
    • nweightCount

      public static int nweightCount(long struct)
      Unsafe version of weightCount().
    • nweights

      public static FloatBuffer nweights(long struct)
      Unsafe version of weights.
    • nconfidenceCount

      public static int nconfidenceCount(long struct)
      Unsafe version of confidenceCount().
    • nconfidences

      public static FloatBuffer nconfidences(long struct)
      Unsafe version of confidences.
    • nstatus

      public static XrFaceExpressionStatusFB nstatus(long struct)
      Unsafe version of status().
    • ntime

      public static long ntime(long struct)
      Unsafe version of time().
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nnext

      public static void nnext(long struct, long value)
      Unsafe version of next.
    • nweightCount

      public static void nweightCount(long struct, int value)
      Sets the specified value to the weightCount field of the specified struct.
    • nweights

      public static void nweights(long struct, FloatBuffer value)
      Unsafe version of weights.
    • nconfidenceCount

      public static void nconfidenceCount(long struct, int value)
      Sets the specified value to the confidenceCount field of the specified struct.
    • nconfidences

      public static void nconfidences(long struct, FloatBuffer value)
      Unsafe version of confidences.
    • nstatus

      public static void nstatus(long struct, XrFaceExpressionStatusFB value)
      Unsafe version of status.
    • ntime

      public static void ntime(long struct, long value)
      Unsafe version of time.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate