]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/device.h
Style update: remove alignment
[libs/gui.git] / source / input / device.h
index d1c96f23be04e890d56755bc2ef55b4043c5aa8b..3338137eb51e46e50528cf51af02c73beb31ce50 100644 (file)
@@ -1,12 +1,5 @@
-/* $Id$
-
-This file is part of libmspgbase
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
-#ifndef MSP_GBASE_INPUTDEVICE_H_
-#define MSP_GBASE_INPUTDEVICE_H_
+#ifndef MSP_INPUT_INPUTDEVICE_H_
+#define MSP_INPUT_INPUTDEVICE_H_
 
 #include <string>
 #include <vector>
@@ -17,8 +10,8 @@ namespace Input {
 
 /**
 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
 {
@@ -29,18 +22,15 @@ public:
 
 protected:
        std::string name;
-       std::vector<char>  buttons;
+       std::vector<char> buttons;
        std::vector<float> axes;
-       float axis_threshold;
-       float axis_dead_zone;
 
        Device() { }
 public:
        virtual ~Device() { }
        const std::string &get_name() const { return name; }
-       bool  get_button_state(unsigned) const;
+       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;