cgv
Loading...
Searching...
No Matches
pose_event.h
1#pragma once
2
3#include "event.h"
4#include "shortcut.h"
5#include <cgv/math/fvec.h>
6#include <cgv/math/fmat.h>
7#include <cgv/math/quaternion.h>
8
9#include "lib_begin.h"
10
11namespace cgv {
12 namespace gui {
13
15class CGV_API pose_event : public event
16{
17protected:
18 // store different indices to uniquely define trackable
19 short player_index, trackable_index;
21 float pose[12];
23 float last_pose[12];
24public:
26 pose_event(const float *_pose, const float *_last_pose, unsigned short _player_index, short _trackable_index = 0, double _time = 0);
28 unsigned get_player_index() const;
30 int get_trackable_index() const;
32 void stream_out(std::ostream& os) const;
34 void stream_in(std::istream& is);
36 const mat3& get_orientation() const;
38 const vec3& get_position() const;
40 const mat3x4& get_pose_matrix() const;
42 quat get_quaternion() const;
44 const mat3& get_last_orientation() const;
46 const vec3& get_last_position() const;
48 const mat3x4& get_last_pose_matrix() const;
50 quat get_last_quaternion() const;
52 vec3 get_different() const;
54 mat3 get_rotation_matrix() const;
56 quat get_rotation_quaternion() const;
57};
58
59 }
60}
61
62#include <cgv/config/lib_end.h>
class to represent all pose events from tracking systems with the EID_POSE
Definition pose_event.h:16
the cgv namespace
Definition print.h:11