3#include <cgv/base/base.h>
5#include <cg_vr/vr_server.h>
7#include <cgv_gl/box_renderer.h>
8#include <cgv_gl/sphere_renderer.h>
9#include <cgv_gl/gl/mesh_render_info.h>
10#include <plugins/crg_stereo_view/stereo_view_interactor.h>
112 void calibrate_driver();
116 void set_tracking_rotation(
float tr) {
117 tracking_rotation = tr;
120 float get_tracking_rotation() {
121 return tracking_rotation;
123 void set_tracking_origin(
cgv::vec3 ori) {
124 tracking_origin = ori;
128 return tracking_origin;
150 int rendered_display_index;
155 bool debug_vr_events;
158 VRkitVisType vis_type, hmd_vis_type, controller_vis_type, tracker_vis_type, base_vis_type;
159 bool show_action_zone;
160 cgv::rgb fence_color1, fence_color2;
161 float fence_frequency;
162 float fence_line_width;
165 void* current_vr_handle;
166 int current_vr_handle_index;
167 std::string kit_enum_definition;
169 std::vector<vr::vr_kit_state> kit_states;
171 std::vector<void*> new_kits;
173 std::vector<void*> kits;
175 std::vector<void*> old_kits;
185 std::string hmd_mesh_file_name, controller_mesh_file_name, tracker_mesh_file_name, base_mesh_file_name;
187 float mesh_scales[4];
189 vr::vr_kit* get_vr_kit_from_index(
int i)
const;
191 void configure_kits();
195 virtual void on_device_change(
void* handle,
bool attach);
197 void add_trackable_spheres(
const float* pose,
int i, std::vector<cgv::vec4>& spheres, std::vector<cgv::rgb>& sphere_colors);
202 std::string get_type_name()
const;
213 void enable_vr_event_debugging(
bool enable =
true);
219 void query_vr_states();
228 cgv::dvec3 get_view_dir_of_kit(
int vr_kit_idx = -1)
const;
233 cgv::dvec3 get_view_up_dir_of_kit(
int vr_kit_idx = -1)
const;
242 cgv::dvec3 get_eye_of_kit(
int eye = 0,
int vr_kit_idx = -1)
const;
250 void draw_separate_view(
bool do_draw);
254 void draw_vr_kits(
bool do_draw);
256 void draw_vr_controllers(
bool do_draw);
260 void draw_action_zone(
bool do_draw);
264 void enable_blit_vr_views(
bool enable);
268 void set_blit_vr_view_width(
int width);
284 void on_set(
void* member_ptr);
286 void stream_stats(std::ostream&);
296 void stream_help(std::ostream& os);
318#include <cgv/config/lib_end.h>
the self reflection handler is passed to the virtual self_reflect() method of cgv::base::base.
renderer that supports point splatting
base class for all drawables, which is independent of the used rendering API.
implements offscreen rendering
base class with write access to driver calibration matrix
a vr kit is composed of headset, two controllers, and two trackers, where all devices can be attached...
extends the stereo view interactor for vr support
int get_rendered_eye() const
return the currently rendered eye
bool blit_vr_views_enabled() const
check whether vr views are blitted
vr::gl_vr_display * get_rendered_display() const
return the vr kit currently rendered return a pointer to the current vr kit
cgv::vec3 head_tracker_position
head position from tracker location
float tracking_rotation
rotation angle around the y-axis
vr::vr_kit * get_rendered_vr_kit() const
return pointer to rendered vr kit or nullptr if birds eye view is rendered
bool separate_view
whether the window shows a separate view onto the scene or the one of the current vr kit
int pose_query
type of pose query according to vr::vr_kit::query_state function's 2nd parameter
int get_rendered_vr_kit_index() const
return index of rendered vr kit or -1 if birds eye view is rendered
float blit_aspect_scale
scale of aspect ratio used for blitting
cgv::vec3 tracking_rotation_origin
location in tracking coordinate system around which rotation is defined
std::string calibration_file_path
path to calibration file
cgv::mat3 head_tracker_orientation
head orientation from tracker orientation
bool vr_event_debugging_enabled() const
check whether vr events are printed to the console window
cgv::vec3 tracking_origin
origin of tracking coordinate system given in world coordinates
bool action_zone_drawn() const
check whether action zone is drawn
int get_blit_vr_view_width() const
return width of vr view blitting
bool blit_vr_views
whether to blit in the views of the vr kits
bool seperate_view_drawn() const
check whether separate view is rendered
int none_separate_view
selection of view of current hmd used in case of no separate view (1 ... left, 2 ....
int rendered_eye
rendered_eye: 0...monitor,1...left eye,2...right eye
bool dont_render_kits
whether to not render for kits
bool vr_kits_drawn() const
check whether vr kits are drawn
CGV_API cgv::reflect::enum_reflection_traits< VRkitVisType > get_reflection_traits(const VRkitVisType &gm)
support reflection of enum names
VREventTypeFlags
flags to define which events should be generated by server
VRStatus
different status values for a trackable
this type specific reflection traits class is used by the reflect_enum function to reflect enum types
render style for sphere rendere
structure that stores all information describing the state of a VR kit
defines the class vr::vr_driver class and gives access to the driver registry with the functions vr::...