1#include "throttle_event.h"
8 event(
EID_THROTTLE,0,0,_time), x(_x), dx(_dx), player_index(_player_index), controller_index(_controller_index), throttle_index(_throttle_index)
20 return controller_index;
25 return throttle_index;
37 os <<
"<" << (int)player_index <<
":" << (
int)controller_index <<
":" << (int)throttle_index <<
">";
43 std::cerr <<
"not implemented" << std::endl;
virtual void stream_out(std::ostream &os) const
write to stream
void stream_out(std::ostream &os) const
write to stream
float get_last_value() const
return the last value of the throttle
float get_value() const
return the current value of the throttle
unsigned get_controller_index() const
return controller index
throttle_event(float _x, float _dx, unsigned _player_index=0, unsigned _controller_index=0, unsigned _throttle_index=0, double _time=0)
construct a throttle event from value and value change
void stream_in(std::istream &is)
read from stream
float get_value_change() const
return the change of value of the throttle
unsigned get_throttle_index() const
return throttle index
unsigned get_player_index() const
return player index
@ EID_THROTTLE
id of throttle event describing a one axis controller