Go to the documentation of this file.
26 #include "lib_begin.h"
40 void set_driver_calibration_matrix(
vr_driver* driver,
const float calibration_matrix[12])
const;
60 unsigned driver_index;
63 void set_index(
unsigned _idx);
66 void register_vr_kit(
void* handle,
vr_kit* kit);
68 void replace_vr_kit(
void* handle,
vr_kit* kit);
71 std::map<std::string, vr_trackable_state> tracking_reference_states;
73 mutable std::map<std::string, vr_trackable_state> calibrated_tracking_reference_states;
82 void clear_tracking_reference_states();
84 void mark_tracking_references_as_untracked();
87 float calibration_matrix[12];
89 bool use_calibration_matrix;
92 void set_calibration_transformation(
const float new_transformation_matrix[12]);
111 void put_x_direction(
float* x_dir)
const;
122 void put_calibration_transformation(
float transformation_matrix[12])
const;
124 void calibrate_pose(
float(&pose)[12])
const;
126 void enable_calibration_transformation();
128 void disable_calibration_transformation();
130 bool is_calibration_transformation_enabled()
const;
134 virtual const std::map<std::string, vr_trackable_state>& get_tracking_reference_states()
const;
143 template <
typename T>
170 #include <cgv/config/lib_end.h>
virtual float get_floor_level() const =0
return the floor level relativ to the world origin
bool replace_by_pointer(vr_kit *old_kit_ptr, vr_kit *new_kit_ptr)
scan vr kits and if one with given pointer exists, replace it by passed kit; return whether replaceme...
Definition: vr_driver.cxx:204
the vr namespace for virtual reality support
Definition: gl_vr_display.cxx:5
base class with write access to driver calibration matrix
Definition: vr_driver.h:37
vr_tracking_system_info tracking_system_info
store tracking system info to be filled by driver implementations
Definition: vr_driver.h:78
a vr kit is composed of headset, two controllers, and two trackers, where all devices can be attached...
Definition: vr_kit.h:69
class CGV_API vr_driver
forward declaration of vr driver class
Definition: vr_driver.h:33
interface class for vr drivers.
Definition: vr_driver.h:57
virtual vr_kit * replace_by_index(int &index, vr_kit *new_kit_ptr)=0
scan all connected vr kits and return a vector with their ids
virtual bool is_installed() const =0
return whether driver is installed
virtual std::string get_driver_name() const =0
return name of driver
a trackable knows whether it is tracked and its 6d pose stored as 3x4 matrix in column major format
Definition: vr_state.h:94
vr_kit * get_vr_kit(void *handle)
query a pointer to a vr kit by its device handle, function can return null pointer in case that no vr...
Definition: vr_driver.cxx:212
bool unregister_vr_kit(void *handle, vr_kit *vr_kit_ptr)
unregister a previously registered vr kit by handle and pointer
Definition: vr_driver.cxx:220
vr_kit * replace_by_index(int vr_kit_index, vr_kit *new_kit_ptr)
scan vr kits and if one of given index exists replace it by passed kit and return index to replaced k...
Definition: vr_driver.cxx:195
virtual float get_action_zone_height() const =0
return height of action zone in meters
virtual void put_up_direction(float *up_dir) const =0
put a 3d up direction into passed array
virtual bool replace_by_pointer(vr_kit *old_kit_ptr, vr_kit *new_kit_ptr)=0
scan all connected vr kits and return a vector with their ids
virtual void put_action_zone_bounary(std::vector< float > &boundary) const =0
return a vector of floor points defining the action zone boundary as a closed polygon
std::vector< void * > scan_vr_kits()
iterate all registered vr drivers to scan for vr kits and return vector of vr kit handles
Definition: vr_driver.cxx:185
virtual std::vector< void * > scan_vr_kits()=0
scan all connected vr kits and return a vector with their ids
void register_driver(vr_driver *vrd)
register a new driver
Definition: vr_driver.cxx:173
use this template to register your own driver
Definition: vr_driver.h:145
std::vector< vr_driver * > & get_vr_drivers()
return a vector with all registered vr drivers
Definition: vr_driver.cxx:179
information provided for tracking system
Definition: vr_info.h:176