cgv
|
Extends the trackable state by information on the buttons, input axes and vibration strengths. More...
#include <vr_state.h>
Public Member Functions | |
bool | operator== (const vr_controller_state &state) const |
equal comparison operator | |
vr_controller_state () | |
standard constructor for initialization of members | |
void | put_ray (float *ray_origin, float *ray_direction) const |
place the 3d ray origin and the 3d ray direction into the given arrays which must provide space for 3 floats each | |
![]() | |
bool | operator== (const vr_trackable_state &state) const |
equality check | |
vr_trackable_state () | |
standard constructor for initialization of members | |
Public Attributes | |
unsigned | time_stamp |
a unique time stamp for fast test whether state changed | |
unsigned | button_flags |
combination of flags in VRButtonStateFlags combined with the OR operation | |
float | axes [max_nr_controller_axes] |
up to vr::max_nr_controller_axes axis values in the range [-1,1] or [0,1] (VIVE: 0|1..touchpad x|y [-1,1], 2..trigger [0,1]) | |
float | vibration [2] |
strength of the vibration motors | |
![]() | |
VRStatus | status |
whether trackable is currently tracked, only in case of true, the pose member contains useful information | |
float | pose [12] |
pose as 3x4 matrix in column major format, where each column is a vector in world coordinates | |
Extends the trackable state by information on the buttons, input axes and vibration strengths.
extends the trackable state by a vr_controller_state::time_stamp, vr_controller_state::button_flags, vr_controller_state::axes[vr::max_nr_controller_axes], and vr_controller_state::vibration[2] There are 7 buttons as listed in vr::VRButtonStateFlags, where vr::VRF_STICK_TOUCH corresponds to touching of the stick|touchpad and vr::VRF_STICK to pressing it.The controller provides up to vr::max_nr_controller_axes
axes, where the first two correspond to the stick|touchpad position and the third (vr_controller_state::axes[2]) to the trigger.
Definition at line 117 of file vr_state.h.
vr::vr_controller_state::vr_controller_state | ( | ) |
standard constructor for initialization of members
Definition at line 13 of file vr_state.cxx.
References axes, button_flags, vr::max_nr_controller_axes, time_stamp, and vibration.
bool vr::vr_controller_state::operator== | ( | const vr_controller_state & | state | ) | const |
equal comparison operator
Definition at line 61 of file vr_state.cxx.
References axes, button_flags, vr::vr_trackable_state::operator==(), and vibration.
void vr::vr_controller_state::put_ray | ( | float * | ray_origin, |
float * | ray_direction | ||
) | const |
place the 3d ray origin and the 3d ray direction into the given arrays which must provide space for 3 floats each
place the 3d ray origin and the 3d ray direction into the given arrays
Definition at line 21 of file vr_state.cxx.
References vr::vr_trackable_state::pose.
Referenced by vr_test::draw(), and vr_test::handle().
float vr::vr_controller_state::axes[max_nr_controller_axes] |
up to vr::max_nr_controller_axes
axis values in the range [-1,1] or [0,1] (VIVE: 0|1..touchpad x|y [-1,1], 2..trigger [0,1])
Definition at line 124 of file vr_state.h.
Referenced by vr_emulator::create_controller_gui(), cgv::gui::vr_server::emit_events_and_update_state(), vr::vr_log::log_vr_state(), operator==(), and vr_controller_state().
unsigned vr::vr_controller_state::button_flags |
combination of flags in VRButtonStateFlags combined with the OR operation
Definition at line 122 of file vr_state.h.
Referenced by vr::vr_log::log_vr_state(), operator==(), and vr_controller_state().
unsigned vr::vr_controller_state::time_stamp |
a unique time stamp for fast test whether state changed
Definition at line 120 of file vr_state.h.
Referenced by vr_emulator::create_controller_gui(), vr_view_interactor::draw_vr_kits(), and vr_controller_state().
float vr::vr_controller_state::vibration[2] |
strength of the vibration motors
Definition at line 126 of file vr_state.h.
Referenced by vr_emulator::create_controller_gui(), vr::vr_log::log_vr_state(), operator==(), vr_emulated_kit::set_vibration(), and vr_controller_state().