Top Description Fields Constructors Methods
org.lwjgl.openxr

public Class MSFTHandTrackingMesh

extends Object
Class Inheritance
Imports
org.lwjgl.*, org.lwjgl.system.*

The XR_MSFT_hand_tracking_mesh extension.

This extension enables hand tracking inputs represented as a dynamic hand mesh. It enables applications to render hands in XR experiences and interact with virtual objects using hand meshes.

The application must also enable the XR_EXT_hand_tracking extension in order to use this extension.

Field Summary

Modifier and TypeField and Description
public static final int
XR_HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT

XrHandPoseTypeMSFT - Describe type of input hand pose Enumerant Descriptions

public static final int
XR_HAND_POSE_TYPE_TRACKED_MSFT

XrHandPoseTypeMSFT - Describe type of input hand pose Enumerant Descriptions

public static final String
public static final int
XR_MSFT_hand_tracking_mesh_SPEC_VERSION

The extension specification version.

public static final int
XR_TYPE_HAND_MESH_MSFT

Extends XrStructureType.

public static final int
public static final int
XR_TYPE_HAND_MESH_UPDATE_INFO_MSFT

Extends XrStructureType.

public static final int
XR_TYPE_HAND_POSE_TYPE_INFO_MSFT

Extends XrStructureType.

public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nxrCreateHandMeshSpaceMSFT(XrHandTrackerEXT handTracker, long createInfo, long space)

Unsafe version of: CreateHandMeshSpaceMSFT

public static int
nxrUpdateHandMeshMSFT(XrHandTrackerEXT handTracker, long updateInfo, long handMesh)

Unsafe version of: UpdateHandMeshMSFT

public static int
xrCreateHandMeshSpaceMSFT(XrHandTrackerEXT
an XrHandTrackerEXT handle previously created with the CreateHandTrackerEXT function.
handTracker
,
XrHandMeshSpaceCreateInfoMSFT
the XrHandMeshSpaceCreateInfoMSFT used to specify the hand mesh space.
createInfo
,
PointerBuffer
the returned XrSpace handle of the new hand mesh space.
space
)

Create a space for hand mesh tracking.

public static int
xrUpdateHandMeshMSFT(XrHandTrackerEXT
an XrHandTrackerEXT handle previously created with CreateHandTrackerEXT.
handTracker
,
XrHandMeshUpdateInfoMSFT
an XrHandMeshUpdateInfoMSFT which contains information to query the hand mesh.
updateInfo
,
XrHandMeshMSFT
an XrHandMeshMSFT structure to receive the updates of hand mesh data.
handMesh
)

Update hand mesh buffers.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

XR_HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFTback to summary
public static final int XR_HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT

XrHandPoseTypeMSFT - Describe type of input hand pose

Enumerant Descriptions

The HAND_POSE_TYPE_TRACKED_MSFT input provides best fidelity to the user’s actual hand motion. When the hand tracking input requires the user to be holding a controller in their hand, the hand tracking input will appear as the user virtually holding the controller. This input can be used to render the hand shape together with the controller in hand.

The HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT input does not move with the user’s actual hand. Through this reference hand pose, an application can get a stable hand joint and mesh that has the same mesh topology as the tracked hand mesh using the same XrHandTrackerEXT, so that the application can apply the data computed from a reference hand pose to the corresponding tracked hand.

Although a reference hand pose does not move with user’s hand motion, the bone length and hand thickness may be updated, for example when tracking result refines, or a different user’s hand is detected. The application should update reference hand joints and meshes when the tracked mesh’s indexBufferKey is changed or when the isActive value returned from UpdateHandMeshMSFT changes from FALSE to TRUE. It can use the returned indexBufferKey and vertexUpdateTime from UpdateHandMeshMSFT to avoid unnecessary CPU or GPU work to process the neutral hand inputs.

See Also

XrHandMeshSpaceCreateInfoMSFT, XrHandMeshUpdateInfoMSFT, XrHandPoseTypeInfoMSFT, XrHandTrackerCreateInfoEXT, CreateHandTrackerEXT

XR_HAND_POSE_TYPE_TRACKED_MSFTback to summary
public static final int XR_HAND_POSE_TYPE_TRACKED_MSFT

XrHandPoseTypeMSFT - Describe type of input hand pose

Enumerant Descriptions

The HAND_POSE_TYPE_TRACKED_MSFT input provides best fidelity to the user’s actual hand motion. When the hand tracking input requires the user to be holding a controller in their hand, the hand tracking input will appear as the user virtually holding the controller. This input can be used to render the hand shape together with the controller in hand.

The HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT input does not move with the user’s actual hand. Through this reference hand pose, an application can get a stable hand joint and mesh that has the same mesh topology as the tracked hand mesh using the same XrHandTrackerEXT, so that the application can apply the data computed from a reference hand pose to the corresponding tracked hand.

Although a reference hand pose does not move with user’s hand motion, the bone length and hand thickness may be updated, for example when tracking result refines, or a different user’s hand is detected. The application should update reference hand joints and meshes when the tracked mesh’s indexBufferKey is changed or when the isActive value returned from UpdateHandMeshMSFT changes from FALSE to TRUE. It can use the returned indexBufferKey and vertexUpdateTime from UpdateHandMeshMSFT to avoid unnecessary CPU or GPU work to process the neutral hand inputs.

See Also

XrHandMeshSpaceCreateInfoMSFT, XrHandMeshUpdateInfoMSFT, XrHandPoseTypeInfoMSFT, XrHandTrackerCreateInfoEXT, CreateHandTrackerEXT

XR_MSFT_HAND_TRACKING_MESH_EXTENSION_NAMEback to summary
public static final String XR_MSFT_HAND_TRACKING_MESH_EXTENSION_NAME

The extension name.

XR_MSFT_hand_tracking_mesh_SPEC_VERSIONback to summary
public static final int XR_MSFT_hand_tracking_mesh_SPEC_VERSION

The extension specification version.

XR_TYPE_HAND_MESH_MSFTback to summary
public static final int XR_TYPE_HAND_MESH_MSFT

Extends XrStructureType.

Enum values:
XR_TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFTback to summary
public static final int XR_TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT

Extends XrStructureType.

Enum values:
XR_TYPE_HAND_MESH_UPDATE_INFO_MSFTback to summary
public static final int XR_TYPE_HAND_MESH_UPDATE_INFO_MSFT

Extends XrStructureType.

Enum values:
XR_TYPE_HAND_POSE_TYPE_INFO_MSFTback to summary
public static final int XR_TYPE_HAND_POSE_TYPE_INFO_MSFT

Extends XrStructureType.

Enum values:
XR_TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFTback to summary
public static final int XR_TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT

Extends XrStructureType.

Enum values:

Constructor Detail

MSFTHandTrackingMeshback to summary
protected MSFTHandTrackingMesh()

Method Detail

nxrCreateHandMeshSpaceMSFTback to summary
public static int nxrCreateHandMeshSpaceMSFT(XrHandTrackerEXT handTracker, long createInfo, long space)

Unsafe version of: CreateHandMeshSpaceMSFT

nxrUpdateHandMeshMSFTback to summary
public static int nxrUpdateHandMeshMSFT(XrHandTrackerEXT handTracker, long updateInfo, long handMesh)

Unsafe version of: UpdateHandMeshMSFT

xrCreateHandMeshSpaceMSFTback to summary
public static int xrCreateHandMeshSpaceMSFT(XrHandTrackerEXT handTracker, XrHandMeshSpaceCreateInfoMSFT createInfo, PointerBuffer space)

Create a space for hand mesh tracking.

C Specification

The application creates a hand mesh space using function CreateHandMeshSpaceMSFT. The position and normal of hand mesh vertices will be represented in this space.


XrResult xrCreateHandMeshSpaceMSFT(
    XrHandTrackerEXT                            handTracker,
    const XrHandMeshSpaceCreateInfoMSFT*        createInfo,
    XrSpace*                                    space);
Description

A hand mesh space location is specified by runtime preference to effectively represent hand mesh vertices without unnecessary transformations. For example, an optical hand tracking system can define the hand mesh space origin at the depth camera’s optical center.

An application should create separate hand mesh space handles for each hand to retrieve the corresponding hand mesh data. The runtime may use the lifetime of this hand mesh space handle to manage the underlying device resources. Therefore, the application should destroy the hand mesh handle after it is finished using the hand mesh.

The hand mesh space can be related to other spaces in the session, such as view reference space, or grip action space from the pathname:/interaction_profiles/khr/simple_controller interaction profile. The hand mesh space may be not locatable when the hand is outside of the tracking range, or if focus is removed from the application. In these cases, the runtime must not set the SPACE_LOCATION_POSITION_VALID_BIT and SPACE_LOCATION_ORIENTATION_VALID_BIT bits on calls to LocateSpace with the hand mesh space, and the application should avoid using the returned poses or query for hand mesh data.

If the underlying XrHandTrackerEXT is destroyed, the runtime must continue to support LocateSpace using the hand mesh space, and it must return space location with SPACE_LOCATION_POSITION_VALID_BIT and SPACE_LOCATION_ORIENTATION_VALID_BIT unset.

The application may create a mesh space for the reference hand by setting handPoseType to HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT. Hand mesh spaces for the reference hand must only be locatable in reference to mesh spaces or joint spaces of the reference hand.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrHandMeshSpaceCreateInfoMSFT

Parameters
handTracker:XrHandTrackerEXT

an XrHandTrackerEXT handle previously created with the CreateHandTrackerEXT function.

createInfo:XrHandMeshSpaceCreateInfoMSFT

the XrHandMeshSpaceCreateInfoMSFT used to specify the hand mesh space.

space:PointerBuffer

the returned XrSpace handle of the new hand mesh space.

Annotations
@NativeType:XrResult
xrUpdateHandMeshMSFTback to summary
public static int xrUpdateHandMeshMSFT(XrHandTrackerEXT handTracker, XrHandMeshUpdateInfoMSFT updateInfo, XrHandMeshMSFT handMesh)

Update hand mesh buffers.

C Specification

The application can use the UpdateHandMeshMSFT function to retrieve the hand mesh at a given timestamp. The hand mesh’s vertices position and normal are represented in the hand mesh space created by CreateHandMeshSpaceMSFT with a same XrHandTrackerEXT.


XrResult xrUpdateHandMeshMSFT(
    XrHandTrackerEXT                            handTracker,
    const XrHandMeshUpdateInfoMSFT*             updateInfo,
    XrHandMeshMSFT*                             handMesh);
Description

The application should preallocate the index buffer and vertex buffer in XrHandMeshMSFT using the maxHandMeshIndexCount and maxHandMeshVertexCount from the XrSystemHandTrackingMeshPropertiesMSFT returned from the GetSystemProperties function.

The application should preallocate the XrHandMeshMSFT structure and reuse it for each frame so as to reduce the copies of data when underlying tracking data is not changed. The application should use indexBufferChanged and vertexBufferChanged in XrHandMeshMSFT to detect changes and avoid unnecessary data processing when there is no changes.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrHandMeshMSFT, XrHandMeshUpdateInfoMSFT, CreateHandMeshSpaceMSFT

Parameters
handTracker:XrHandTrackerEXT

an XrHandTrackerEXT handle previously created with CreateHandTrackerEXT.

updateInfo:XrHandMeshUpdateInfoMSFT

an XrHandMeshUpdateInfoMSFT which contains information to query the hand mesh.

handMesh:XrHandMeshMSFT

an XrHandMeshMSFT structure to receive the updates of hand mesh data.

Annotations
@NativeType:XrResult