5#include <cgv/math/fvec.h>
32 unsigned char player_index, controller_index, stick_index;
42 unsigned _player_index = 0,
unsigned _controller_index = 0,
unsigned _stick_index = 0,
double _time = 0);
44 void stream_out(std::ostream& os)
const;
46 void stream_in(std::istream& is);
50 unsigned get_player_index()
const;
52 unsigned get_controller_index()
const;
54 unsigned get_stick_index()
const;
60 const vec2& get_position()
const;
66 const vec2& get_difference()
const;
68 float get_last_x()
const;
70 float get_last_y()
const;
72 vec2 get_last_position()
const;
78#include <cgv/config/lib_end.h>
class to represent stick events with the EID_STICK
vec2 difference
change in stick location
vec2 position
current stick location
unsigned char action
store stick action
std::string get_stick_action_string(StickAction action)
convert a key action into a readable string
StickAction
different actions that a stick can perform
@ SA_DRAG
stick moved in pressed state
@ SA_RELEASE
stick release action
@ SA_PRESS
stick press action
@ SA_TOUCH
stick touch action
@ SA_UNPRESS
stick unpress repeated press action
@ SA_MOVE
stick moved with respect to last event