cgv
Loading...
Searching...
No Matches
vr Namespace Reference

the vr namespace for virtual reality support More...

Classes

struct  controller_input_config
 configuration of a controller input axis More...
 
struct  driver_registry
 use this template to register your own driver More...
 
class  gl_vr_display
 implements offscreen rendering More...
 
class  vr_calibration_base
 base class with write access to driver calibration matrix More...
 
class  vr_camera
 interface for mono or stereo cameras in VR headsets More...
 
struct  vr_controller_info
 information provided for controller devices More...
 
struct  vr_controller_state
 Extends the trackable state by information on the buttons, input axes and vibration strengths. More...
 
struct  vr_device_info
 information provided for any device type More...
 
class  vr_driver
 interface class for vr drivers. More...
 
struct  vr_hmd_info
 information provided for hmd device More...
 
class  vr_kit
 a vr kit is composed of headset, two controllers, and two trackers, where all devices can be attached or detached More...
 
struct  vr_kit_info
 information provided for a vr kit More...
 
struct  vr_kit_state
 structure that stores all information describing the state of a VR kit More...
 
class  vr_log
 helper struct for logging vr events More...
 
struct  vr_trackable_info
 information provided for trackable devices More...
 
struct  vr_trackable_state
 a trackable knows whether it is tracked and its 6d pose stored as 3x4 matrix in column major format More...
 
struct  vr_tracking_reference_info
 information provided for a base station / tracking reference More...
 
struct  vr_tracking_system_info
 information provided for tracking system More...
 

Enumerations

enum  EyeSelection { ES_BOTH , ES_LEFT , ES_RIGHT }
 enum to support restriction of eyes to a single eye More...
 
enum  CameraState { CS_UNINITIALIZED , CS_INITIALIZED , CS_STARTED }
 different status values for a vr camera More...
 
enum  CameraFrameFormat { CFF_RGBA = 0 }
 currently only a single frame format supported More...
 
enum  CameraFrameSplit { CFS_NONE = 0 , CFS_VERTICAL , CFS_HORIZONTAL }
 in case of stereo cameras a frame contains images of both eyes either split vertically (left right) or horizontally (top bottom) More...
 
enum  VRControllerType { VRC_NONE = 0 , VRC_CONTROLLER = 1 , VRC_TRACKER = 2 }
 type of controller More...
 
enum  VRControllerRole {
  VRC_NOT_ASSIGNED = 0 , VRC_LEFT_HAND , VRC_RIGHT_HAND , VRC_TREADMILL ,
  VRC_STYLUS , VRC_ROLE_END
}
 role of controller More...
 
enum  VRInputType { VRI_NONE , VRI_TRIGGER , VRI_PAD , VRI_STICK }
 different controller input types More...
 
enum  VRAxisType {
  VRA_NONE = 0 , VRA_TRIGGER = 1 , VRA_PAD_X = 2 , VRA_PAD_Y = 3 ,
  VRA_STICK_X = 4 , VRA_STICK_Y = 5
}
 different axis types of controller inputs More...
 
enum  KeyAction { KA_RELEASE , KA_PRESS , KA_REPEAT }
 repeated definition from cgv/gui/key_event.h More...
 
enum  VRKeys {
  VR_UNKNOWN = 1024 , VR_SYSTEM , VR_MENU , VR_GRIP ,
  VR_DPAD_DOWN_LEFT , VR_DPAD_DOWN , VR_DPAD_DOWN_RIGHT , VR_DPAD_LEFT ,
  VR_DPAD_RIGHT , VR_DPAD_UP_LEFT , VR_DPAD_UP , VR_DPAD_UP_RIGHT ,
  VR_A , VR_INPUT0_TOUCH , VR_INPUT0 , VR_INPUT1_TOUCH ,
  VR_INPUT1 , VR_INPUT2_TOUCH , VR_INPUT2 , VR_INPUT3_TOUCH ,
  VR_INPUT3 , VR_INPUT4_TOUCH , VR_INPUT4 , VR_PROXIMITY ,
  VR_END , VR_BEGIN =VR_SYSTEM
}
 enumerate all VR keys starting at 1024 More...
 
enum  VRButtonStateFlags {
  VRF_SYSTEM = 0x000001 , VRF_MENU = 0x000002 , VRF_GRIP = 0x000004 , VRF_DPAD_LEFT = 0x000008 ,
  VRF_DPAD_RIGHT = 0x000010 , VRF_DPAD_DOWN = 0x000020 , VRF_DPAD_UP = 0x000040 , VRF_A = 0x000080 ,
  VRF_INPUT0_TOUCH = 0x000100 , VRF_INPUT0 = 0x000200 , VRF_INPUT1_TOUCH = 0x000400 , VRF_INPUT1 = 0x000800 ,
  VRF_INPUT2_TOUCH = 0x001000 , VRF_INPUT2 = 0x002000 , VRF_INPUT3_TOUCH = 0x004000 , VRF_INPUT3 = 0x008000 ,
  VRF_INPUT4_TOUCH = 0x010000 , VRF_INPUT4 = 0x020000 , VRF_PROXIMITY = 0x040000
}
 one flag for each vr controller button More...
 
enum  VRStatus { VRS_DETACHED , VRS_ATTACHED , VRS_TRACKED }
 different status values for a trackable More...
 
enum  VRMeshId { VRM_HMD , VRM_CONTROLLER , VRM_TRACKER , VRM_BASE }
 enumerate for different mesh types More...
 

Functions

std::map< void *, vr_kit * > & ref_vr_kit_map ()
 access to vr_kit map singleton
 
std::vector< vr_driver * > & ref_drivers ()
 return registered drivers
 
std::ostream & operator<< (std::ostream &os, const vr_device_info &di)
 stream out operator for device infos
 
std::ostream & operator<< (std::ostream &os, const vr_trackable_info &TI)
 stream out operator for trackable device infos
 
void stream_vec3 (std::ostream &os, const float vec[3])
 
void stream_pose (std::ostream &os, const float mat[12])
 
std::ostream & operator<< (std::ostream &os, const vr_hmd_info &HI)
 stream out operator for hmd device infos
 
std::ostream & operator<< (std::ostream &os, const vr_controller_info &CI)
 stream out operator for controller device infos
 
std::ostream & operator<< (std::ostream &os, const vr_kit_info &VI)
 stream out operator for vr kit info
 
std::ostream & operator<< (std::ostream &os, const vr_tracking_reference_info &TI)
 stream out operator for tracking reference device infos
 
std::ostream & operator<< (std::ostream &os, const vr_tracking_system_info &TSI)
 stream out operator for tracking system infos
 
float dot (int n, const float *a, const float *b, int step_a=1, int step_b=1)
 
void homogenize_matrix (float *A, int n, const float *B=0)
 
void invert_rigid_body_transformation (float *T)
 
void matrix_multiplication (const float *A, const float *B, float *C)
 
std::string get_key_string (unsigned short key)
 convert key to string
 
std::string get_state_flag_string (VRButtonStateFlags flags)
 convert flags to string
 
std::string get_status_string (VRStatus status)
 convert flags to string
 
bool & ref_vrmesh_outofdate (VRMeshId id)
 
std::string & ref_vrmesh_file_name (VRMeshId id)
 
const std::string & get_vrmesh_file_name (VRMeshId id)
 return the file name for the given vrmesh type
 
void set_vrmesh_file_name (VRMeshId id, const std::string &file_name)
 set the file name for the given vrmesh type
 
cgv::render::mesh_render_infoget_vrmesh_render_info (cgv::render::context &ctx, VRMeshId id)
 return a pointer to a mesh info structure for the given mesh type (read and construct if necessary); returns 0 pointer if mesh is not available
 
cgv::mat4 get_mat4_from_pose (const float pose_matrix[12])
 convert pose to mat4
 
cgv::mat4 get_world_to_eye_transform (const vr_kit *vr_kit_ptr, const vr_kit_state &state, int eye)
 compute lookat matrix for a given eye (0 ... left, 1 ... right)
 
cgv::mat4 get_world_to_camera_transform (const vr_kit *vr_kit_ptr, const vr_kit_state &state, int eye)
 compute lookat matrix for a given camera (0 ... left, 1 ... right)
 
cgv::mat4 get_eye_projection_transform (const vr_kit *vr_kit_ptr, const vr_kit_state &state, float z_near, float z_far, int eye)
 query projection matrix for a given eye (0 ... left, 1 ... right)
 
cgv::mat4 get_camera_projection_transform (const vr_kit *vr_kit_ptr, float z_near, float z_far, int eye, bool undistorted)
 query projection matrix for a given camera (0 ... left or mono, 1 ... right only for stereo cameras)
 
cgv::mat4 get_texture_transform (const vr_kit *vr_kit_ptr, const vr_kit_state &state, float z_near, float z_far, int eye, bool undistorted)
 query the texture matrix needed for projective texture mapping for a given camera (0 ... left or mono, 1 ... right only for stereo cameras)
 
bool configure_seethrough_shader_program (cgv::render::context &ctx, cgv::render::shader_program &prog, uint32_t frame_width, uint32_t frame_height, const vr_kit *vr_kit_ptr, const vr_kit_state &state, float z_near, float z_far, int eye, bool undistorted)
 set all uniforms of seethrough shader program for a given camera (0 ... left or mono, 1 ... right only for stereo cameras).
 
vr kit management
std::vector< void * > scan_vr_kits ()
 iterate all registered vr drivers to scan for vr kits and return vector of vr kit handles
 
vr_kitreplace_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 kit; in case of failure return 0 pointer
 
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 replacement was successful
 
vr_kitget_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 kit exists for given handle
 
bool unregister_vr_kit (void *handle, vr_kit *vr_kit_ptr)
 unregister a previously registered vr kit by handle and pointer
 

Variables

const unsigned max_nr_controllers = 8
 maximum number of attachable controller and tracker devices
 
const unsigned max_nr_controller_inputs = 5
 maximum number of inputs per controller
 
const unsigned max_nr_controller_axes = 8
 maximum number of axes per controller
 

vr driver management

class CGV_API vr_driver
 forward declaration of vr driver class
 
void register_driver (vr_driver *vrd)
 register a new driver
 
std::vector< vr_driver * > & get_vr_drivers ()
 return a vector with all registered vr drivers
 

Detailed Description

the vr namespace for virtual reality support

provides functions bridging the basic vr support with the cgv framework

the helper functions allow to compute the modelview, projection and texture matrices needed for rendering.

Enumeration Type Documentation

◆ CameraFrameFormat

currently only a single frame format supported

Definition at line 26 of file vr_camera.h.

◆ CameraFrameSplit

in case of stereo cameras a frame contains images of both eyes either split vertically (left right) or horizontally (top bottom)

Definition at line 31 of file vr_camera.h.

◆ CameraState

different status values for a vr camera

Definition at line 19 of file vr_camera.h.

◆ EyeSelection

enum to support restriction of eyes to a single eye

Definition at line 15 of file gl_vr_display.h.

◆ KeyAction

repeated definition from cgv/gui/key_event.h

Definition at line 26 of file vr_state.h.

◆ VRAxisType

different axis types of controller inputs

Definition at line 110 of file vr_info.h.

◆ VRButtonStateFlags

one flag for each vr controller button

Enumerator
VRF_SYSTEM 

system button

VRF_MENU 

application menu button

VRF_GRIP 

grip button

VRF_DPAD_LEFT 

direction pad left button

VRF_DPAD_RIGHT 

direction pad right button

VRF_DPAD_DOWN 

direction pad down button

VRF_DPAD_UP 

direction pad up button

VRF_A 

A button.

VRF_INPUT0_TOUCH 

touch sensor for input 0 which often is touchpad or stick

VRF_INPUT0 

button of input 0

VRF_INPUT1_TOUCH 

touch sensor for input 1 which often is touchpad or stick

VRF_INPUT1 

button of input 1

VRF_INPUT2_TOUCH 

touch sensor for input 2 which often is touchpad or stick

VRF_INPUT2 

button of input 2

VRF_INPUT3_TOUCH 

touch sensor for input 3 which often is touchpad or stick

VRF_INPUT3 

button of input 3

VRF_INPUT4_TOUCH 

touch sensor for input 4 which often is touchpad or stick

VRF_INPUT4 

button of input 4

VRF_PROXIMITY 

proximity sensor

Definition at line 61 of file vr_state.h.

◆ VRControllerRole

role of controller

Definition at line 94 of file vr_info.h.

◆ VRControllerType

type of controller

Definition at line 88 of file vr_info.h.

◆ VRInputType

different controller input types

Definition at line 103 of file vr_info.h.

◆ VRKeys

enum vr::VRKeys

enumerate all VR keys starting at 1024

Enumerator
VR_SYSTEM 

VIVE: system button; occulus: ???

VR_MENU 

VIVE: menu button; occulus: start button.

VR_GRIP 

grip button

VR_DPAD_DOWN_LEFT 

direction pad diagonally down and left

VR_DPAD_DOWN 

direction pad down

VR_DPAD_DOWN_RIGHT 

direction pad diagonally down and right

VR_DPAD_LEFT 

direction pad left

VR_DPAD_RIGHT 

direction pad right

VR_DPAD_UP_LEFT 

direction pad diagonally up and left

VR_DPAD_UP 

direction pad up

VR_DPAD_UP_RIGHT 

direction pad diagonally up and right

VR_A 

A button.

VR_INPUT0_TOUCH 

touched input 0

VR_INPUT0 

input 0

VR_INPUT1_TOUCH 

touched input 1

VR_INPUT1 

input 1

VR_INPUT2_TOUCH 

touched input 2

VR_INPUT2 

input 2

VR_INPUT3_TOUCH 

touched input 3

VR_INPUT3 

input 3

VR_INPUT4_TOUCH 

touched input 4

VR_INPUT4 

input 4

VR_PROXIMITY 

proximity sensor

VR_END 

end marker used in for loops over all VR keys

VR_BEGIN 

begin marker used in for loops over all VR keys

Definition at line 32 of file vr_state.h.

◆ VRMeshId

enumerate for different mesh types

Definition at line 36 of file vr_render_helpers.h.

◆ VRStatus

different status values for a trackable

Enumerator
VRS_DETACHED 

trackable is not reachable via wireless

VRS_ATTACHED 

trackable is connected via wireless but not tracked

VRS_TRACKED 

trackable is connected and tracked

Definition at line 84 of file vr_state.h.

Function Documentation

◆ configure_seethrough_shader_program()

CGV_API bool vr::configure_seethrough_shader_program ( cgv::render::context ctx,
cgv::render::shader_program prog,
uint32_t  frame_width,
uint32_t  frame_height,
const vr_kit vr_kit_ptr,
const vr_kit_state state,
float  z_near,
float  z_far,
int  eye,
bool  undistorted 
)

set all uniforms of seethrough shader program for a given camera (0 ... left or mono, 1 ... right only for stereo cameras).

For this the get_texture_transform is used to compute the texture matrix. Return whether setting the uniforms was successful.

Definition at line 110 of file vr_render_helpers.cxx.

References vr::vr_kit::get_camera(), vr::vr_camera::get_frame_split(), vr::vr_camera::get_nr_cameras(), get_texture_transform(), vr::vr_camera::put_camera_intrinsics(), and cgv::render::shader_program::set_uniform().

Referenced by vr_test::draw().

◆ dot()

float vr::dot ( int  n,
const float *  a,
const float *  b,
int  step_a = 1,
int  step_b = 1 
)

Definition at line 56 of file vr_kit.cxx.

◆ get_camera_projection_transform()

CGV_API cgv::mat4 vr::get_camera_projection_transform ( const vr_kit vr_kit_ptr,
float  z_near,
float  z_far,
int  eye,
bool  undistorted 
)

query projection matrix for a given camera (0 ... left or mono, 1 ... right only for stereo cameras)

Definition at line 96 of file vr_render_helpers.cxx.

References vr::vr_kit::get_camera(), and vr::vr_camera::put_projection_matrix().

Referenced by get_texture_transform().

◆ get_eye_projection_transform()

CGV_API cgv::mat4 vr::get_eye_projection_transform ( const vr_kit vr_kit_ptr,
const vr_kit_state state,
float  z_near,
float  z_far,
int  eye 
)

query projection matrix for a given eye (0 ... left, 1 ... right)

Definition at line 89 of file vr_render_helpers.cxx.

References vr::vr_kit_state::hmd, vr::vr_trackable_state::pose, and vr::vr_kit::put_projection_matrix().

Referenced by vr_view_interactor::init_frame().

◆ get_key_string()

CGV_API std::string vr::get_key_string ( unsigned short  key)

convert key to string

Definition at line 78 of file vr_state.cxx.

Referenced by cgv::gui::vr_key_event::stream_out().

◆ get_mat4_from_pose()

CGV_API cgv::mat4 vr::get_mat4_from_pose ( const float  pose_matrix[12])

convert pose to mat4

Definition at line 56 of file vr_render_helpers.cxx.

References cgv::math::fmat< T, N, M >::set_col().

Referenced by get_world_to_camera_transform().

◆ get_state_flag_string()

◆ get_status_string()

CGV_API std::string vr::get_status_string ( VRStatus  status)

convert flags to string

Definition at line 166 of file vr_state.cxx.

References VRS_ATTACHED, VRS_DETACHED, and VRS_TRACKED.

◆ get_texture_transform()

CGV_API cgv::mat4 vr::get_texture_transform ( const vr_kit vr_kit_ptr,
const vr_kit_state state,
float  z_near,
float  z_far,
int  eye,
bool  undistorted 
)

query the texture matrix needed for projective texture mapping for a given camera (0 ... left or mono, 1 ... right only for stereo cameras)

Definition at line 106 of file vr_render_helpers.cxx.

References get_camera_projection_transform(), and get_world_to_camera_transform().

Referenced by configure_seethrough_shader_program().

◆ get_vr_drivers()

CGV_API std::vector< vr_driver * > & vr::get_vr_drivers ( )

return a vector with all registered vr drivers

Definition at line 179 of file vr_driver.cxx.

References ref_drivers().

Referenced by cgv::gui::vr_calibration::read_calibration(), and cgv::gui::vr_calibration::update_calibration_info().

◆ get_vr_kit()

CGV_API vr_kit * vr::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 kit exists for given handle

Definition at line 212 of file vr_driver.cxx.

References ref_vr_kit_map().

Referenced by cgv::gui::vr_server::check_and_emit_events(), vr_test::create_gui(), cgv::gui::vr_server::emit_events_and_update_state(), vr_test::on_device_change(), vr_test::on_set(), vr_test::on_status_change(), vr_emulator::replace_by_pointer(), and cgv::gui::vr_calibration::update_driver_calibration().

◆ get_vrmesh_file_name()

CGV_API const std::string & vr::get_vrmesh_file_name ( VRMeshId  id)

return the file name for the given vrmesh type

Definition at line 22 of file vr_render_helpers.cxx.

Referenced by vr_view_interactor::draw_vr_kits(), and get_vrmesh_render_info().

◆ get_vrmesh_render_info()

CGV_API cgv::render::mesh_render_info * vr::get_vrmesh_render_info ( cgv::render::context ctx,
VRMeshId  id 
)

return a pointer to a mesh info structure for the given mesh type (read and construct if necessary); returns 0 pointer if mesh is not available

Definition at line 31 of file vr_render_helpers.cxx.

References cgv::render::mesh_render_info::destruct(), cgv::base::find_data_file(), get_vrmesh_file_name(), cgv::media::mesh::simple_mesh< T >::read(), and cgv::render::context::ref_surface_shader_program().

Referenced by vr_view_interactor::draw_vr_kits().

◆ get_world_to_camera_transform()

CGV_API cgv::mat4 vr::get_world_to_camera_transform ( const vr_kit vr_kit_ptr,
const vr_kit_state state,
int  eye 
)

compute lookat matrix for a given camera (0 ... left, 1 ... right)

Definition at line 79 of file vr_render_helpers.cxx.

References vr::vr_kit::get_camera(), get_mat4_from_pose(), vr::vr_kit_state::hmd, vr::vr_trackable_state::pose, and vr::vr_camera::put_camera_to_head_matrix().

Referenced by get_texture_transform().

◆ get_world_to_eye_transform()

CGV_API cgv::mat4 vr::get_world_to_eye_transform ( const vr_kit vr_kit_ptr,
const vr_kit_state state,
int  eye 
)

compute lookat matrix for a given eye (0 ... left, 1 ... right)

Definition at line 67 of file vr_render_helpers.cxx.

References cgv::math::fvec< T, N >::data(), vr::vr_kit_state::hmd, vr::vr_trackable_state::pose, and vr::vr_kit::put_world_to_eye_transform().

Referenced by vr_view_interactor::init_frame().

◆ homogenize_matrix()

void vr::homogenize_matrix ( float *  A,
int  n,
const float *  B = 0 
)

Definition at line 63 of file vr_kit.cxx.

◆ invert_rigid_body_transformation()

void vr::invert_rigid_body_transformation ( float *  T)

Definition at line 73 of file vr_kit.cxx.

◆ matrix_multiplication()

void vr::matrix_multiplication ( const float *  A,
const float *  B,
float *  C 
)

Definition at line 85 of file vr_kit.cxx.

◆ operator<<() [1/7]

CGV_API std::ostream & vr::operator<< ( std::ostream &  os,
const vr_controller_info CI 
)

◆ operator<<() [2/7]

CGV_API std::ostream & vr::operator<< ( std::ostream &  os,
const vr_device_info di 
)

stream out operator for device infos

Definition at line 10 of file vr_info.cxx.

References vr::vr_device_info::model_number, vr::vr_device_info::serial_number, and vr::vr_device_info::variable_parameters.

◆ operator<<() [3/7]

CGV_API std::ostream & vr::operator<< ( std::ostream &  os,
const vr_hmd_info HI 
)

◆ operator<<() [4/7]

CGV_API std::ostream & vr::operator<< ( std::ostream &  os,
const vr_kit_info VI 
)

stream out operator for vr kit info

Definition at line 148 of file vr_info.cxx.

References vr::vr_kit_info::controller, vr::vr_kit_info::hmd, and max_nr_controllers.

◆ operator<<() [5/7]

CGV_API std::ostream & vr::operator<< ( std::ostream &  os,
const vr_trackable_info TI 
)

◆ operator<<() [6/7]

CGV_API std::ostream & vr::operator<< ( std::ostream &  os,
const vr_tracking_reference_info TI 
)

stream out operator for tracking reference device infos

Definition at line 168 of file vr_info.cxx.

References vr::vr_tracking_reference_info::frustum, vr::vr_tracking_reference_info::mode, and vr::vr_tracking_reference_info::z_near.

◆ operator<<() [7/7]

CGV_API std::ostream & vr::operator<< ( std::ostream &  os,
const vr_tracking_system_info TSI 
)

stream out operator for tracking system infos

Definition at line 181 of file vr_info.cxx.

References vr::vr_tracking_system_info::name, and vr::vr_tracking_system_info::references.

◆ ref_drivers()

std::vector< vr_driver * > & vr::ref_drivers ( )

return registered drivers

Definition at line 166 of file vr_driver.cxx.

Referenced by get_vr_drivers(), replace_by_index(), replace_by_pointer(), and scan_vr_kits().

◆ ref_vr_kit_map()

std::map< void *, vr_kit * > & vr::ref_vr_kit_map ( )

access to vr_kit map singleton

Definition at line 16 of file vr_driver.cxx.

Referenced by get_vr_kit(), vr::vr_driver::register_vr_kit(), vr::vr_driver::replace_vr_kit(), and unregister_vr_kit().

◆ ref_vrmesh_file_name()

std::string & vr::ref_vrmesh_file_name ( VRMeshId  id)

Definition at line 15 of file vr_render_helpers.cxx.

◆ ref_vrmesh_outofdate()

bool & vr::ref_vrmesh_outofdate ( VRMeshId  id)

Definition at line 8 of file vr_render_helpers.cxx.

◆ register_driver()

CGV_API void vr::register_driver ( vr_driver vrd)

register a new driver

Definition at line 173 of file vr_driver.cxx.

◆ replace_by_index()

CGV_API vr_kit * vr::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 kit; in case of failure return 0 pointer

Definition at line 195 of file vr_driver.cxx.

References ref_drivers().

◆ replace_by_pointer()

CGV_API bool vr::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 replacement was successful

Definition at line 204 of file vr_driver.cxx.

References ref_drivers().

◆ scan_vr_kits()

CGV_API std::vector< void * > vr::scan_vr_kits ( )

iterate all registered vr drivers to scan for vr kits and return vector of vr kit handles

Definition at line 185 of file vr_driver.cxx.

References ref_drivers().

Referenced by cgv::gui::vr_server::check_device_changes().

◆ set_vrmesh_file_name()

CGV_API void vr::set_vrmesh_file_name ( VRMeshId  id,
const std::string &  file_name 
)

set the file name for the given vrmesh type

Definition at line 26 of file vr_render_helpers.cxx.

◆ stream_pose()

void vr::stream_pose ( std::ostream &  os,
const float  mat[12] 
)

Definition at line 69 of file vr_info.cxx.

◆ stream_vec3()

void vr::stream_vec3 ( std::ostream &  os,
const float  vec[3] 
)

Definition at line 59 of file vr_info.cxx.

◆ unregister_vr_kit()

CGV_API bool vr::unregister_vr_kit ( void *  handle,
vr_kit vr_kit_ptr 
)

unregister a previously registered vr kit by handle and pointer

Definition at line 220 of file vr_driver.cxx.

References ref_vr_kit_map().

Variable Documentation

◆ max_nr_controller_axes

const unsigned vr::max_nr_controller_axes = 8

maximum number of axes per controller

Definition at line 23 of file vr_state.h.

Referenced by vr::vr_log::log_vr_state(), vr::vr_controller_info::vr_controller_info(), and vr::vr_controller_state::vr_controller_state().

◆ max_nr_controller_inputs

const unsigned vr::max_nr_controller_inputs = 5

maximum number of inputs per controller

Definition at line 21 of file vr_state.h.

Referenced by cgv::gui::vr_server::emit_events_and_update_state(), and vr::vr_controller_info::vr_controller_info().

◆ max_nr_controllers

const unsigned vr::max_nr_controllers = 8

◆ vr_driver

class CGV_API vr::vr_driver

forward declaration of vr driver class

give vr driver access to camera initialization and destruction

Definition at line 33 of file vr_driver.h.