Class XrFacialExpressionsHTC

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

public class XrFacialExpressionsHTC extends org.lwjgl.system.Struct<XrFacialExpressionsHTC> implements org.lwjgl.system.NativeResource
Returns the expression data.
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 FACIAL_EXPRESSION_LIP_COUNT_HTC for FACIAL_TRACKING_TYPE_LIP_DEFAULT_HTC, and at least FACIAL_EXPRESSION_EYE_COUNT_HTC for 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 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 FACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC, the application must set the expressionCount to 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 ERROR_SIZE_INSUFFICIENT on calls to GetFacialExpressionsHTC and not change the content in expressionWeightings.

Valid Usage (Implicit)
See Also

GetFacialExpressionsHTC

Layout


 struct XrFacialExpressionsHTC {
     XrStructureType type();
     void const * next();
     XrBool32 isActive();
     XrTime sampleTime();
     uint32_t expressionCount();
     float * expressionWeightings(int);
 }
  • 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.
    • ISACTIVE

      public static final int ISACTIVE
      The struct member offsets.
    • SAMPLETIME

      public static final int SAMPLETIME
      The struct member offsets.
    • EXPRESSIONCOUNT

      public static final int EXPRESSIONCOUNT
      The struct member offsets.
    • EXPRESSIONWEIGHTINGS

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

    • XrFacialExpressionsHTC

      public XrFacialExpressionsHTC(ByteBuffer container)
      Creates a XrFacialExpressionsHTC 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<XrFacialExpressionsHTC>
    • 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.
    • isActive

      public boolean isActive()
      an XrBool32 indicating if the facial tracker is active.
    • sampleTime

      public long sampleTime()
      when in time the expression is expressed.
    • expressionCount

      public int expressionCount()
      a uint32_t describing the count of elements in expressionWeightings array.
    • expressionWeightings

      public FloatBuffer expressionWeightings(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      a float array filled in by the runtime, specifying the weightings for each blend shape.
    • type

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

      public XrFacialExpressionsHTC type$Default()
      Sets the TYPE_FACIAL_EXPRESSIONS_HTC value to the type() field.
    • next

      public XrFacialExpressionsHTC next(long value)
      Sets the specified value to the next() field.
    • isActive

      public XrFacialExpressionsHTC isActive(boolean value)
      Sets the specified value to the isActive() field.
    • sampleTime

      public XrFacialExpressionsHTC sampleTime(long value)
      Sets the specified value to the sampleTime() field.
    • expressionCount

      public XrFacialExpressionsHTC expressionCount(int value)
      Sets the specified value to the expressionCount() field.
    • expressionWeightings

      public XrFacialExpressionsHTC expressionWeightings(FloatBuffer value)
      Sets the address of the specified FloatBuffer to the expressionWeightings(int) field.
    • set

      public XrFacialExpressionsHTC set(int type, long next, boolean isActive, long sampleTime, int expressionCount, FloatBuffer expressionWeightings)
      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 XrFacialExpressionsHTC malloc()
      Returns a new XrFacialExpressionsHTC instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrFacialExpressionsHTC.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrFacialExpressionsHTC.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().
    • nisActive

      public static int nisActive(long struct)
      Unsafe version of isActive().
    • nsampleTime

      public static long nsampleTime(long struct)
      Unsafe version of sampleTime().
    • nexpressionCount

      public static int nexpressionCount(long struct)
      Unsafe version of expressionCount().
    • nexpressionWeightings

      public static FloatBuffer nexpressionWeightings(long struct, int capacity)
      Unsafe version of expressionWeightings.
    • 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.
    • nisActive

      public static void nisActive(long struct, int value)
      Unsafe version of isActive.
    • nsampleTime

      public static void nsampleTime(long struct, long value)
      Unsafe version of sampleTime.
    • nexpressionCount

      public static void nexpressionCount(long struct, int value)
      Unsafe version of expressionCount.
    • nexpressionWeightings

      public static void nexpressionWeightings(long struct, FloatBuffer value)
      Unsafe version of expressionWeightings.
    • validate

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