6#include "gl_vr_display.h"
86 void destruct_camera();
92 void clear_tracking_reference_states();
94 void mark_tracking_references_as_untracked();
98 vr_kit(
vr_driver* _driver,
void* _handle,
const std::string& _name,
unsigned _width,
unsigned _height,
unsigned _nr_multi_samples = 4);
103 void* get_handle()
const;
107 const std::string& get_name()
const;
118 virtual void set_controller_input_config(
int controller_index,
int input_index,
const controller_input_config& cic);
131 bool query_state(
vr_kit_state& state,
int pose_query = 2);
133 virtual bool set_vibration(
unsigned controller_index,
float low_frequency_strength,
float high_frequency_strength) = 0;
139 virtual void put_projection_matrix(
int eye,
float z_near,
float z_far,
float* projection_matrix,
const float* hmd_pose = 0)
const = 0;
141 virtual void put_world_to_eye_transform(
int eye,
const float* hmd_pose,
float* modelview_matrix)
const;
149#include <cgv/config/lib_end.h>
implements offscreen rendering
interface for mono or stereo cameras in VR headsets
interface class for vr drivers.
a vr kit is composed of headset, two controllers, and two trackers, where all devices can be attached...
vr_kit_info info
store vr kit info to be filled and updated by driver implementations
virtual bool set_vibration(unsigned controller_index, float low_frequency_strength, float high_frequency_strength)=0
set the vibration strength between 0 and 1 of low and high frequency motors, return false if device i...
void * handle
handle for internal use
bool skip_calibration
whether to skip driver calibration - defaults to false
vr_driver * driver
pointer to driver that created the vr kit
virtual bool query_state_impl(vr_kit_state &state, int pose_query)=0
derived kits implement this without caring about calibration; vr_kit::query_state() will apply driver...
virtual void put_eye_to_head_matrix(int eye, float *pose_matrix) const =0
access to 3x4 matrix in column major format for transformation from eye (0..left, 1....
vr_camera * camera
pointer to camera
virtual void submit_frame()=0
submit the rendered stereo frame to the hmd
std::string name
name in case driver provides this information (not reliable)
virtual void put_projection_matrix(int eye, float z_near, float z_far, float *projection_matrix, const float *hmd_pose=0) const =0
access to 4x4 matrix in column major format for perspective transformation from eye (0....
the vr namespace for virtual reality support
class CGV_API vr_driver
forward declaration of vr driver class
information provided for a vr kit
structure that stores all information describing the state of a VR kit
a trackable knows whether it is tracked and its 6d pose stored as 3x4 matrix in column major format
information provided for tracking system
defines camera class for camera provided by vr_kit
defines types to store the state vr::vr_kit_state of a vr kit, which is split into sub states for the...