Types in wvr.h

WVR enum

  • Tracking Device enum
enum WVR_DeviceErrorStatus

The error status of specified device from device service.

Device Service uses bitmask to record device error, because it might occur many errors at the same time. Each error status represents that device has hardware exception. And restore status means that error status has been fixed.

Values:

WVR_DeviceErrorStatus_None = 0
WVR_DeviceErrorStatus_BatteryOverheat = 1
WVR_DeviceErrorStatus_BatteryOverheatRestore = 1 << 1

battery temperature is too hot.

WVR_DeviceErrorStatus_BatteryOvervoltage = 1 << 2

battery temperature has been cooled down.

WVR_DeviceErrorStatus_BatteryOvervoltageRestore = 1 << 3

battery is overvoltage charging.

WVR_DeviceErrorStatus_DeviceConnectFail = 1 << 4

overvoltage has been fixed.

WVR_DeviceErrorStatus_DeviceConnectRestore = 1 << 5

it’s failed to connect to USB device.

WVR_DeviceErrorStatus_DeviceLostTracking = 1 << 6

ConnectFail has been fixed.

WVR_DeviceErrorStatus_DeviceTrackingRestore = 1 << 7

tracking device might be out of range.

WVR_DeviceErrorStatus_ChargeFail = 1 << 8

LostTracking has been fixed.

WVR_DeviceErrorStatus_ChargeRestore = 1 << 9

when device is charging, consuming voltage is larger than charging.

enum WVR_DeviceType

The type of VR device.

Describes the role of VR devices

Values:

WVR_DeviceType_HMD = 1

Head-Mounted Display.

WVR_DeviceType_Controller_Right = 2

Right hand tracked controller.

WVR_DeviceType_Controller_Left = 3

Left hand tracked controller.

enum WVR_EventType

The event type.

Values:

WVR_EventType_Quit = 99

Application Quit.

WVR_EventType_DeviceConnected = 100

WVR_DeviceType connected.

WVR_EventType_DeviceDisconnected = 101

WVR_DeviceType disconnected.

WVR_EventType_DeviceStatusUpdate = 102

WVR_DeviceType configure changed.

WVR_EventType_IpdChanged = 105

The interpupillary distance has been changed

WVR_EventType_DeviceSuspend = 106
WVR_EventType_DeviceResume = 107
WVR_EventType_DeviceRoleChanged = 108
WVR_EventType_BatteryStatus_Update = 30004
WVR_EventType_ChargeStatus_Update = 30005
WVR_EventType_DeviceErrorStatus_Update = 30006
WVR_EventType_BatteryTemperatureStatus_Update = 30007
WVR_EventType_RecenterSuccess = 30010

Notification of recenter success for 6 DoF device.

WVR_EventType_RecenterFail = 30011

Notification of recenter fail for 6 DoF device.

WVR_EventType_RecenterSuccess_3DoF = 30012

Notification of recenter success for 3 DoF device.

WVR_EventType_RecenterFail_3DoF = 30013

Notification of recenter fail for 3 DoF device.

WVR_EventType_TouchpadSwipe_LeftToRight = 30014

Notification of swipe motion (move Left to Right) on touchpad.

WVR_EventType_TouchpadSwipe_RightToLeft = 30015

Notification of swipe motion (move Right to Left) on touchpad.

WVR_EventType_TouchpadSwipe_DownToUp = 30016

Notification of swipe motion (move Down to Up) on touchpad.

WVR_EventType_TouchpadSwipe_UpToDown = 30017

Notification of swipe motion (move Up to Down) on touchpad.

WVR_EventType_Settings_Controller = 30022
WVR_EventType_TrackingModeChanged = 30106

Notification of changing tracking mode (3 Dof/6 Dof).

WVR_EventType_ButtonPressed = 200

WVR_InputId status change to pressed.

WVR_EventType_ButtonUnpressed = 201

WVR_InputId status change to unpressed

WVR_EventType_TouchTapped = 202

WVR_InputId status change to touched.

WVR_EventType_TouchUntapped = 203

WVR_InputId status change to untouched.

enum WVR_Eye

The sides of target scene.

Specify the side of eye for targe scene.

Values:

WVR_Eye_Left = 0

WVR_Eye_Left: Left eye id.

WVR_Eye_Right = 1

WVR_Eye_Right: Right eye id.

enum WVR_InputId

The input id of device.

Values:

WVR_InputId_0 = 0
WVR_InputId_1 = 1
WVR_InputId_2 = 2
WVR_InputId_3 = 3
WVR_InputId_4 = 4
WVR_InputId_5 = 5
WVR_InputId_6 = 6
WVR_InputId_7 = 7
WVR_InputId_8 = 8
WVR_InputId_9 = 9
WVR_InputId_16 = 16
WVR_InputId_17 = 17
WVR_InputId_Alias1_System = WVR_InputId_0

System Button.

WVR_InputId_Alias1_Menu = WVR_InputId_1

Menu Button.

WVR_InputId_Alias1_Grip = WVR_InputId_2

Grip Button.

WVR_InputId_Alias1_DPad_Left = WVR_InputId_3

Virtual DPad_Left Button on Touchpad.

WVR_InputId_Alias1_DPad_Up = WVR_InputId_4

Virtual DPad_Up Button on Touchpad.

WVR_InputId_Alias1_DPad_Right = WVR_InputId_5

Virtual DPad_Right Button on Touchpad.

WVR_InputId_Alias1_DPad_Down = WVR_InputId_6

Virtual DPad_Down Button on Touchpad.

WVR_InputId_Alias1_Volume_Up = WVR_InputId_7

Volume_Up Button.

WVR_InputId_Alias1_Volume_Down = WVR_InputId_8

Volume_Down Button.

WVR_InputId_Alias1_Bumper = WVR_InputId_9

Bumper Button.

WVR_InputId_Alias1_Touchpad = WVR_InputId_16

Touchpad input device.

WVR_InputId_Alias1_Trigger = WVR_InputId_17

Trigger input device.

WVR_InputId_Max = 32
enum WVR_PoseOriginModel

The style of tracking origin.

Identifies which style of tracking origin the application wants to use for the poses it is requesting

Values:

WVR_PoseOriginModel_OriginOnHead = 0

The origin of 6 DoF pose is on head.

WVR_PoseOriginModel_OriginOnGround = 1

The origin of 6 DoF pose is on ground.

WVR_PoseOriginModel_OriginOnTrackingObserver = 2

The raw pose from tracking system.

WVR_PoseOriginModel_OriginOnHead_3DoF = 3

The origin of 3 DoF pose is on head.

  • Device enum
enum WVR_AnalogType

analog type

Values:

WVR_AnalogType_None = 0
WVR_AnalogType_TouchPad = 1

Provide analog data with x and y coordinate

WVR_AnalogType_Trigger = 2

Provide analog data with x coordinate

  • Arena enum
enum WVR_ArenaVisible

To decide whether vitual wall should be showed.

Values:

WVR_ArenaVisible_Auto = 0

Show Arena while HMD is near boundaries

WVR_ArenaVisible_ForceOn = 1

Always show Arena

WVR_ArenaVisible_ForceOff = 2

Never show Arena

enum WVR_NumDoF

The type of degree of freedom (DoF)

Values:

WVR_NumDoF_3DoF = 0

Position (x, y, z) on 3 coordinates, which contains (1) moving up and down, (2) moving left and right, (3) moving forward and backward.

WVR_NumDoF_6DoF = 1

Position (x, y, z) on 3 coordinates and rotation (yaw, pitch, roll) on 3 coordinates.

enum WVR_ArenaShape

Supported play area shape.

Values:

WVR_ArenaShape_None = 0

Arena shape is undefined

WVR_ArenaShape_Rectangle = 1

Arena shape is rectangle

WVR_ArenaShape_Round = 2

Arena shape is round

WVR struct

  • Event struct
struct WVR_CommonEvent

Common Event, including WVR_EventType, timestamp.

Public Members

WVR_EventType type

The types of event

int64_t timestamp

Delivered time in nanoseconds.

struct WVR_DeviceEvent

Device Event, including WVR_EventType, timestamp, WVR_DeviceType.

Public Members

WVR_CommonEvent_t common
WVR_DeviceType deviceType

Post event by WVR_InputId

struct WVR_InputEvent

Input Event, including WVR_EventType, timestamp, WVR_DeviceType, WVR_InputId.

Public Members

WVR_DeviceEvent_t device
WVR_InputId inputId

Post event by WVR_InputId

struct WVR_ErrorStatusEvent

Error Status Event, including WVR_EventType, timestamp, WVR_DeviceType, WVR_DeviceErrorStatus.

Public Members

WVR_DeviceEvent_t device
WVR_DeviceErrorStatus status
struct WVR_IPDEvent

IPD changed Event, including WVR_EventType, timestamp, interpupillary distance in meters. Some platforms support dynamic IPD tuning. Current IPD value is available when IPD changed event coming.

Public Members

WVR_CommonEvent_t common
float ipdMeters
struct WVR_TrackingModeEvent

Tracking mode setting changed Event, including WVR_EventType, timestamp, 3dof/6dof tracking mode.

Public Members

WVR_CommonEvent_t common

The info of Common Event (refer to WVR_CommonEvent)

WVR_NumDoF trackingMode

The changed tracking mode (3 DoF/6 DoF)

  • Tracking pose struct
struct WVR_Matrix4f

The basic matrix (4x4 floats) struct to be used in pose.

Public Members

float m[4][4]

Matrix form (4X4) to represent rotation and position of pose data.

struct WVR_Vector3f

The basic vector (3 floats) struct to be used in pose.

Public Members

float v[3]

Matrix form (3X1) to represent a set of data which contains 3 elements.

struct WVR_Vector2f

The basic vector (2 floats) struct to be used in pose.

Public Members

float v[2]

Matrix form (2X1) to represent a set of data which contains 2 elements.

struct WVR_Quatf

The basic quaternion (4 floats) struct to be used in pose.

Public Members

float w
float x
float y
float z

Quaternion form to represent rotation of pose.

struct WVR_Pose

Describes a single pose in quaternion form for a tracked object.

Public Members

WVR_Vector3f_t position

Position (x, y, z) part of Pose (refer to WVR_Vector3f).

WVR_Quatf_t rotation

Rotation (quaternion form: w, x, y, z) part of Pose (refer to WVR_Quatf).

struct WVR_PoseState

Describes a single pose in rotation matrix form for a tracked object.

Public Members

bool isValidPose

The label of valid(true)/invalid(false) pose.

WVR_Matrix4f_t poseMatrix

The pose data (ratation, position) in matrix form (refer to WVR_Matrix4f).

WVR_Vector3f_t velocity

The velocity of pose (refer to WVR_Vector3f).

WVR_Vector3f_t angularVelocity

The angular velocity of pose.

bool is6DoFPose

The label of 6 DoF(true)/3 DoF(false) pose.

int64_t timestamp

Absolute time (in nanosecond) of pose.

WVR_Vector3f_t acceleration

The acceleration of pose.

WVR_Vector3f_t angularAcceleration

The angular acceleration of pose.

float predictedMilliSec

Number of milliseconds from now to predict poses.

WVR_PoseOriginModel originModel

The origin model of pose.

struct WVR_DevicePosePair

Aggregate the device type identity and device tracking pose.

Public Members

WVR_DeviceType type

Type of VR device.

WVR_PoseState_t pose

Pose information of Tracked VR device (refer to WVR_PoseState).

  • Device struct
struct WVR_Axis

analog data

Public Members

float x

The interval of analog values on coordinates x is -1<x<1.

float y

The interval of analog values on coordinates y is -1<x<1.

struct WVR_AnalogState

analog state

Public Members

WVR_InputId id

indicate the analog state belongs to which WVR_InputId

WVR_AnalogType type

indicate the analog data’s type

WVR_Axis_t axis

WVR_Axis, include analog data

  • Arena struct
struct WVR_Hexagon

Describes 6 corner positions of a hexagon.

Public Members

WVR_Vector3f_t corners[6]

6 sets of position data (refer to WVR_Vector3f)

struct WVR_ArenaRectangle

Describes rectangle Arena area (play area) size parameters.

Public Members

float width

The width of rectangle Arena area

float length

The length of rectangle Arena area

struct WVR_ArenaRound

Describes round Arena area (play area) size parameter.

Public Members

float diameter

The diameter of round Arena area

struct WVR_Arena

Describes current effective Arena area (play area) shape and its related range parameters.

Public Members

WVR_ArenaShape shape

The setting of Arena shape

WVR_ArenaArea_t area

The setting of Arena area (refer to WVR_ArenaArea)

union WVR_ArenaArea
#include <wvr_arena.h>

Describes 2 types of Arena area (play area) range parameters.

Public Members

WVR_ArenaRectangle_t rectangle

The setting of rectangle Arena area (refer to WVR_ArenaRectangle)

WVR_ArenaRound_t round

The setting of round Arena area (refer to WVR_ArenaRound)