cgv
Loading...
Searching...
No Matches
throttle_event.h
1#pragma once
2
3#include "event.h"
4#include "shortcut.h"
5
6#include "lib_begin.h"
7
9namespace cgv {
11 namespace gui {
12
14class CGV_API throttle_event : public event
15{
16protected:
17 // store different indices to uniquely define throttle
18 unsigned char player_index, controller_index, throttle_index;
19 // current value of throttle
20 float x;
21 // change with respect to previous value of throttle
22 float dx;
23public:
25 throttle_event(float _x, float _dx, unsigned _player_index = 0, unsigned _controller_index = 0, unsigned _throttle_index = 0, double _time = 0);
27 unsigned get_player_index() const;
29 unsigned get_controller_index() const;
31 unsigned get_throttle_index() const;
33 void stream_out(std::ostream& os) const;
35 void stream_in(std::istream& is);
37 float get_value() const;
39 float get_value_change() const;
41 float get_last_value() const;
42};
43
44 }
45}
46
47#include <cgv/config/lib_end.h>
class to represent events that inform on a change in a one axis controller with the EID_THROTTLE
the cgv namespace
Definition print.h:11