Class XrHandJointVelocitiesEXT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrHandJointVelocitiesEXT
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrHandJointVelocitiesEXT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceReturns the hand joint velocities.Description
The application must allocate the memory for the output array
jointVelocitiesthat can contain at leastjointCountofXrHandJointVelocityEXT.The application must input
jointCountas described by theXrHandJointSetEXTwhen creating theXrHandTrackerEXT. Otherwise, the runtime must returnERROR_VALIDATION_FAILURE.The runtime must update the
jointVelocitiesarray in the order so that the application can index elements using the corresponding hand joint enum (e.g.XrHandJointEXT) as described by theXrHandJointSetEXTwhen creating theXrHandTrackerEXT. For example, when theXrHandTrackerEXTis created withHAND_JOINT_SET_DEFAULT_EXT, the application must set thejointCounttoHAND_JOINT_COUNT_EXT, and the returnedjointVelocitiesarray must be ordered to be indexed by enumXrHandJointEXTenum.If the returned
XrHandJointLocationsEXT::isActiveis false, it indicates the hand tracker did not detect a hand input or the application lost input focus. In this case, the runtime must return alljointVelocitieswith neitherSPACE_VELOCITY_LINEAR_VALID_BITnorSPACE_VELOCITY_ANGULAR_VALID_BITset.If an
XrHandJointVelocitiesEXTstructure is chained toXrHandJointLocationsEXT::next, the returnedXrHandJointLocationsEXT::isActiveis true, and the velocity is observed or can be calculated by the runtime, the runtime must fill in the linear velocity of each hand joint within the reference frame ofbaseSpaceand set theSPACE_VELOCITY_LINEAR_VALID_BIT. Similarly, if anXrHandJointVelocitiesEXTstructure is chained toXrHandJointLocationsEXT::next, the returnedXrHandJointLocationsEXT::isActiveis true, and the angular velocity is observed or can be calculated by the runtime, the runtime must fill in the angular velocity of each joint within the reference frame ofbaseSpaceand set theSPACE_VELOCITY_ANGULAR_VALID_BIT.Valid Usage (Implicit)
- The
XR_EXT_hand_trackingextension must be enabled prior to usingXrHandJointVelocitiesEXT typemust beTYPE_HAND_JOINT_VELOCITIES_EXTnextmust beNULLor a valid pointer to the next structure in a structure chainjointVelocitiesmust be a pointer to an array ofjointCountXrHandJointVelocityEXTstructures- The
jointCountparameter must be greater than 0
See Also
XrHandJointLocationsEXT,XrHandJointVelocityEXTLayout
struct XrHandJointVelocitiesEXT { XrStructureTypetype(); void *next(); uint32_tjointCount();XrHandJointVelocityEXT*jointVelocities(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrHandJointVelocitiesEXT.BufferAn array ofXrHandJointVelocitiesEXTstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intJOINTCOUNT
JOINTVELOCITIES
NEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description XrHandJointVelocitiesEXT(java.nio.ByteBuffer container)Creates aXrHandJointVelocitiesEXTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrHandJointVelocitiesEXTcalloc()Returns a newXrHandJointVelocitiesEXTinstance allocated withmemCalloc.static XrHandJointVelocitiesEXT.Buffercalloc(int capacity)Returns a newXrHandJointVelocitiesEXT.Bufferinstance allocated withmemCalloc.static XrHandJointVelocitiesEXT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrHandJointVelocitiesEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrHandJointVelocitiesEXTcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrHandJointVelocitiesEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrHandJointVelocitiesEXTcreate()Returns a newXrHandJointVelocitiesEXTinstance allocated withBufferUtils.static XrHandJointVelocitiesEXT.Buffercreate(int capacity)Returns a newXrHandJointVelocitiesEXT.Bufferinstance allocated withBufferUtils.static XrHandJointVelocitiesEXTcreate(long address)Returns a newXrHandJointVelocitiesEXTinstance for the specified memory address.static XrHandJointVelocitiesEXT.Buffercreate(long address, int capacity)Create aXrHandJointVelocitiesEXT.Bufferinstance at the specified memory.static XrHandJointVelocitiesEXTcreateSafe(long address)static XrHandJointVelocitiesEXT.BuffercreateSafe(long address, int capacity)intjointCount()auint32_tdescribing the number of elements injointVelocitiesarray.XrHandJointVelocityEXT.BufferjointVelocities()an array ofXrHandJointVelocityEXTreceiving the returned hand joint velocities.XrHandJointVelocitiesEXTjointVelocities(XrHandJointVelocityEXT.Buffer value)Sets the address of the specifiedXrHandJointVelocityEXT.Bufferto thejointVelocities()field.static XrHandJointVelocitiesEXTmalloc()Returns a newXrHandJointVelocitiesEXTinstance allocated withmemAlloc.static XrHandJointVelocitiesEXT.Buffermalloc(int capacity)Returns a newXrHandJointVelocitiesEXT.Bufferinstance allocated withmemAlloc.static XrHandJointVelocitiesEXT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrHandJointVelocitiesEXT.Bufferinstance allocated on the specifiedMemoryStack.static XrHandJointVelocitiesEXTmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrHandJointVelocitiesEXTinstance allocated on the specifiedMemoryStack.longnext()NULLor a pointer to the next structure in a structure chain.XrHandJointVelocitiesEXTnext(long value)Sets the specified value to thenext()field.static intnjointCount(long struct)Unsafe version ofjointCount().static voidnjointCount(long struct, int value)Sets the specified value to thejointCountfield of the specifiedstruct.static XrHandJointVelocityEXT.BuffernjointVelocities(long struct)Unsafe version ofjointVelocities().static voidnjointVelocities(long struct, XrHandJointVelocityEXT.Buffer value)Unsafe version ofjointVelocities.static longnnext(long struct)Unsafe version ofnext().static voidnnext(long struct, long value)Unsafe version ofnext.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.XrHandJointVelocitiesEXTset(int type, long next, XrHandJointVelocityEXT.Buffer jointVelocities)Initializes this struct with the specified values.XrHandJointVelocitiesEXTset(XrHandJointVelocitiesEXT src)Copies the specified struct data to this struct.intsizeof()inttype()theXrStructureTypeof this structure.XrHandJointVelocitiesEXTtype(int value)Sets the specified value to thetype()field.XrHandJointVelocitiesEXTtype$Default()Sets theTYPE_HAND_JOINT_VELOCITIES_EXTvalue to thetype()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
XrHandJointVelocitiesEXT
public XrHandJointVelocitiesEXT(java.nio.ByteBuffer container)
Creates aXrHandJointVelocitiesEXTinstance 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.
-
jointCount
public int jointCount()
auint32_tdescribing the number of elements injointVelocitiesarray.
-
jointVelocities
public XrHandJointVelocityEXT.Buffer jointVelocities()
an array ofXrHandJointVelocityEXTreceiving the returned hand joint velocities.
-
type
public XrHandJointVelocitiesEXT type(int value)
Sets the specified value to thetype()field.
-
type$Default
public XrHandJointVelocitiesEXT type$Default()
Sets theTYPE_HAND_JOINT_VELOCITIES_EXTvalue to thetype()field.
-
next
public XrHandJointVelocitiesEXT next(long value)
Sets the specified value to thenext()field.
-
jointVelocities
public XrHandJointVelocitiesEXT jointVelocities(XrHandJointVelocityEXT.Buffer value)
Sets the address of the specifiedXrHandJointVelocityEXT.Bufferto thejointVelocities()field.
-
set
public XrHandJointVelocitiesEXT set(int type, long next, XrHandJointVelocityEXT.Buffer jointVelocities)
Initializes this struct with the specified values.
-
set
public XrHandJointVelocitiesEXT set(XrHandJointVelocitiesEXT src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrHandJointVelocitiesEXT malloc()
Returns a newXrHandJointVelocitiesEXTinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrHandJointVelocitiesEXT calloc()
Returns a newXrHandJointVelocitiesEXTinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrHandJointVelocitiesEXT create()
Returns a newXrHandJointVelocitiesEXTinstance allocated withBufferUtils.
-
create
public static XrHandJointVelocitiesEXT create(long address)
Returns a newXrHandJointVelocitiesEXTinstance for the specified memory address.
-
createSafe
@Nullable public static XrHandJointVelocitiesEXT createSafe(long address)
-
malloc
public static XrHandJointVelocitiesEXT.Buffer malloc(int capacity)
Returns a newXrHandJointVelocitiesEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrHandJointVelocitiesEXT.Buffer calloc(int capacity)
Returns a newXrHandJointVelocitiesEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrHandJointVelocitiesEXT.Buffer create(int capacity)
Returns a newXrHandJointVelocitiesEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrHandJointVelocitiesEXT.Buffer create(long address, int capacity)
Create aXrHandJointVelocitiesEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrHandJointVelocitiesEXT.Buffer createSafe(long address, int capacity)
-
malloc
public static XrHandJointVelocitiesEXT malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrHandJointVelocitiesEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrHandJointVelocitiesEXT calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrHandJointVelocitiesEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrHandJointVelocitiesEXT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrHandJointVelocitiesEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrHandJointVelocitiesEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrHandJointVelocitiesEXT.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().
-
njointCount
public static int njointCount(long struct)
Unsafe version ofjointCount().
-
njointVelocities
public static XrHandJointVelocityEXT.Buffer njointVelocities(long struct)
Unsafe version ofjointVelocities().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nnext
public static void nnext(long struct, long value)Unsafe version ofnext.
-
njointCount
public static void njointCount(long struct, int value)Sets the specified value to thejointCountfield of the specifiedstruct.
-
njointVelocities
public static void njointVelocities(long struct, XrHandJointVelocityEXT.Buffer value)Unsafe version ofjointVelocities.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-