Class XrBodyJointLocationsFB
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
The runtime must return ERROR_VALIDATION_FAILURE if jointCount does not equal to the number of joints defined by the XrBodyJointSetFB used to create the XrBodyTrackerFB.
The runtime must return jointLocations representing the range of human body motion, without any obstructions. Input systems that either obstruct the movement of the user’s body (for example, a held controller preventing the user from making a fist) or input systems that have only limited ability to track finger positions must use the information available to them to emulate an unobstructed range of motion.
The runtime must update the jointLocations array ordered so that it is indexed using the corresponding body joint enum (e.g. XrBodyJointFB) as described by XrBodyJointSetFB when creating the XrBodyTrackerFB. For example, when the XrBodyTrackerFB is created with BODY_JOINT_SET_DEFAULT_FB, the application must set the jointCount to BODY_JOINT_COUNT_FB, and the runtime must fill the jointLocations array ordered so that it is indexed by the XrBodyJointFB enum.
If the returned isActive is true, the runtime must return all joint locations with both SPACE_LOCATION_POSITION_VALID_BIT and SPACE_LOCATION_ORIENTATION_VALID_BIT set. However, in this case, some joint space locations may be untracked (i.e. SPACE_LOCATION_POSITION_TRACKED_BIT or SPACE_LOCATION_ORIENTATION_TRACKED_BIT is unset).
If the returned isActive is false, it indicates that the body tracker did not detect the body input, the application lost input focus, or the consent for body tracking was denied by the user. In this case, the runtime must return all jointLocations with neither SPACE_LOCATION_POSITION_VALID_BIT nor SPACE_LOCATION_ORIENTATION_VALID_BIT set.
Valid Usage (Implicit)
- The
XR_FB_body_trackingextension must be enabled prior to usingXrBodyJointLocationsFB typemust beTYPE_BODY_JOINT_LOCATIONS_FBnextmust beNULLor a valid pointer to the next structure in a structure chainjointLocationsmust be a pointer to an array ofjointCountXrBodyJointLocationFBstructures- The
jointCountparameter must be greater than 0
See Also
XrBodyJointLocationFB, LocateBodyJointsFB
Layout
struct XrBodyJointLocationsFB {
XrStructureType type();
void * next();
XrBool32 isActive();
float confidence();
uint32_t jointCount();
XrBodyJointLocationFB * jointLocations();
uint32_t skeletonChangedCount();
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 size in bytes.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
ConstructorsConstructorDescriptionXrBodyJointLocationsFB(ByteBuffer container) Creates aXrBodyJointLocationsFBinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic XrBodyJointLocationsFBcalloc()Returns a newXrBodyJointLocationsFBinstance allocated withmemCalloc.calloc(int capacity) Returns a newXrBodyJointLocationsFB.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrBodyJointLocationsFB.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrBodyJointLocationsFBcalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrBodyJointLocationsFBinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.floatafloatbetween 0 and 1 which represents the confidence for the returned body pose.confidence(float value) Sets the specified value to theconfidence()field.static XrBodyJointLocationsFBcreate()Returns a newXrBodyJointLocationsFBinstance allocated withBufferUtils.create(int capacity) Returns a newXrBodyJointLocationsFB.Bufferinstance allocated withBufferUtils.static XrBodyJointLocationsFBcreate(long address) Returns a newXrBodyJointLocationsFBinstance for the specified memory address.create(long address, int capacity) Create aXrBodyJointLocationsFB.Bufferinstance at the specified memory.static @Nullable XrBodyJointLocationsFBcreateSafe(long address) static @Nullable XrBodyJointLocationsFB.BuffercreateSafe(long address, int capacity) booleanisActive()anXrBool32indicating if the body tracker is actively tracking.isActive(boolean value) Sets the specified value to theisActive()field.intauint32_tdescribing the count of elements injointLocationsarray.an application-allocated array ofXrBodyJointLocationFBthat will be filled with joint locations.Sets the address of the specifiedXrBodyJointLocationFB.Bufferto thejointLocations()field.static XrBodyJointLocationsFBmalloc()Returns a newXrBodyJointLocationsFBinstance allocated withmemAlloc.malloc(int capacity) Returns a newXrBodyJointLocationsFB.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrBodyJointLocationsFB.Bufferinstance allocated on the specifiedMemoryStack.static XrBodyJointLocationsFBmalloc(org.lwjgl.system.MemoryStack stack) Returns a newXrBodyJointLocationsFBinstance allocated on the specifiedMemoryStack.static floatnconfidence(long struct) Unsafe version ofconfidence().static voidnconfidence(long struct, float value) Unsafe version ofconfidence.longnext()NULLor a pointer to the next structure in a structure chain.next(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 intnjointCount(long struct) Unsafe version ofjointCount().static voidnjointCount(long struct, int value) Sets the specified value to thejointCountfield of the specifiedstruct.static XrBodyJointLocationFB.BuffernjointLocations(long struct) Unsafe version ofjointLocations().static voidnjointLocations(long struct, XrBodyJointLocationFB.Buffer value) Unsafe version ofjointLocations.static longnnext(long struct) Unsafe version ofnext().static voidnnext(long struct, long value) Unsafe version ofnext.static intnskeletonChangedCount(long struct) Unsafe version ofskeletonChangedCount().static voidnskeletonChangedCount(long struct, int value) Unsafe version ofskeletonChangedCount.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.set(int type, long next, boolean isActive, float confidence, XrBodyJointLocationFB.Buffer jointLocations, int skeletonChangedCount, long time) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()intan outputuint32_tincremental counter indicating that the skeleton scale proportions have changed.skeletonChangedCount(int value) Sets the specified value to theskeletonChangedCount()field.longtime()anXrTimetime at which the returned joints are tracked.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_BODY_JOINT_LOCATIONS_FBvalue to thetype()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.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. -
ISACTIVE
public static final int ISACTIVEThe struct member offsets. -
CONFIDENCE
public static final int CONFIDENCEThe struct member offsets. -
JOINTCOUNT
public static final int JOINTCOUNTThe struct member offsets. -
JOINTLOCATIONS
public static final int JOINTLOCATIONSThe struct member offsets. -
SKELETONCHANGEDCOUNT
public static final int SKELETONCHANGEDCOUNTThe struct member offsets. -
TIME
public static final int TIMEThe struct member offsets.
-
-
Constructor Details
-
XrBodyJointLocationsFB
Creates aXrBodyJointLocationsFBinstance 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<XrBodyJointLocationsFB>
-
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 body tracker is actively tracking. -
confidence
public float confidence()afloatbetween 0 and 1 which represents the confidence for the returned body pose. A value of 0 means there is no confidence in the pose returned, and a value of 1 means maximum confidence in the returned body pose. -
jointCount
public int jointCount()auint32_tdescribing the count of elements injointLocationsarray. -
jointLocations
an application-allocated array ofXrBodyJointLocationFBthat will be filled with joint locations. -
skeletonChangedCount
public int skeletonChangedCount()an outputuint32_tincremental counter indicating that the skeleton scale proportions have changed.GetBodySkeletonFBcan be called when this counter increases to get the latest body proportions/scale. -
time
public long time()anXrTimetime at which the returned joints are tracked. Equals the time at which the joints were requested if the interpolation at the time was successful. -
type
Sets the specified value to thetype()field. -
type$Default
Sets theTYPE_BODY_JOINT_LOCATIONS_FBvalue to thetype()field. -
next
Sets the specified value to thenext()field. -
isActive
Sets the specified value to theisActive()field. -
confidence
Sets the specified value to theconfidence()field. -
jointLocations
Sets the address of the specifiedXrBodyJointLocationFB.Bufferto thejointLocations()field. -
skeletonChangedCount
Sets the specified value to theskeletonChangedCount()field. -
time
Sets the specified value to thetime()field. -
set
public XrBodyJointLocationsFB set(int type, long next, boolean isActive, float confidence, XrBodyJointLocationFB.Buffer jointLocations, int skeletonChangedCount, 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 newXrBodyJointLocationsFBinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrBodyJointLocationsFBinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrBodyJointLocationsFBinstance allocated withBufferUtils. -
create
Returns a newXrBodyJointLocationsFBinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXrBodyJointLocationsFB.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrBodyJointLocationsFB.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrBodyJointLocationsFB.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrBodyJointLocationsFB.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newXrBodyJointLocationsFBinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrBodyJointLocationsFBinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrBodyJointLocationsFB.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrBodyJointLocationsFB.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static XrBodyJointLocationsFB.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrBodyJointLocationsFB.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(). -
nisActive
public static int nisActive(long struct) Unsafe version ofisActive(). -
nconfidence
public static float nconfidence(long struct) Unsafe version ofconfidence(). -
njointCount
public static int njointCount(long struct) Unsafe version ofjointCount(). -
njointLocations
Unsafe version ofjointLocations(). -
nskeletonChangedCount
public static int nskeletonChangedCount(long struct) Unsafe version ofskeletonChangedCount(). -
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. -
nisActive
public static void nisActive(long struct, int value) Unsafe version ofisActive. -
nconfidence
public static void nconfidence(long struct, float value) Unsafe version ofconfidence. -
njointCount
public static void njointCount(long struct, int value) Sets the specified value to thejointCountfield of the specifiedstruct. -
njointLocations
Unsafe version ofjointLocations. -
nskeletonChangedCount
public static void nskeletonChangedCount(long struct, int value) Unsafe version ofskeletonChangedCount. -
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
-