cgv
Loading...
Searching...
No Matches
vr_info.h
1#pragma once
2
3#include <iostream>
4#include <map>
5#include "vr_state.h"
6
7#include "lib_begin.h"
8
11
13namespace vr {
15 struct CGV_API vr_device_info
16 {
18 std::string serial_number;
20 std::string model_number;
22 std::map<std::string, std::string> variable_parameters;
25 };
26
28 extern CGV_API std::ostream& operator << (std::ostream& os, const vr_device_info& DI);
29
48
50 extern CGV_API std::ostream& operator << (std::ostream& os, const vr_trackable_info& TI);
51
53 struct CGV_API vr_hmd_info : public vr_trackable_info
54 {
60 float fps;
62 float ipd;
67 /*
69 float imu_to_head_transform[12];
71 float imu_gyro_bias[3];
73 float imu_gyro_scale[3];
75 float imu_accelerometer_bias[3];
77 float imu_accelerometer_scale[3];
78 */
83 };
85 extern CGV_API std::ostream& operator << (std::ostream& os, const vr_hmd_info& HI);
86
89 VRC_NONE = 0,
90 VRC_CONTROLLER = 1,
91 VRC_TRACKER = 2
92 };
95 VRC_NOT_ASSIGNED = 0,
96 VRC_LEFT_HAND,
97 VRC_RIGHT_HAND,
98 VRC_TREADMILL,
99 VRC_STYLUS,
100 VRC_ROLE_END
101 };
104 VRI_NONE,
105 VRI_TRIGGER,
106 VRI_PAD,
107 VRI_STICK
108 };
111 VRA_NONE = 0,
112 VRA_TRIGGER = 1,
113 VRA_PAD_X = 2,
114 VRA_PAD_Y = 3,
115 VRA_STICK_X = 4,
116 VRA_STICK_Y = 5
117 };
142 extern CGV_API std::ostream& operator << (std::ostream& os, const vr_controller_info& CI);
143
157 extern CGV_API std::ostream& operator << (std::ostream& os, const vr_kit_info& VI);
158
161 {
163 std::string mode;
165 float z_near, z_far;
167 float frustum[4];
170 };
172 extern CGV_API std::ostream& operator << (std::ostream& os, const vr_tracking_reference_info& TI);
173
176 {
178 std::string name;
180 std::map<std::string, vr_tracking_reference_info> references;
183 };
185 extern CGV_API std::ostream& operator << (std::ostream& os, const vr_tracking_system_info& TSI);
186}
187
the vr namespace for virtual reality support
VRControllerType
type of controller
Definition vr_info.h:88
VRButtonStateFlags
one flag for each vr controller button
Definition vr_state.h:62
const unsigned max_nr_controller_axes
maximum number of axes per controller
Definition vr_state.h:23
VRAxisType
different axis types of controller inputs
Definition vr_info.h:110
const unsigned max_nr_controllers
maximum number of attachable controller and tracker devices
Definition vr_state.h:19
VRInputType
different controller input types
Definition vr_info.h:103
std::ostream & operator<<(std::ostream &os, const vr_device_info &di)
stream out operator for device infos
Definition vr_info.cxx:10
const unsigned max_nr_controller_inputs
maximum number of inputs per controller
Definition vr_state.h:21
VRControllerRole
role of controller
Definition vr_info.h:94
information provided for controller devices
Definition vr_info.h:120
int32_t nr_axes
total number of axes provided by all inputs
Definition vr_info.h:130
VRControllerType type
controller type
Definition vr_info.h:122
VRButtonStateFlags supported_buttons
one flag per button telling whether it is supported
Definition vr_info.h:137
VRControllerRole role
controller role
Definition vr_info.h:124
int32_t nr_inputs
number of used inputs
Definition vr_info.h:126
information provided for any device type
Definition vr_info.h:16
std::string serial_number
unique identifier of device
Definition vr_info.h:18
std::string model_number
number describing the device type
Definition vr_info.h:20
std::map< std::string, std::string > variable_parameters
a map from parameter name to parameter value used for all device parameters that are not explicitly d...
Definition vr_info.h:22
information provided for hmd device
Definition vr_info.h:54
float fps
frame rate
Definition vr_info.h:60
bool reports_time_since_vsynch
whether time since vsynch is reported
Definition vr_info.h:56
float ipd
interpupilar distance measured in meters
Definition vr_info.h:62
bool lighthouse_2_0_features
whether lighthouse 2.0 features are supported
Definition vr_info.h:80
float seconds_vsynch_to_photons
seconds from vsynch to photons
Definition vr_info.h:58
float head_to_eye_distance
distance from head origin to eye centers in meters
Definition vr_info.h:64
int32_t number_cameras
number of cameras
Definition vr_info.h:66
information provided for a vr kit
Definition vr_info.h:146
vr_hmd_info hmd
information for head mounted display
Definition vr_info.h:150
bool force_feedback_support
whether force feedback is supported
Definition vr_info.h:148
information provided for trackable devices
Definition vr_info.h:32
bool provides_battery_charge_level
whether one can query battery charge level
Definition vr_info.h:40
bool has_proximity_sensor
whether device has proximity sensor
Definition vr_info.h:44
float battery_charge_level
battery charge level in percentage (0 .. empty, 1 .. full)
Definition vr_info.h:42
std::string device_type
type name of device
Definition vr_info.h:34
int32_t device_class
index of device class
Definition vr_info.h:36
bool is_wireless
whether device is wireless
Definition vr_info.h:38
information provided for a base station / tracking reference
Definition vr_info.h:161
float z_near
near and far clipping planes of tracking frustum in meters
Definition vr_info.h:165
std::string mode
tracking mode string
Definition vr_info.h:163
information provided for tracking system
Definition vr_info.h:176
std::string name
name of tracking system
Definition vr_info.h:178
std::map< std::string, vr_tracking_reference_info > references
map from serial number to info of corresponding tracking reference
Definition vr_info.h:180
defines types to store the state vr::vr_kit_state of a vr kit, which is split into sub states for the...