Class MSFTHandTrackingMesh
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
FieldsModifier and TypeFieldDescriptionstatic final intXrHandPoseTypeMSFT - Describe type of input hand posestatic final intXrHandPoseTypeMSFT - Describe type of input hand posestatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrCreateHandMeshSpaceMSFT(XrHandTrackerEXT handTracker, long createInfo, long space) Unsafe version of:CreateHandMeshSpaceMSFTstatic intnxrUpdateHandMeshMSFT(XrHandTrackerEXT handTracker, long updateInfo, long handMesh) Unsafe version of:UpdateHandMeshMSFTstatic intxrCreateHandMeshSpaceMSFT(XrHandTrackerEXT handTracker, XrHandMeshSpaceCreateInfoMSFT createInfo, org.lwjgl.PointerBuffer space) Create a space for hand mesh tracking.static intxrUpdateHandMeshMSFT(XrHandTrackerEXT handTracker, XrHandMeshUpdateInfoMSFT updateInfo, XrHandMeshMSFT handMesh) Update hand mesh buffers.
-
Field Details
-
XR_MSFT_hand_tracking_mesh_SPEC_VERSION
public static final int XR_MSFT_hand_tracking_mesh_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_MSFT_HAND_TRACKING_MESH_EXTENSION_NAME
The extension name.- See Also:
-
XR_TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFT
public static final int XR_TYPE_SYSTEM_HAND_TRACKING_MESH_PROPERTIES_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFT
public static final int XR_TYPE_HAND_MESH_SPACE_CREATE_INFO_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_HAND_MESH_UPDATE_INFO_MSFT
public static final int XR_TYPE_HAND_MESH_UPDATE_INFO_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_HAND_MESH_MSFT
public static final int XR_TYPE_HAND_MESH_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_HAND_POSE_TYPE_INFO_MSFT
public static final int XR_TYPE_HAND_POSE_TYPE_INFO_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_HAND_POSE_TYPE_TRACKED_MSFT
public static final int XR_HAND_POSE_TYPE_TRACKED_MSFTXrHandPoseTypeMSFT - Describe type of input hand poseEnumerant Descriptions
HAND_POSE_TYPE_TRACKED_MSFTrepresents a hand pose provided by actual tracking of the user’s hand.HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFTrepresents a stable reference hand pose in a relaxed open hand shape.
The
HAND_POSE_TYPE_TRACKED_MSFTinput 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_MSFTinput 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 sameXrHandTrackerEXT, 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
indexBufferKeyis changed or when theisActivevalue returned fromUpdateHandMeshMSFTchanges fromFALSEtoTRUE. It can use the returnedindexBufferKeyandvertexUpdateTimefromUpdateHandMeshMSFTto avoid unnecessary CPU or GPU work to process the neutral hand inputs.See Also
XrHandMeshSpaceCreateInfoMSFT,XrHandMeshUpdateInfoMSFT,XrHandPoseTypeInfoMSFT,XrHandTrackerCreateInfoEXT,CreateHandTrackerEXT- See Also:
-
XR_HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT
public static final int XR_HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFTXrHandPoseTypeMSFT - Describe type of input hand poseEnumerant Descriptions
HAND_POSE_TYPE_TRACKED_MSFTrepresents a hand pose provided by actual tracking of the user’s hand.HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFTrepresents a stable reference hand pose in a relaxed open hand shape.
The
HAND_POSE_TYPE_TRACKED_MSFTinput 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_MSFTinput 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 sameXrHandTrackerEXT, 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
indexBufferKeyis changed or when theisActivevalue returned fromUpdateHandMeshMSFTchanges fromFALSEtoTRUE. It can use the returnedindexBufferKeyandvertexUpdateTimefromUpdateHandMeshMSFTto avoid unnecessary CPU or GPU work to process the neutral hand inputs.See Also
XrHandMeshSpaceCreateInfoMSFT,XrHandMeshUpdateInfoMSFT,XrHandPoseTypeInfoMSFT,XrHandTrackerCreateInfoEXT,CreateHandTrackerEXT- See Also:
-
-
Method Details
-
nxrCreateHandMeshSpaceMSFT
public static int nxrCreateHandMeshSpaceMSFT(XrHandTrackerEXT handTracker, long createInfo, long space) Unsafe version of:CreateHandMeshSpaceMSFT -
xrCreateHandMeshSpaceMSFT
public static int xrCreateHandMeshSpaceMSFT(XrHandTrackerEXT handTracker, XrHandMeshSpaceCreateInfoMSFT createInfo, org.lwjgl.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_BITandSPACE_LOCATION_ORIENTATION_VALID_BITbits on calls toLocateSpacewith the hand mesh space, and the application should avoid using the returned poses or query for hand mesh data.If the underlying
XrHandTrackerEXTis destroyed, the runtime must continue to supportLocateSpaceusing the hand mesh space, and it must return space location withSPACE_LOCATION_POSITION_VALID_BITandSPACE_LOCATION_ORIENTATION_VALID_BITunset.The application may create a mesh space for the reference hand by setting
XrHandPoseTypeInfoMSFT::handPoseTypetoHAND_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)
- The
XR_MSFT_hand_tracking_meshextension must be enabled prior to callingCreateHandMeshSpaceMSFT handTrackermust be a validXrHandTrackerEXThandlecreateInfomust be a pointer to a validXrHandMeshSpaceCreateInfoMSFTstructurespacemust be a pointer to anXrSpacehandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
handTracker- anXrHandTrackerEXThandle previously created with theCreateHandTrackerEXTfunction.createInfo- theXrHandMeshSpaceCreateInfoMSFTused to specify the hand mesh space.space- the returnedXrSpacehandle of the new hand mesh space.
- The
-
nxrUpdateHandMeshMSFT
public static int nxrUpdateHandMeshMSFT(XrHandTrackerEXT handTracker, long updateInfo, long handMesh) Unsafe version of:UpdateHandMeshMSFT -
xrUpdateHandMeshMSFT
public static int xrUpdateHandMeshMSFT(XrHandTrackerEXT handTracker, XrHandMeshUpdateInfoMSFT updateInfo, XrHandMeshMSFT handMesh) Update hand mesh buffers.C Specification
The application can use the
UpdateHandMeshMSFTfunction 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 byCreateHandMeshSpaceMSFTwith a sameXrHandTrackerEXT.XrResult xrUpdateHandMeshMSFT( XrHandTrackerEXT handTracker, const XrHandMeshUpdateInfoMSFT* updateInfo, XrHandMeshMSFT* handMesh);Description
The application should preallocate the index buffer and vertex buffer in
XrHandMeshMSFTusing theXrSystemHandTrackingMeshPropertiesMSFT::maxHandMeshIndexCountandXrSystemHandTrackingMeshPropertiesMSFT::maxHandMeshVertexCountfrom theXrSystemHandTrackingMeshPropertiesMSFTreturned from theGetSystemPropertiesfunction.The application should preallocate the
XrHandMeshMSFTstructure and reuse it for each frame so as to reduce the copies of data when underlying tracking data is not changed. The application should useXrHandMeshMSFT::indexBufferChangedandXrHandMeshMSFT::vertexBufferChangedinXrHandMeshMSFTto detect changes and avoid unnecessary data processing when there is no changes.Valid Usage (Implicit)
- The
XR_MSFT_hand_tracking_meshextension must be enabled prior to callingUpdateHandMeshMSFT handTrackermust be a validXrHandTrackerEXThandleupdateInfomust be a pointer to a validXrHandMeshUpdateInfoMSFTstructurehandMeshmust be a pointer to anXrHandMeshMSFTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrHandMeshMSFT,XrHandMeshUpdateInfoMSFT,CreateHandMeshSpaceMSFT- Parameters:
handTracker- anXrHandTrackerEXThandle previously created withCreateHandTrackerEXT.updateInfo- anXrHandMeshUpdateInfoMSFTwhich contains information to query the hand mesh.handMesh- anXrHandMeshMSFTstructure to receive the updates of hand mesh data.
- The
-