cgv
Loading...
Searching...
No Matches
cgv::gui::vr_pose_event Class Reference

vr extension of pose events More...

#include <vr_events.h>

Inheritance diagram for cgv::gui::vr_pose_event:
cgv::gui::pose_event cgv::gui::vr_event_extension cgv::gui::event

Public Member Functions

 vr_pose_event (void *_device_handle, short _trackable_index, const vr::vr_kit_state &_state, const float *_pose, const float *_last_pose, unsigned short _player_index, double _time=0)
 construct a pose event from given parameters
 
void * get_device_id () const
 return the device id, by default returns 0
 
void stream_out (std::ostream &os) const
 write to stream
 
- Public Member Functions inherited from cgv::gui::pose_event
 pose_event (const float *_pose, const float *_last_pose, unsigned short _player_index, short _trackable_index=0, double _time=0)
 construct a key event from its textual description
 
unsigned get_player_index () const
 return player index
 
int get_trackable_index () const
 return trackable index
 
void stream_in (std::istream &is)
 read from stream
 
const mat3get_orientation () const
 return current orientation matrix
 
const vec3get_position () const
 return current position
 
const mat3x4get_pose_matrix () const
 return current pose matrix
 
quat get_quaternion () const
 return current orientation quaternion
 
const mat3get_last_orientation () const
 return last orientation matrix
 
const vec3get_last_position () const
 return last position
 
const mat3x4get_last_pose_matrix () const
 return last pose matrix
 
quat get_last_quaternion () const
 return last orientation quaternion
 
vec3 get_different () const
 return difference vector from last to current position
 
mat3 get_rotation_matrix () const
 return rotation matrix between from the last to current orientation
 
quat get_rotation_quaternion () const
 return rotation quaternion between from the last to current orientation
 
- Public Member Functions inherited from cgv::gui::event
 event (unsigned int _kind=EID_NONE, unsigned char _modifiers=0, unsigned char _toggle_keys=0, double _time=0)
 construct event from its kind
 
virtual ~event ()
 virtual destructor for events
 
void set_kind (unsigned char _kind)
 set the kind of the event
 
unsigned get_kind () const
 return, what kind of event this is, typically a value from the EventId enum
 
void set_flags (unsigned char _flags)
 return the set the event flags
 
unsigned get_flags () const
 return the event flags
 
void set_modifiers (unsigned char _modifiers)
 set the modifiers
 
unsigned char get_modifiers () const
 return the active modifiers as values from EventModifier combined with a logical or-operation
 
void set_toggle_keys (unsigned char _toggle_keys)
 set the state of the toggle keys
 
unsigned char get_toggle_keys () const
 return the state of the toggle keys as values from EventToggleKeys combined with a logical or-operation
 
void set_time (const double &_time)
 set the time of the event
 
double get_time () const
 return the time of the event in seconds
 
- Public Member Functions inherited from cgv::gui::vr_event_extension
 vr_event_extension (void *_device_handle, const vr::vr_kit_state &_state)
 construct extension from device handle and vr state
 
void * get_device_handle () const
 return the device id, by default returns 0
 
const vr::vr_kit_stateget_state () const
 return the state of vr kit
 

Additional Inherited Members

- Protected Attributes inherited from cgv::gui::pose_event
short player_index
 
short trackable_index
 
float pose [12]
 pose stored as 3x4 matrix in column major format
 
float last_pose [12]
 last pose as 3x4 matrix
 
- Protected Attributes inherited from cgv::gui::event
unsigned char kind
 store which kind of event we have
 
unsigned char flags
 store event flags
 
unsigned char modifiers
 store the active modifiers
 
unsigned char toggle_keys
 store the active toggle keys
 
double time
 store the time of the event in seconds
 
- Protected Attributes inherited from cgv::gui::vr_event_extension
void * device_handle
 store device handle
 
const vr::vr_kit_statestate
 access to current vr state
 

Detailed Description

vr extension of pose events

Definition at line 91 of file vr_events.h.

Constructor & Destructor Documentation

◆ vr_pose_event()

cgv::gui::vr_pose_event::vr_pose_event ( void *  _device_handle,
short  _trackable_index,
const vr::vr_kit_state _state,
const float *  _pose,
const float *  _last_pose,
unsigned short  _player_index,
double  _time = 0 
)

construct a pose event from given parameters

construct a key event from its textual description

Definition at line 80 of file vr_events.cxx.

References cgv::gui::EF_VR, and cgv::gui::event::flags.

Member Function Documentation

◆ get_device_id()

void * cgv::gui::vr_pose_event::get_device_id ( ) const
inlinevirtual

return the device id, by default returns 0

Reimplemented from cgv::gui::event.

Definition at line 98 of file vr_events.h.

◆ stream_out()

void cgv::gui::vr_pose_event::stream_out ( std::ostream &  os) const
virtual

write to stream

Reimplemented from cgv::gui::pose_event.

Definition at line 88 of file vr_events.cxx.

References cgv::gui::vr_event_extension::device_handle, and cgv::gui::pose_event::stream_out().


The documentation for this class was generated from the following files: