WVR Tracker¶
The tracker APIs provide the way to get the related data(pose,button,battery level) of tracker device (such as bracelet device, …, etc.) from the tracker device service.
To use tracker feature, require wave.feature.tracker
“true” in AndroidManifest.xml.
<uses-feature
android:name="wave.feature.tracker"
android:required="true" />
Note
Before using the tracker feature, the developer must check whether the tracker feature is supported or not through WVR Supported Features.
Header¶
#include <wvr/wvr_tracker.h>
All Tracker APIs¶
- API Level 8 (Wave SDK 4.3.0) or later
Function Name | Description |
---|---|
WVR_StartTracker | Start tracker feature. Must call this function first and return WVR_Success to make sure tracker feature is enabled successfully. Then the following functions can just be used. |
WVR_StopTracker | Stop tracker feature. |
WVR_IsTrackerConnected | Get the current connection state of tracker device. |
WVR_GetTrackerRole | Get the role of connected tracker device. |
WVR_GetTrackerCapabilities | Check whether the tracker device supports tracker capabilities (pose tracking, button, battery level, vibration, extended data) or not. If the tracker device supports one of capabilities, then the corresponding functions can just be used. |
WVR_GetTrackerPoseState | (pose tracking) Get the pose of tracker device. |
WVR_GetTrackerInputDeviceCapability | (button) Check the supported button capabilities (press, touch , analog) of all button elements. |
WVR_GetTrackerInputButtonState | (button) Get the current pressed state of button element. |
WVR_GetTrackerInputTouchState | (button) Get the current touched state of button element. |
WVR_GetTrackerInputDeviceAnalogType | (button) Get the supported analog type of button element. |
WVR_GetTrackerInputAnalogAxis | (button) Get the analog data of button element. |
WVR_GetTrackerBatteryLevel | (battery level) Get the current battery level of tracker device. |
WVR_TriggerTrackerVibration | (vibration) Trigger the vibration of tracker device. |
WVR_GetTrackerExtendedData | (extended data) Get the extended data of tracker device. |
Note
Recommend calling get tracker pose API WVR_GetTrackerPoseState just after WVR_GetSyncPose to make sure tracker model moving smooth.
API Level 9 (Wave SDK 5.0.0) or later
Feature - Tracker Info Notification
Function Name Description WVR_TrackerInfoCallback Function template for the reference to implement a callback function. WVR_RegisterTrackerInfoCallback Register the callback function for recieving tracker info notification. WVR_UnregisterTrackerInfoCallback Unregister the callback function.
API Level 12 (Wave SDK 5.2.0) or later
Updated
- Add new parameter timestamp to function WVR_GetTrackerExtendedData.
New added
Function Name Description WVR_GetTrackerDeviceName Function to get device name of tracker device.
Wave SDK 5.3.0 or later
- Updated
- Types in wvr.h
- enum WVR_TrackerRole
- Extend the definition of role of tracker device for function WVR_GetTrackerRole.
- enum WVR_TrackerRole
- Types in wvr.h
- New added
- Types in wvr.h
- enum WVR_EventType
- Event WVR_EventType_TrackerRoleChanged as the notification of the dynamical role change of tracker device. The developer should call function WVR_GetTrackerRole to update role when this event has been received.
- enum WVR_EventType
- Types in wvr.h
- Updated