Class XrFaceExpressionWeights2FB
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
XrFaceExpressionWeights2FB structure returns the facial expression.
The runtime must return ERROR_VALIDATION_FAILURE if weightCount is not equal to the number of blend shapes defined by the XrFaceExpressionSet2FB used to create the XrFaceTracker2FB.
The runtime must return ERROR_VALIDATION_FAILURE if confidenceCount is not equal to the number of confidence areas defined by the XrFaceExpressionSet2FB used to create the XrFaceTracker2FB.
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. XrFaceExpression2FB) as described by XrFaceExpressionSet2FB when creating the XrFaceTracker2FB. For example, when the XrFaceTracker2FB is created with FACE_EXPRESSION_SET2_DEFAULT_FB, the application sets the weightCount to FACE_EXPRESSION2_COUNT_FB, and the runtime must fill the weights array ordered so that it can be indexed by the XrFaceExpression2FB enum.
The runtime must update the confidences array ordered so that the application can index elements using the corresponding confidence area enum (e.g. XrFaceConfidence2FB) as described by XrFaceExpressionSet2FB when creating the XrFaceTracker2FB. For example, when the XrFaceTracker2FB is created with FACE_EXPRESSION_SET2_DEFAULT_FB, the application sets the confidenceCount to FACE_CONFIDENCE2_COUNT_FB, and the runtime must fill the confidences array ordered so that it can be indexed by the XrFaceConfidence2FB enum.
The runtime must set isValid to FALSE and it must also set all elements of weights to zero, if one of the following is true:
- the face tracker failed to track or lost track of the face
- the application lost focus
- the consent for face tracking was denied
- the runtime is unable to estimate facial expression from the data sources specified when
CreateFaceTracker2FBfunction was called
If the returned isValid is TRUE, the runtime must return all weights (or all weights except eyes related weights, see isEyeFollowingBlendshapesValid).
The runtime must set isEyeFollowingBlendshapesValid to FALSE and it must also set 8 expression weights with prefix XR_FACE_EXPRESSION2_EYES_LOOK_* to zero, if one of the following is true:
- the eye tracking driving blendshapes with prefix
XR_FACE_EXPRESSION2_EYES_LOOK_*lost track - the consent for eye tracking was denied
Valid Usage (Implicit)
- The
XR_FB_face_tracking2extension must be enabled prior to usingXrFaceExpressionWeights2FB typemust beTYPE_FACE_EXPRESSION_WEIGHTS2_FBnextmust beNULLor a valid pointer to the next structure in a structure chainweightsmust be a pointer to an array ofweightCountfloatvaluesconfidencesmust be a pointer to an array ofconfidenceCountfloatvaluesdataSourcemust be a validXrFaceTrackingDataSource2FBvalue- The
weightCountparameter must be greater than 0 - The
confidenceCountparameter must be greater than 0
See Also
Layout
struct XrFaceExpressionWeights2FB {
XrStructureType type();
void * next();
uint32_t weightCount();
float * weights();
uint32_t confidenceCount();
float * confidences();
XrBool32 isValid();
XrBool32 isEyeFollowingBlendshapesValid();
XrFaceTrackingDataSource2FB dataSource();
XrTime time();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionXrFaceExpressionWeights2FB(ByteBuffer container) Creates aXrFaceExpressionWeights2FBinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic XrFaceExpressionWeights2FBcalloc()Returns a newXrFaceExpressionWeights2FBinstance allocated withmemCalloc.calloc(int capacity) Returns a newXrFaceExpressionWeights2FB.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeights2FB.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrFaceExpressionWeights2FBcalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeights2FBinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intauint32_tdescribing the count of elements inconfidencesarray.a pointer to an application-allocated array offloatthat will be filled with confidence of tracking specific parts of a face.confidences(FloatBuffer value) Sets the address of the specifiedFloatBufferto theconfidences()field.static XrFaceExpressionWeights2FBcreate()Returns a newXrFaceExpressionWeights2FBinstance allocated withBufferUtils.create(int capacity) Returns a newXrFaceExpressionWeights2FB.Bufferinstance allocated withBufferUtils.static XrFaceExpressionWeights2FBcreate(long address) Returns a newXrFaceExpressionWeights2FBinstance for the specified memory address.create(long address, int capacity) Create aXrFaceExpressionWeights2FB.Bufferinstance at the specified memory.static @Nullable XrFaceExpressionWeights2FBcreateSafe(long address) static @Nullable XrFaceExpressionWeights2FB.BuffercreateSafe(long address, int capacity) intanXrFaceTrackingDataSource2FBwhich indicates the data source that was used to estimate the facial expression.dataSource(int value) Sets the specified value to thedataSource()field.booleananXrBool32which indicates if the 8 expression weights with prefixXR_FACE_EXPRESSION2_EYES_LOOK_*are valid.isEyeFollowingBlendshapesValid(boolean value) Sets the specified value to theisEyeFollowingBlendshapesValid()field.booleanisValid()anXrBool32which indicates that the tracked expression weights are valid.isValid(boolean value) Sets the specified value to theisValid()field.static XrFaceExpressionWeights2FBmalloc()Returns a newXrFaceExpressionWeights2FBinstance allocated withmemAlloc.malloc(int capacity) Returns a newXrFaceExpressionWeights2FB.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeights2FB.Bufferinstance allocated on the specifiedMemoryStack.static XrFaceExpressionWeights2FBmalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeights2FBinstance allocated on the specifiedMemoryStack.static intnconfidenceCount(long struct) Unsafe version ofconfidenceCount().static voidnconfidenceCount(long struct, int value) Sets the specified value to theconfidenceCountfield of the specifiedstruct.static FloatBuffernconfidences(long struct) Unsafe version ofconfidences.static voidnconfidences(long struct, FloatBuffer value) Unsafe version ofconfidences.static intndataSource(long struct) Unsafe version ofdataSource().static voidndataSource(long struct, int value) Unsafe version ofdataSource.longnext()NULLor a pointer to the next structure in a structure chain.next(long value) Sets the specified value to thenext()field.static intnisEyeFollowingBlendshapesValid(long struct) Unsafe version ofisEyeFollowingBlendshapesValid().static voidnisEyeFollowingBlendshapesValid(long struct, int value) Unsafe version ofisEyeFollowingBlendshapesValid.static intnisValid(long struct) Unsafe version ofisValid().static voidnisValid(long struct, int value) Unsafe version ofisValid.static longnnext(long struct) Unsafe version ofnext().static voidnnext(long struct, long value) Unsafe version ofnext.static longntime(long struct) Unsafe version oftime().static voidntime(long struct, long value) Unsafe version oftime.static intntype(long struct) Unsafe version oftype().static voidntype(long struct, int value) Unsafe version oftype.static intnweightCount(long struct) Unsafe version ofweightCount().static voidnweightCount(long struct, int value) Sets the specified value to theweightCountfield of the specifiedstruct.static FloatBuffernweights(long struct) Unsafe version ofweights.static voidnweights(long struct, FloatBuffer value) Unsafe version ofweights.set(int type, long next, FloatBuffer weights, FloatBuffer confidences, boolean isValid, boolean isEyeFollowingBlendshapesValid, int dataSource, long time) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()longtime()anXrTimetime at which the returned expression weights are tracked or extrapolated to.time(long value) Sets the specified value to thetime()field.inttype()theXrStructureTypeof this structure.type(int value) Sets the specified value to thetype()field.Sets theTYPE_FACE_EXPRESSION_WEIGHTS2_FBvalue to thetype()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.intauint32_tdescribing the count of elements inweightsarray.weights()a pointer to an application-allocated array offloatthat will be filled with weights of facial expression blend shapes.weights(FloatBuffer value) Sets the address of the specifiedFloatBufferto theweights()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
TYPE
public static final int TYPEThe struct member offsets. -
NEXT
public static final int NEXTThe struct member offsets. -
WEIGHTCOUNT
public static final int WEIGHTCOUNTThe struct member offsets. -
WEIGHTS
public static final int WEIGHTSThe struct member offsets. -
CONFIDENCECOUNT
public static final int CONFIDENCECOUNTThe struct member offsets. -
CONFIDENCES
public static final int CONFIDENCESThe struct member offsets. -
ISVALID
public static final int ISVALIDThe struct member offsets. -
ISEYEFOLLOWINGBLENDSHAPESVALID
public static final int ISEYEFOLLOWINGBLENDSHAPESVALIDThe struct member offsets. -
DATASOURCE
public static final int DATASOURCEThe struct member offsets. -
TIME
public static final int TIMEThe struct member offsets.
-
-
Constructor Details
-
XrFaceExpressionWeights2FB
Creates aXrFaceExpressionWeights2FBinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct<XrFaceExpressionWeights2FB>
-
type
public int type()theXrStructureTypeof this structure. -
next
public long next()NULLor 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()auint32_tdescribing the count of elements inweightsarray. -
weights
a pointer to an application-allocated array offloatthat will be filled with weights of facial expression blend shapes. -
confidenceCount
public int confidenceCount()auint32_tdescribing the count of elements inconfidencesarray. -
confidences
a pointer to an application-allocated array offloatthat will be filled with confidence of tracking specific parts of a face. -
isValid
public boolean isValid()anXrBool32which indicates that the tracked expression weights are valid. -
isEyeFollowingBlendshapesValid
public boolean isEyeFollowingBlendshapesValid()anXrBool32which indicates if the 8 expression weights with prefixXR_FACE_EXPRESSION2_EYES_LOOK_*are valid. -
dataSource
public int dataSource()anXrFaceTrackingDataSource2FBwhich indicates the data source that was used to estimate the facial expression. -
time
public long time()anXrTimetime 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
Sets the specified value to thetype()field. -
type$Default
Sets theTYPE_FACE_EXPRESSION_WEIGHTS2_FBvalue to thetype()field. -
next
Sets the specified value to thenext()field. -
weights
Sets the address of the specifiedFloatBufferto theweights()field. -
confidences
Sets the address of the specifiedFloatBufferto theconfidences()field. -
isValid
Sets the specified value to theisValid()field. -
isEyeFollowingBlendshapesValid
Sets the specified value to theisEyeFollowingBlendshapesValid()field. -
dataSource
Sets the specified value to thedataSource()field. -
time
Sets the specified value to thetime()field. -
set
public XrFaceExpressionWeights2FB set(int type, long next, FloatBuffer weights, FloatBuffer confidences, boolean isValid, boolean isEyeFollowingBlendshapesValid, int dataSource, 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
Returns a newXrFaceExpressionWeights2FBinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrFaceExpressionWeights2FBinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrFaceExpressionWeights2FBinstance allocated withBufferUtils. -
create
Returns a newXrFaceExpressionWeights2FBinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXrFaceExpressionWeights2FB.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrFaceExpressionWeights2FB.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrFaceExpressionWeights2FB.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrFaceExpressionWeights2FB.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newXrFaceExpressionWeights2FBinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrFaceExpressionWeights2FBinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrFaceExpressionWeights2FB.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeights2FB.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static XrFaceExpressionWeights2FB.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeights2FB.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ntype
public static int ntype(long struct) Unsafe version oftype(). -
nnext
public static long nnext(long struct) Unsafe version ofnext(). -
nweightCount
public static int nweightCount(long struct) Unsafe version ofweightCount(). -
nweights
Unsafe version ofweights. -
nconfidenceCount
public static int nconfidenceCount(long struct) Unsafe version ofconfidenceCount(). -
nconfidences
Unsafe version ofconfidences. -
nisValid
public static int nisValid(long struct) Unsafe version ofisValid(). -
nisEyeFollowingBlendshapesValid
public static int nisEyeFollowingBlendshapesValid(long struct) Unsafe version ofisEyeFollowingBlendshapesValid(). -
ndataSource
public static int ndataSource(long struct) Unsafe version ofdataSource(). -
ntime
public static long ntime(long struct) Unsafe version oftime(). -
ntype
public static void ntype(long struct, int value) Unsafe version oftype. -
nnext
public static void nnext(long struct, long value) Unsafe version ofnext. -
nweightCount
public static void nweightCount(long struct, int value) Sets the specified value to theweightCountfield of the specifiedstruct. -
nweights
Unsafe version ofweights. -
nconfidenceCount
public static void nconfidenceCount(long struct, int value) Sets the specified value to theconfidenceCountfield of the specifiedstruct. -
nconfidences
Unsafe version ofconfidences. -
nisValid
public static void nisValid(long struct, int value) Unsafe version ofisValid. -
nisEyeFollowingBlendshapesValid
public static void nisEyeFollowingBlendshapesValid(long struct, int value) Unsafe version ofisEyeFollowingBlendshapesValid. -
ndataSource
public static void ndataSource(long struct, int value) Unsafe version ofdataSource. -
ntime
public static void ntime(long struct, long value) Unsafe version oftime. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-