Class HTCXViveTrackerInteraction

java.lang.Object
org.lwjgl.openxr.HTCXViveTrackerInteraction

public class HTCXViveTrackerInteraction extends Object
The XR_HTCX_vive_tracker_interaction extension.

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_PATH if 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 event TYPE_EVENT_DATA_VIVE_TRACKER_CONNECTED_HTCX to provide the new role path of that tracker.
    ROLE_VALUE
    • XR_NULL_PATH
    • handheld_object
    • left_foot
    • right_foot
    • left_shoulder
    • right_shoulder
    • left_elbow
    • right_elbow
    • left_knee
    • right_knee
    • left_wrist (rev: 3)
    • right_wrist (rev: 3)
    • left_ankle (rev: 3)
    • right_ankle (rev: 3)
    • waist
    • chest
    • camera
    • keyboard
  • Either the persistent path or the role path can be be passed as a subaction path to indicate a specific tracker. For example, XrActionCreateInfo::subactionPaths into function CreateAction or XrActionSpaceCreateInfo::subactionPath into function CreateActionSpace. 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.