cgv
Loading...
Searching...
No Matches
vr_state.h File Reference

defines types to store the state vr::vr_kit_state of a vr kit, which is split into sub states for the hmd (vr::vr_trackable_state) and the two controllers (vr::vr_conroller_state). More...

#include <string>
#include <vector>
#include "lib_begin.h"
#include <cgv/config/lib_end.h>

Go to the source code of this file.

Classes

struct  vr::vr_trackable_state
 a trackable knows whether it is tracked and its 6d pose stored as 3x4 matrix in column major format More...
 
struct  vr::vr_controller_state
 Extends the trackable state by information on the buttons, input axes and vibration strengths. More...
 
struct  vr::vr_kit_state
 structure that stores all information describing the state of a VR kit More...
 

Namespaces

namespace  vr
 the vr namespace for virtual reality support
 

Enumerations

enum  vr::KeyAction { KA_RELEASE , KA_PRESS , KA_REPEAT }
 repeated definition from cgv/gui/key_event.h More...
 
enum  vr::VRKeys {
  VR_UNKNOWN = 1024 , vr::VR_SYSTEM , vr::VR_MENU , vr::VR_GRIP ,
  vr::VR_DPAD_DOWN_LEFT , vr::VR_DPAD_DOWN , vr::VR_DPAD_DOWN_RIGHT , vr::VR_DPAD_LEFT ,
  vr::VR_DPAD_RIGHT , vr::VR_DPAD_UP_LEFT , vr::VR_DPAD_UP , vr::VR_DPAD_UP_RIGHT ,
  vr::VR_A , vr::VR_INPUT0_TOUCH , vr::VR_INPUT0 , vr::VR_INPUT1_TOUCH ,
  vr::VR_INPUT1 , vr::VR_INPUT2_TOUCH , vr::VR_INPUT2 , vr::VR_INPUT3_TOUCH ,
  vr::VR_INPUT3 , vr::VR_INPUT4_TOUCH , vr::VR_INPUT4 , vr::VR_PROXIMITY ,
  vr::VR_END , vr::VR_BEGIN =VR_SYSTEM
}
 enumerate all VR keys starting at 1024 More...
 
enum  vr::VRButtonStateFlags {
  vr::VRF_SYSTEM = 0x000001 , vr::VRF_MENU = 0x000002 , vr::VRF_GRIP = 0x000004 , vr::VRF_DPAD_LEFT = 0x000008 ,
  vr::VRF_DPAD_RIGHT = 0x000010 , vr::VRF_DPAD_DOWN = 0x000020 , vr::VRF_DPAD_UP = 0x000040 , vr::VRF_A = 0x000080 ,
  vr::VRF_INPUT0_TOUCH = 0x000100 , vr::VRF_INPUT0 = 0x000200 , vr::VRF_INPUT1_TOUCH = 0x000400 , vr::VRF_INPUT1 = 0x000800 ,
  vr::VRF_INPUT2_TOUCH = 0x001000 , vr::VRF_INPUT2 = 0x002000 , vr::VRF_INPUT3_TOUCH = 0x004000 , vr::VRF_INPUT3 = 0x008000 ,
  vr::VRF_INPUT4_TOUCH = 0x010000 , vr::VRF_INPUT4 = 0x020000 , vr::VRF_PROXIMITY = 0x040000
}
 one flag for each vr controller button More...
 
enum  vr::VRStatus { vr::VRS_DETACHED , vr::VRS_ATTACHED , vr::VRS_TRACKED }
 different status values for a trackable More...
 

Functions

std::string vr::get_key_string (unsigned short key)
 convert key to string
 
std::string vr::get_state_flag_string (VRButtonStateFlags flags)
 convert flags to string
 
std::string vr::get_status_string (VRStatus status)
 convert flags to string
 

Variables

const unsigned vr::max_nr_controllers = 8
 maximum number of attachable controller and tracker devices
 
const unsigned vr::max_nr_controller_inputs = 5
 maximum number of inputs per controller
 
const unsigned vr::max_nr_controller_axes = 8
 maximum number of axes per controller
 

Detailed Description

defines types to store the state vr::vr_kit_state of a vr kit, which is split into sub states for the hmd (vr::vr_trackable_state) and the two controllers (vr::vr_conroller_state).

Definition in file vr_state.h.