WVR_GetControllerPoseModeOffset

WVR_EXPORT bool WVR_GetControllerPoseModeOffset(WVR_DeviceType type, WVR_ControllerPoseMode mode, WVR_Vector3f_t * translation, WVR_Quatf_t * quaternion, bool unrotatedTranslation = false)

Function to get the offset data of current enabled controller pose mode.

Return
True means offset obtained successfully; False means offset obtained unsuccessfully (Device type is not controller or not connected.).
Version
API Level 6
Parameters
  • type: Indicates what device type. (refer to WVR_DeviceType). This should be the controller type.
  • mode: Indicates what controller pose mode (refer to WVR_ControllerPoseMode).
  • translation: Returns the translation offset of assigned mode. (It should not be a null pointer.)
  • quaternion: Returns the quaternion offset of assigned mode. (It should not be a null pointer.)
  • unrotatedTranslation: True means the returned parameter translation is raw; False means the returned parameter translation is rotated by the returned parameter quaternion.

How to use

  1. See also three related functions about controller pose mode.

Note

  1. These three functions work only when the configurations of controller pose mode are configured in controller device service.
  2. If the obtained mode offset - translation is (0.0f, 0.0f, 0.0f) and quaternion is (1.0f, 0.0f, 0.0f, 0.0f), it means this mode is not supported. The the controller pose won’t be changed. VR application developer does nothing for controller model.
  1. See also the sample code on page WVR_GetControllerPoseMode.

Attention

The offsets obtained by function WVR_GetControllerPoseModeOffset are avalible only “AFTER” receiving event WVR_EventType_ControllerPoseModeOffsetReady.