|
cgv
|
helper struct for logging vr events More...
#include <vr_log.h>
Public Types | |
| enum | StorageMode { SM_IN_MEMORY = 1 , SM_OSTREAM = 2 , SM_IN_MEMORY_AND_OSTREAM = 3 , SM_NONE = 0 } |
| enum | Filter { F_POSE = 1 , F_BUTTON = 2 , F_AXES = 4 , F_VIBRATION = 8 , F_HMD = 16 , F_ALL = 31 , F_NONE = 0 } |
| template<class T > | |
| using | container = std::vector< T, std::allocator< T > > |
Public Member Functions | |
| vr_log (std::istringstream &is) | |
| void | log_vr_state (const vr::vr_kit_state &state, const double &time) |
| write vr_kit_state to log , and stream serialized vr_kit_state to log_stream if ostream_log is enabled | |
| void | disable_log () |
| disable logging | |
| void | enable_in_memory_log () |
| enable in memory log | |
| void | enable_ostream_log (const std::shared_ptr< std::ostream > &stream) |
| enable writing to ostream. | |
| void | set_filter (int f) |
| define what data should be recorded. | |
| int | get_filter () const |
| void | lock_settings () |
| prevent changes to settings and enables log_vr_state methods | |
| const size_t | recorded_vr_states () const |
| bool | load_state (std::istringstream &is) |
| read log from stream | |
Public Member Functions inherited from cgv::data::ref_counted | |
| int | get_ref_count () const |
| read access to current count | |
Public Attributes | |
| container< double > | time_stamp |
| container< cgv::mat3x4 > | hmd_pose |
| container< uint8_t > | hmd_status |
| container< cgv::vecn > | controller_axes [max_nr_controllers] |
| container< cgv::mat3x4 > | controller_pose [max_nr_controllers] |
| container< cgv::vec2 > | controller_vibration [max_nr_controllers] |
| container< unsigned > | controller_button_flags [max_nr_controllers] |
| container< uint8_t > | controller_status [max_nr_controllers] |
Protected Member Functions | |
| void | log_vr_state (const vr::vr_kit_state &state, const int mode, const int filter, const double time, std::ostream *log_stream) |
| record state | |
Protected Member Functions inherited from cgv::data::ref_counted | |
| ref_counted () | |
| constructor initializes the count to 0 | |
| void | set_ref_count (int c) const |
| write access is also const to allow ref counted pointers to const instances | |
| using vr::vr_log::container = std::vector<T, std::allocator<T> > |
| vr::vr_log::vr_log | ( | std::istringstream & | is | ) |
Definition at line 129 of file vr_log.cxx.
| void vr::vr_log::disable_log | ( | ) |
disable logging
Definition at line 107 of file vr_log.cxx.
| void vr::vr_log::enable_in_memory_log | ( | ) |
enable in memory log
Definition at line 115 of file vr_log.cxx.
Referenced by cgv::gui::vr_server::enable_log().
| void vr::vr_log::enable_ostream_log | ( | const std::shared_ptr< std::ostream > & | stream | ) |
enable writing to ostream.
Definition at line 121 of file vr_log.cxx.
Referenced by cgv::gui::vr_server::enable_log().
| bool vr::vr_log::load_state | ( | std::istringstream & | is | ) |
read log from stream
Definition at line 323 of file vr_log.cxx.
| void vr::vr_log::lock_settings | ( | ) |
prevent changes to settings and enables log_vr_state methods
Definition at line 300 of file vr_log.cxx.
Referenced by cgv::gui::vr_server::enable_log().
|
inline |
write vr_kit_state to log , and stream serialized vr_kit_state to log_stream if ostream_log is enabled
|
protected |
record state
Definition at line 133 of file vr_log.cxx.
References vr::vr_controller_state::axes, vr::vr_controller_state::button_flags, vr::vr_kit_state::controller, vr::vr_kit_state::hmd, vr::max_nr_controller_axes, vr::max_nr_controllers, vr::vr_trackable_state::pose, vr::vr_trackable_state::status, vr::vr_controller_state::vibration, and vr::VRS_TRACKED.
|
inline |
|
inline |
define what data should be recorded.
Definition at line 82 of file vr_log.h.
Referenced by cgv::gui::vr_server::enable_log().
| container<cgv::vecn> vr::vr_log::controller_axes[max_nr_controllers] |
| container<unsigned> vr::vr_log::controller_button_flags[max_nr_controllers] |
| container<cgv::mat3x4> vr::vr_log::controller_pose[max_nr_controllers] |
| container<uint8_t> vr::vr_log::controller_status[max_nr_controllers] |
| container<cgv::vec2> vr::vr_log::controller_vibration[max_nr_controllers] |
| container<cgv::mat3x4> vr::vr_log::hmd_pose |