/**
Base class for input devices. Input devices have two types of controls:
-buttons and axes. Buttons are either on or off. Axes have a floating-point
-value, with range depending on the device.
+buttons and axes. Buttons are either on or off. Axes have a floating point
+value in the range [-1, 1].
*/
class Device
{
std::string name;
std::vector<char> buttons;
std::vector<float> axes;
- float axis_threshold;
- float axis_dead_zone;
Device() { }
public:
const std::string &get_name() const { return name; }
bool get_button_state(unsigned) const;
float get_axis_value(unsigned) const;
- float get_axis_threshold() const { return axis_threshold; }
virtual std::string get_button_name(unsigned) const;
virtual std::string get_axis_name(unsigned) const;