|
cgv
|
Public Member Functions | |
| vr_emulated_kit (float _body_direction, const cgv::vec3 &_body_position, float _body_height, unsigned _width, unsigned _height, vr::vr_driver *_driver, void *_handle, const std::string &_name, int _nr_trackers) | |
| cgv::vec3 | get_body_direction () const |
| const std::vector< std::pair< int, int > > & | get_controller_throttles_and_sticks (int controller_index) const |
| const std::vector< std::pair< float, float > > & | get_controller_throttles_and_sticks_deadzone_and_precision (int controller_index) const |
| bool | set_vibration (unsigned controller_index, float low_frequency_strength, float high_frequency_strength) |
| set the vibration strength between 0 and 1 of low and high frequency motors, return false if device is not connected anymore | |
| void | put_eye_to_head_matrix (int eye, float *pose_matrix) const |
| access to 3x4 matrix in column major format for transformation from eye (0..left, 1..right) to head coordinates | |
| void | put_projection_matrix (int eye, float z_near, float z_far, float *projection_matrix, const float *hmd_pose) const |
| access to 4x4 matrix in column major format for perspective transformation from eye (0..left, 1..right) | |
| void | submit_frame () |
| submit the rendered stereo frame to the hmd | |
Public Member Functions inherited from vr::vr_kit | |
| const vr_driver * | get_driver () const |
| return driver | |
| void * | get_handle () const |
| return handle of vr kit | |
| vr_camera * | get_camera () const |
| return camera or nullptr if not available | |
| const std::string & | get_name () const |
| return name of vr_kit | |
| virtual | ~vr_kit () |
| declare virtual destructor | |
| const vr_kit_info & | get_device_info () const |
| return information on the currently attached devices | |
| virtual void | set_controller_input_config (int controller_index, int input_index, const controller_input_config &cic) |
| set the configuration of a controller input | |
| const controller_input_config & | get_controller_input_config (int controller_index, int input_index) const |
| query the configuration of a controller input | |
| bool | query_state (vr_kit_state &state, int pose_query=2) |
| query current state of vr kit and return whether this was successful | |
| virtual void | put_world_to_eye_transform (int eye, const float *hmd_pose, float *modelview_matrix) const |
| access to 4x4 modelview transformation matrix of given eye in column major format, which is computed in default implementation from given 3x4 pose matrix and eye to head transformation | |
Public Member Functions inherited from vr::gl_vr_display | |
| gl_vr_display (unsigned _width, unsigned _height, unsigned _nr_multi_samples) | |
| construct | |
| virtual | ~gl_vr_display () |
| declare virtual destructor | |
| const std::string & | get_last_error () const |
| return last error of vr_kit | |
| int | get_width () const |
| return width in pixel of view | |
| int | get_height () const |
| return height in pixel of view | |
| virtual void | set_size (int new_width, int new_height) |
| allow to set a different size | |
| virtual bool | init_fbos (EyeSelection es=ES_BOTH) |
| initialize render targets and framebuffer objects in current opengl context | |
| virtual bool | blit_fbo (int eye, int x, int y, int w, int h) |
| initialize render targets and framebuffer objects in current opengl context | |
| virtual bool | fbos_initialized (EyeSelection es=ES_BOTH) const |
| check whether fbos have been initialized | |
| virtual void | destruct_fbos (EyeSelection es=ES_BOTH) |
| destruct render targets and framebuffer objects in current opengl context | |
| virtual void | enable_fbo (int eye) |
| enable the framebuffer object of given eye (0..left, 1..right) | |
| virtual void | disable_fbo (int eye) |
| disable the framebuffer object of given eye | |
| virtual void | bind_texture (int eye) |
| bind texture of given eye to current texture unit | |
Protected Types | |
| typedef cgv::math::quaternion< float > | quat |
Protected Member Functions | |
| cgv::mat3x4 | construct_pos_matrix (const quat &orientation, const cgv::vec3 &position) |
| helper functions to construct matrices | |
| cgv::mat4 | construct_homogeneous_matrix (const quat &orientation, const cgv::vec3 &position) |
| void | set_pose_matrix (const cgv::mat4 &H, float *pose) const |
| void | compute_state_poses () |
| bool | query_state_impl (vr::vr_kit_state &state, int pose_query=2) |
| derived kits implement this without caring about calibration; vr_kit::query_state() will apply driver calibration | |
Protected Member Functions inherited from vr::vr_kit | |
| void | destruct_camera () |
| destruct camera | |
| vr_trackable_state & | ref_tracking_reference_state (const std::string &serial_nummer) |
| write access to the state of the tracking reference with given serial number | |
| vr_tracking_system_info & | ref_tracking_system_info () |
| write access to tracking system info | |
| void | clear_tracking_reference_states () |
| remove all reference states | |
| void | mark_tracking_references_as_untracked () |
| mark all reference states as untracked | |
| vr_kit (vr_driver *_driver, void *_handle, const std::string &_name, unsigned _width, unsigned _height, unsigned _nr_multi_samples=4) | |
| construct | |
Protected Attributes | |
| vr::vr_kit_state | state |
| float | body_direction |
| float | body_height |
| float | hip_parameter |
| float | yaw_parameter |
| float | fovy |
| cgv::vec3 | body_position |
| cgv::vec3 | hand_position [2] |
| quat | hand_orientation [2] |
| cgv::vec3 | tracker_positions [4] |
| quat | tracker_orientations [4] |
| bool | tracker_enabled [4] |
| TrackerAttachment | tracker_attachments [4] |
Protected Attributes inherited from vr::vr_kit | |
| vr_driver * | driver |
| pointer to driver that created the vr kit | |
| void * | handle |
| handle for internal use | |
| vr_camera * | camera |
| pointer to camera | |
| bool | skip_calibration |
| whether to skip driver calibration - defaults to false | |
| std::string | name |
| name in case driver provides this information (not reliable) | |
| vr_kit_info | info |
| store vr kit info to be filled and updated by driver implementations | |
| controller_input_config | input_configs [4][5] |
| store controller input configs per controller and input | |
Protected Attributes inherited from vr::gl_vr_display | |
| unsigned | width |
| pixel dimensions of render targets | |
| unsigned | height |
| unsigned | nr_multi_samples |
| unsigned | multi_depth_buffer_id [2] |
| ids of gl render objects | |
| unsigned | multi_tex_id [2] |
| unsigned | multi_fbo_id [2] |
| unsigned | tex_id [2] |
| unsigned | fbo_id [2] |
| std::string | last_error |
| store last error message | |
Friends | |
| class | vr_emulator |
Definition at line 30 of file vr_emulator.h.
|
protected |
Definition at line 35 of file vr_emulator.h.
| vr_emulated_kit::vr_emulated_kit | ( | float | _body_direction, |
| const cgv::vec3 & | _body_position, | ||
| float | _body_height, | ||
| unsigned | _width, | ||
| unsigned | _height, | ||
| vr::vr_driver * | _driver, | ||
| void * | _handle, | ||
| const std::string & | _name, | ||
| int | _nr_trackers | ||
| ) |
Definition at line 118 of file vr_emulator.cxx.
|
protected |
Definition at line 61 of file vr_emulator.cxx.
|
protected |
Definition at line 39 of file vr_emulator.cxx.
|
protected |
helper functions to construct matrices
Definition at line 27 of file vr_emulator.cxx.
References cgv::math::fmat< T, N, M >::col(), cgv::math::quaternion< T >::put_matrix(), and cgv::math::fmat< T, N, M >::set_col().
| cgv::vec3 vr_emulated_kit::get_body_direction | ( | ) | const |
Definition at line 51 of file vr_emulator.cxx.
| const std::vector< std::pair< int, int > > & vr_emulated_kit::get_controller_throttles_and_sticks | ( | int | controller_index | ) | const |
Definition at line 179 of file vr_emulator.cxx.
| const std::vector< std::pair< float, float > > & vr_emulated_kit::get_controller_throttles_and_sticks_deadzone_and_precision | ( | int | controller_index | ) | const |
Definition at line 191 of file vr_emulator.cxx.
|
virtual |
access to 3x4 matrix in column major format for transformation from eye (0..left, 1..right) to head coordinates
Implements vr::vr_kit.
Definition at line 242 of file vr_emulator.cxx.
|
virtual |
access to 4x4 matrix in column major format for perspective transformation from eye (0..left, 1..right)
pose matrix is not needed for most vr kits and can be set to nullptr; only in case of wall based vr kits the pose matrix needs to be specified
Implements vr::vr_kit.
Definition at line 252 of file vr_emulator.cxx.
References vr::gl_vr_display::width.
|
protectedvirtual |
derived kits implement this without caring about calibration; vr_kit::query_state() will apply driver calibration
Implements vr::vr_kit.
Definition at line 218 of file vr_emulator.cxx.
References vr::vr_kit_state::controller, vr::vr_kit::get_driver(), vr::vr_kit_state::hmd, vr::vr_trackable_state::pose, and cgv::math::quaternion< T >::put_matrix().
|
protected |
Definition at line 202 of file vr_emulator.cxx.
|
virtual |
set the vibration strength between 0 and 1 of low and high frequency motors, return false if device is not connected anymore
Implements vr::vr_kit.
Definition at line 235 of file vr_emulator.cxx.
References vr::vr_kit_state::controller, vr::vr_kit_info::force_feedback_support, vr::vr_kit::info, and vr::vr_controller_state::vibration.
|
virtual |
submit the rendered stereo frame to the hmd
Implements vr::vr_kit.
Definition at line 258 of file vr_emulator.cxx.
|
friend |
Definition at line 33 of file vr_emulator.h.
|
protected |
Definition at line 36 of file vr_emulator.h.
|
protected |
Definition at line 37 of file vr_emulator.h.
|
protected |
Definition at line 41 of file vr_emulator.h.
|
protected |
Definition at line 40 of file vr_emulator.h.
|
protected |
Definition at line 44 of file vr_emulator.h.
|
protected |
Definition at line 43 of file vr_emulator.h.
|
protected |
Definition at line 38 of file vr_emulator.h.
|
protected |
Definition at line 34 of file vr_emulator.h.
|
protected |
Definition at line 49 of file vr_emulator.h.
|
protected |
Definition at line 48 of file vr_emulator.h.
|
protected |
Definition at line 47 of file vr_emulator.h.
|
protected |
Definition at line 46 of file vr_emulator.h.
|
protected |
Definition at line 39 of file vr_emulator.h.