Class XrFacialExpressionsHTC
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrFacialExpressionsHTC
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrFacialExpressionsHTC extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceReturns the expression data.Description
XrFacialExpressionsHTCstructure returns data of a lip facial expression or an eye facial expression.An application must preallocate the output
expressionWeightingsarray that can contain at leastexpressionCountoffloat.expressionCountmust be at leastFACIAL_EXPRESSION_LIP_COUNT_HTCforFACIAL_TRACKING_TYPE_LIP_DEFAULT_HTC, and at leastFACIAL_EXPRESSION_EYE_COUNT_HTCforFACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC.The application must set
expressionCountas described by theXrFacialTrackingTypeHTCwhen creating theXrFacialTrackerHTCotherwise the runtime must returnERROR_VALIDATION_FAILURE.The runtime must update the
expressionWeightingsarray ordered so that the application can index elements using the corresponding facial tracker enum (e.g.XrEyeExpressionHTCorXrLipExpressionHTC) as described byXrFacialTrackingTypeHTCwhen creating theXrFacialTrackerHTC. For example, when theXrFacialTrackerHTCis created withfacialTrackingTypeset toFACIAL_TRACKING_TYPE_EYE_DEFAULT_HTC, the application must set theexpressionCounttoFACIAL_EXPRESSION_EYE_COUNT_HTC, and the runtime must fill theexpressionWeightingsarray ordered with eye expression data so that it can be indexed by theXrEyeExpressionHTCenum.If the returned
isActiveis true, the runtime must fill theexpressionWeightingsarray ordered.If the returned
isActiveis false, it indicates the facial tracker did not detect the corresponding facial input or the application lost input focus.If the input
expressionCountis not sufficient to contain all output indices, the runtime must returnERROR_SIZE_INSUFFICIENTon calls toGetFacialExpressionsHTCand not change the content inexpressionWeightings.Valid Usage (Implicit)
- The
XR_HTC_facial_trackingextension must be enabled prior to usingXrFacialExpressionsHTC typemust beTYPE_FACIAL_EXPRESSIONS_HTCnextmust beNULLor a valid pointer to the next structure in a structure chainexpressionWeightingsmust be a pointer to afloatvalue
See Also
Layout
struct XrFacialExpressionsHTC { XrStructureTypetype(); void const *next(); XrBool32isActive(); XrTimesampleTime(); uint32_texpressionCount(); float *expressionWeightings(int); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrFacialExpressionsHTC.BufferAn array ofXrFacialExpressionsHTCstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intEXPRESSIONCOUNT
EXPRESSIONWEIGHTINGS
ISACTIVE
NEXT
SAMPLETIMEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description XrFacialExpressionsHTC(java.nio.ByteBuffer container)Creates aXrFacialExpressionsHTCinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrFacialExpressionsHTCcalloc()Returns a newXrFacialExpressionsHTCinstance allocated withmemCalloc.static XrFacialExpressionsHTC.Buffercalloc(int capacity)Returns a newXrFacialExpressionsHTC.Bufferinstance allocated withmemCalloc.static XrFacialExpressionsHTC.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrFacialExpressionsHTC.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrFacialExpressionsHTCcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrFacialExpressionsHTCinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrFacialExpressionsHTCcreate()Returns a newXrFacialExpressionsHTCinstance allocated withBufferUtils.static XrFacialExpressionsHTC.Buffercreate(int capacity)Returns a newXrFacialExpressionsHTC.Bufferinstance allocated withBufferUtils.static XrFacialExpressionsHTCcreate(long address)Returns a newXrFacialExpressionsHTCinstance for the specified memory address.static XrFacialExpressionsHTC.Buffercreate(long address, int capacity)Create aXrFacialExpressionsHTC.Bufferinstance at the specified memory.static XrFacialExpressionsHTCcreateSafe(long address)static XrFacialExpressionsHTC.BuffercreateSafe(long address, int capacity)intexpressionCount()auint32_tdescribing the count of elements inexpressionWeightingsarray.XrFacialExpressionsHTCexpressionCount(int value)Sets the specified value to theexpressionCount()field.java.nio.FloatBufferexpressionWeightings(int capacity)XrFacialExpressionsHTCexpressionWeightings(java.nio.FloatBuffer value)Sets the address of the specifiedFloatBufferto theexpressionWeightings(int)field.booleanisActive()anXrBool32indicating if the facial tracker is active.XrFacialExpressionsHTCisActive(boolean value)Sets the specified value to theisActive()field.static XrFacialExpressionsHTCmalloc()Returns a newXrFacialExpressionsHTCinstance allocated withmemAlloc.static XrFacialExpressionsHTC.Buffermalloc(int capacity)Returns a newXrFacialExpressionsHTC.Bufferinstance allocated withmemAlloc.static XrFacialExpressionsHTC.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrFacialExpressionsHTC.Bufferinstance allocated on the specifiedMemoryStack.static XrFacialExpressionsHTCmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrFacialExpressionsHTCinstance allocated on the specifiedMemoryStack.static intnexpressionCount(long struct)Unsafe version ofexpressionCount().static voidnexpressionCount(long struct, int value)Unsafe version ofexpressionCount.static java.nio.FloatBuffernexpressionWeightings(long struct, int capacity)Unsafe version ofexpressionWeightings.static voidnexpressionWeightings(long struct, java.nio.FloatBuffer value)Unsafe version ofexpressionWeightings.longnext()NULLor a pointer to the next structure in a structure chain.XrFacialExpressionsHTCnext(long value)Sets the specified value to thenext()field.static intnisActive(long struct)Unsafe version ofisActive().static voidnisActive(long struct, int value)Unsafe version ofisActive.static longnnext(long struct)Unsafe version ofnext().static voidnnext(long struct, long value)Unsafe version ofnext.static longnsampleTime(long struct)Unsafe version ofsampleTime().static voidnsampleTime(long struct, long value)Unsafe version ofsampleTime.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.longsampleTime()when in time the expression is expressed.XrFacialExpressionsHTCsampleTime(long value)Sets the specified value to thesampleTime()field.XrFacialExpressionsHTCset(int type, long next, boolean isActive, long sampleTime, int expressionCount, java.nio.FloatBuffer expressionWeightings)Initializes this struct with the specified values.XrFacialExpressionsHTCset(XrFacialExpressionsHTC src)Copies the specified struct data to this struct.intsizeof()inttype()theXrStructureTypeof this structure.XrFacialExpressionsHTCtype(int value)Sets the specified value to thetype()field.XrFacialExpressionsHTCtype$Default()Sets theTYPE_FACIAL_EXPRESSIONS_HTCvalue to thetype()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
XrFacialExpressionsHTC
public XrFacialExpressionsHTC(java.nio.ByteBuffer container)
Creates aXrFacialExpressionsHTCinstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
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.
-
isActive
public boolean isActive()
anXrBool32indicating if the facial tracker is active.
-
sampleTime
public long sampleTime()
when in time the expression is expressed.
-
expressionCount
public int expressionCount()
auint32_tdescribing the count of elements inexpressionWeightingsarray.
-
expressionWeightings
public java.nio.FloatBuffer expressionWeightings(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
floatarray filled in by the runtime, specifying the weightings for each blend shape.
-
type
public XrFacialExpressionsHTC type(int value)
Sets the specified value to thetype()field.
-
type$Default
public XrFacialExpressionsHTC type$Default()
Sets theTYPE_FACIAL_EXPRESSIONS_HTCvalue to thetype()field.
-
next
public XrFacialExpressionsHTC next(long value)
Sets the specified value to thenext()field.
-
isActive
public XrFacialExpressionsHTC isActive(boolean value)
Sets the specified value to theisActive()field.
-
sampleTime
public XrFacialExpressionsHTC sampleTime(long value)
Sets the specified value to thesampleTime()field.
-
expressionCount
public XrFacialExpressionsHTC expressionCount(int value)
Sets the specified value to theexpressionCount()field.
-
expressionWeightings
public XrFacialExpressionsHTC expressionWeightings(java.nio.FloatBuffer value)
Sets the address of the specifiedFloatBufferto theexpressionWeightings(int)field.
-
set
public XrFacialExpressionsHTC set(int type, long next, boolean isActive, long sampleTime, int expressionCount, java.nio.FloatBuffer expressionWeightings)
Initializes this struct with the specified values.
-
set
public XrFacialExpressionsHTC set(XrFacialExpressionsHTC src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrFacialExpressionsHTC malloc()
Returns a newXrFacialExpressionsHTCinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrFacialExpressionsHTC calloc()
Returns a newXrFacialExpressionsHTCinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrFacialExpressionsHTC create()
Returns a newXrFacialExpressionsHTCinstance allocated withBufferUtils.
-
create
public static XrFacialExpressionsHTC create(long address)
Returns a newXrFacialExpressionsHTCinstance for the specified memory address.
-
createSafe
@Nullable public static XrFacialExpressionsHTC createSafe(long address)
-
malloc
public static XrFacialExpressionsHTC.Buffer malloc(int capacity)
Returns a newXrFacialExpressionsHTC.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrFacialExpressionsHTC.Buffer calloc(int capacity)
Returns a newXrFacialExpressionsHTC.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrFacialExpressionsHTC.Buffer create(int capacity)
Returns a newXrFacialExpressionsHTC.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrFacialExpressionsHTC.Buffer create(long address, int capacity)
Create aXrFacialExpressionsHTC.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrFacialExpressionsHTC.Buffer createSafe(long address, int capacity)
-
malloc
public static XrFacialExpressionsHTC malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrFacialExpressionsHTCinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrFacialExpressionsHTC calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrFacialExpressionsHTCinstance allocated on the specifiedMemoryStackand 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 newXrFacialExpressionsHTC.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrFacialExpressionsHTC.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrFacialExpressionsHTC.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
nnext
public static long nnext(long struct)
Unsafe version ofnext().
-
nisActive
public static int nisActive(long struct)
Unsafe version ofisActive().
-
nsampleTime
public static long nsampleTime(long struct)
Unsafe version ofsampleTime().
-
nexpressionCount
public static int nexpressionCount(long struct)
Unsafe version ofexpressionCount().
-
nexpressionWeightings
public static java.nio.FloatBuffer nexpressionWeightings(long struct, int capacity)Unsafe version ofexpressionWeightings.
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nnext
public static void nnext(long struct, long value)Unsafe version ofnext.
-
nisActive
public static void nisActive(long struct, int value)Unsafe version ofisActive.
-
nsampleTime
public static void nsampleTime(long struct, long value)Unsafe version ofsampleTime.
-
nexpressionCount
public static void nexpressionCount(long struct, int value)Unsafe version ofexpressionCount.
-
nexpressionWeightings
public static void nexpressionWeightings(long struct, java.nio.FloatBuffer value)Unsafe version ofexpressionWeightings.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-