15 os << pp.first <<
" = " << pp.second << std::endl;
28 os << static_cast<const vr_device_info&>(TI);
29 os <<
"device_type = " << TI.
device_type << std::endl;
32 os <<
"is wireless" << std::endl;
36 os <<
"has proximity sensor" << std::endl;
59 void stream_vec3(std::ostream& os,
const float vec[3])
62 for (
int i = 0; i < 3; ++i) {
67 os <<
"]" << std::endl;
69 void stream_pose(std::ostream& os,
const float mat[12])
72 for (
int i = 0; i < 3; ++i) {
74 for (
int j = 0; j < 4; ++j)
75 os << std::setw(9) << std::setprecision(3) << mat[i + 3 * j];
81 os << static_cast<const vr_trackable_info&>(HI);
84 os <<
"fps = " << HI.
fps << std::endl;
85 os <<
"ipd = " << HI.
ipd << std::endl;
103 os <<
"has lighthouse 2.0 features" << std::endl;
118 const char* controller_type_strings[] = {
"none",
"controller",
"tracker" };
119 const char* input_type_strings[] = {
"none",
"trigger",
"pad",
"strick" };
120 const char* axis_type_strings[] = {
"none",
"trigger",
"pad_x",
"pad_y",
"strick_x",
"stick_y" };
121 os <<
"type = " << controller_type_strings[CI.
type] << std::endl;
122 os << static_cast<const vr_trackable_info&>(CI);
124 os <<
"no inputs provided" << std::endl;
126 os <<
"input types = [";
132 os <<
"]" << std::endl;
133 os <<
"axis types = [";
134 for (
int ai = 0; ai < CI.
nr_axes; ++ai) {
137 os << axis_type_strings[CI.
axis_type[ai]];
139 os <<
"]" << std::endl;
150 os <<
"VR KIT\n->HMD\n" << VI.
hmd;
152 os <<
"->CONTROLLER[" << ci <<
"]\n" << VI.
controller[ci];
170 os << static_cast<const vr_trackable_info&>(TI);
171 os <<
"tracking mode = " << TI.
mode << std::endl;
172 os <<
"z range = [" << TI.
z_near <<
", " << TI.z_far <<
"]" << std::endl;
173 os <<
"frustum = [" << TI.
frustum[0] <<
", " << TI.
frustum[1] <<
", "
183 os <<
"tracking system name = " << TSI.
name << std::endl;
185 os <<
"tracking reference " << rr.first <<
" {" << std::endl;
186 os << rr.second <<
"}" << std::endl;
the vr namespace for virtual reality support
VRButtonStateFlags
one flag for each vr controller button
const unsigned max_nr_controller_axes
maximum number of axes per controller
const unsigned max_nr_controllers
maximum number of attachable controller and tracker devices
std::string get_state_flag_string(VRButtonStateFlags flags)
convert flags to string
std::ostream & operator<<(std::ostream &os, const vr_device_info &di)
stream out operator for device infos
const unsigned max_nr_controller_inputs
maximum number of inputs per controller
information provided for controller devices
vr_controller_info()
construct with default
int32_t nr_axes
total number of axes provided by all inputs
VRControllerType type
controller type
VRButtonStateFlags supported_buttons
one flag per button telling whether it is supported
VRInputType input_type[max_nr_controller_inputs]
type of up to 5vr::max_nr_controller_inputs inputs built into the controller
VRAxisType axis_type[max_nr_controller_axes]
axis type for each of the vr::max_nr_controller_axes axes in the state
int32_t nr_inputs
number of used inputs
information provided for any device type
std::string serial_number
unique identifier of device
vr_device_info()
construct empty info
std::string model_number
number describing the device type
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...
information provided for hmd device
bool reports_time_since_vsynch
whether time since vsynch is reported
float ipd
interpupilar distance measured in meters
bool lighthouse_2_0_features
whether lighthouse 2.0 features are supported
vr_hmd_info()
construct with default values
float seconds_vsynch_to_photons
seconds from vsynch to photons
float head_to_eye_distance
distance from head origin to eye centers in meters
int32_t number_cameras
number of cameras
information provided for a vr kit
vr_kit_info()
construct with default values
vr_hmd_info hmd
information for head mounted display
vr_controller_info controller[max_nr_controllers]
information for attached controllers and trackers
information provided for trackable devices
bool provides_battery_charge_level
whether one can query battery charge level
bool has_proximity_sensor
whether device has proximity sensor
float battery_charge_level
battery charge level in percentage (0 .. empty, 1 .. full)
std::string device_type
type name of device
int32_t device_class
index of device class
bool is_wireless
whether device is wireless
vr_trackable_info()
construct with default values
information provided for a base station / tracking reference
vr_tracking_reference_info()
construct with default values
float frustum[4]
frustum relative to z_near in the order left, right, bottom, up
float z_near
near and far clipping planes of tracking frustum in meters
std::string mode
tracking mode string
information provided for tracking system
vr_tracking_system_info()
construct with default values
std::string name
name of tracking system
std::map< std::string, vr_tracking_reference_info > references
map from serial number to info of corresponding tracking reference