Class HTCXViveTrackerInteraction
This extension defines a new interaction profile for HTC VIVE Tracker. HTC VIVE Tracker is a generic tracked device which can be attached to anything to make them trackable. For example, it can be attached to user’s hands or feet to track the motion of human body. It can also be attached to any other devices the user wants to track and interact with.
In order to enable the functionality of this extension, you must pass the name of the extension into CreateInstance via the XrInstanceCreateInfo enabledExtensionNames parameter as indicated in the extension section.
This extension allows:
- An application to enumerate the subpaths of all current connected VIVE trackers.
- An application to receive notification of the top level paths of a VIVE tracker when it is connected.
The paths of a VIVE tracker contains two paths below:
- VIVE tracker persistent path indicate a specific tracker whose lifetime lasts longer than an instance, which means it must not change during its hardware lifetime. The format of this path string is unspecified and should be treated as an opaque string.
- VIVE tracker role path may be constructed as "/user/vive_tracker_htcx/role/ROLE_VALUE", where ROLE_VALUE takes one of the following values. The role path may be assigned from the tool provided by the runtime and is
NULL_PATHif it has not been assigned. If this role path refers to more than one tracker, the runtime should choose one of them to be currently active. The role path may be changed during the lifetime of instance. Whenever it is changed, the runtime must send eventTYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCXto provide the new role path of that tracker.- ROLE_VALUE
XR_NULL_PATHhandheld_objectleft_footright_footleft_shoulderright_shoulderleft_elbowright_elbowleft_kneeright_kneeleft_wrist(rev: 3)right_wrist(rev: 3)left_ankle(rev: 3)right_ankle(rev: 3)waistchestcamerakeyboard
- Either the persistent path or the role path can be be passed as a subaction path to indicate a specific tracker. For example,
XrActionCreateInfo::subactionPathsinto functionCreateActionorXrActionSpaceCreateInfo::subactionPathinto functionCreateActionSpace. Please see Example 1 below.
As with other controllers, if a VIVE tracker is connected and bound to a top-level user path, or disconnected while bound to top-level user path, the runtime must send event TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED, and the application may call GetCurrentInteractionProfile to check if the tracker is active or not.
The device that a tracker is attached to probably has a different motion model than what the tracker assumes. The motion tracking might not be as expected in this case.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrEnumerateViveTrackerPathsHTCX(org.lwjgl.openxr.XrInstance instance, int pathCapacityInput, long pathCountOutput, long paths) Unsafe version of:EnumerateViveTrackerPathsHTCXstatic intxrEnumerateViveTrackerPathsHTCX(org.lwjgl.openxr.XrInstance instance, IntBuffer pathCountOutput, @Nullable XrViveTrackerPathsHTCX.Buffer paths) Enumerates all connected VIVE trackers.
-
Field Details
-
XR_HTCX_vive_tracker_interaction_SPEC_VERSION
public static final int XR_HTCX_vive_tracker_interaction_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_HTCX_VIVE_TRACKER_INTERACTION_EXTENSION_NAME
The extension name.- See Also:
-
XR_TYPE_VIVE_TRACKER_PATHS_HTCX
public static final int XR_TYPE_VIVE_TRACKER_PATHS_HTCXExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX
public static final int XR_TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCXExtendsXrStructureType.Enum values:
- See Also:
-
-
Method Details
-
nxrEnumerateViveTrackerPathsHTCX
public static int nxrEnumerateViveTrackerPathsHTCX(org.lwjgl.openxr.XrInstance instance, int pathCapacityInput, long pathCountOutput, long paths) Unsafe version of:EnumerateViveTrackerPathsHTCX- Parameters:
pathCapacityInput- the capacity of thepaths, or 0 to retrieve the required capacity.
-
xrEnumerateViveTrackerPathsHTCX
public static int xrEnumerateViveTrackerPathsHTCX(org.lwjgl.openxr.XrInstance instance, IntBuffer pathCountOutput, @Nullable XrViveTrackerPathsHTCX.Buffer paths) Enumerates all connected VIVE trackers.C Specification
The
EnumerateViveTrackerPathsHTCXfunction is defined as:XrResult xrEnumerateViveTrackerPathsHTCX( XrInstance instance, uint32_t pathCapacityInput, uint32_t* pathCountOutput, XrViveTrackerPathsHTCX* paths);Description
EnumerateViveTrackerPathsHTCXenumerates all connected VIVE trackers to retrieve their paths under current instance.Valid Usage (Implicit)
- The
XR_HTCX_vive_tracker_interactionextension must be enabled prior to callingEnumerateViveTrackerPathsHTCX instancemust be a validXrInstancehandlepathCountOutputmust be a pointer to auint32_tvalue- If
pathCapacityInputis not 0,pathsmust be a pointer to an array ofpathCapacityInputXrViveTrackerPathsHTCXstructures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- an instance previously created.pathCountOutput- a pointer to the count ofXrViveTrackerPathsHTCXpathswritten, or a pointer to the required capacity in the case thatpathCapacityInputis insufficient.paths- a pointer to an array ofXrViveTrackerPathsHTCXVIVE tracker paths, but can beNULLifpathCapacityInputis 0.
- The
-