Class XrFaceExpressionWeightsFB
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
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)
- The
XR_FB_face_trackingextension must be enabled prior to usingXrFaceExpressionWeightsFB typemust beTYPE_FACE_EXPRESSION_WEIGHTS_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 ofconfidenceCountfloatvaluesstatusmust be a validXrFaceExpressionStatusFBstructure- The
weightCountparameter must be greater than 0 - The
confidenceCountparameter must be greater than 0
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();
}-
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 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.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
ConstructorsConstructorDescriptionXrFaceExpressionWeightsFB(ByteBuffer container) Creates aXrFaceExpressionWeightsFBinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic XrFaceExpressionWeightsFBcalloc()Returns a newXrFaceExpressionWeightsFBinstance allocated withmemCalloc.calloc(int capacity) Returns a newXrFaceExpressionWeightsFB.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeightsFB.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrFaceExpressionWeightsFBcalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeightsFBinstance 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 XrFaceExpressionWeightsFBcreate()Returns a newXrFaceExpressionWeightsFBinstance allocated withBufferUtils.create(int capacity) Returns a newXrFaceExpressionWeightsFB.Bufferinstance allocated withBufferUtils.static XrFaceExpressionWeightsFBcreate(long address) Returns a newXrFaceExpressionWeightsFBinstance for the specified memory address.create(long address, int capacity) Create aXrFaceExpressionWeightsFB.Bufferinstance at the specified memory.static @Nullable XrFaceExpressionWeightsFBcreateSafe(long address) static @Nullable XrFaceExpressionWeightsFB.BuffercreateSafe(long address, int capacity) static XrFaceExpressionWeightsFBmalloc()Returns a newXrFaceExpressionWeightsFBinstance allocated withmemAlloc.malloc(int capacity) Returns a newXrFaceExpressionWeightsFB.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeightsFB.Bufferinstance allocated on the specifiedMemoryStack.static XrFaceExpressionWeightsFBmalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeightsFBinstance 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.longnext()NULLor a pointer to the next structure in a structure chain.next(long value) Sets the specified value to thenext()field.static longnnext(long struct) Unsafe version ofnext().static voidnnext(long struct, long value) Unsafe version ofnext.static XrFaceExpressionStatusFBnstatus(long struct) Unsafe version ofstatus().static voidnstatus(long struct, XrFaceExpressionStatusFB value) Unsafe version ofstatus.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, XrFaceExpressionStatusFB status, long time) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()status()theXrFaceExpressionStatusFBof validity status of the expression weights.status(Consumer<XrFaceExpressionStatusFB> consumer) status(XrFaceExpressionStatusFB value) Copies the specifiedXrFaceExpressionStatusFBto thestatus()field.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_WEIGHTS_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. -
STATUS
public static final int STATUSThe struct member offsets. -
TIME
public static final int TIMEThe struct member offsets.
-
-
Constructor Details
-
XrFaceExpressionWeightsFB
Creates aXrFaceExpressionWeightsFBinstance 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<XrFaceExpressionWeightsFB>
-
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. -
status
theXrFaceExpressionStatusFBof validity status of the expression weights. -
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_WEIGHTS_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. -
status
Copies the specifiedXrFaceExpressionStatusFBto thestatus()field. -
status
-
time
Sets the specified value to thetime()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
Returns a newXrFaceExpressionWeightsFBinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrFaceExpressionWeightsFBinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrFaceExpressionWeightsFBinstance allocated withBufferUtils. -
create
Returns a newXrFaceExpressionWeightsFBinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXrFaceExpressionWeightsFB.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrFaceExpressionWeightsFB.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrFaceExpressionWeightsFB.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrFaceExpressionWeightsFB.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newXrFaceExpressionWeightsFBinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrFaceExpressionWeightsFBinstance allocated on the specifiedMemoryStackand 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 newXrFaceExpressionWeightsFB.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static XrFaceExpressionWeightsFB.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrFaceExpressionWeightsFB.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. -
nstatus
Unsafe version ofstatus(). -
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. -
nstatus
Unsafe version ofstatus. -
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
-