diff options
| author | Josh Rahm <rahm@google.com> | 2025-12-23 12:59:23 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2025-12-23 12:59:23 -0700 |
| commit | 46efbf05fcade8199035f956e20a63ca91fc88fd (patch) | |
| tree | 9e3f3e297ea66e442e1a11b5ad16ad8ed6fc7fb7 /sons_of_sol/ControlMotionEvent.hpp | |
| parent | 306bb687414f54177eb37ab7cd744e491c397c31 (diff) | |
| download | SonsOfSol-46efbf05fcade8199035f956e20a63ca91fc88fd.tar.gz SonsOfSol-46efbf05fcade8199035f956e20a63ca91fc88fd.tar.bz2 SonsOfSol-46efbf05fcade8199035f956e20a63ca91fc88fd.zip | |
Run clang-format and add .clang-format
Diffstat (limited to 'sons_of_sol/ControlMotionEvent.hpp')
| -rw-r--r-- | sons_of_sol/ControlMotionEvent.hpp | 65 |
1 files changed, 25 insertions, 40 deletions
diff --git a/sons_of_sol/ControlMotionEvent.hpp b/sons_of_sol/ControlMotionEvent.hpp index 5a93a69..930539b 100644 --- a/sons_of_sol/ControlMotionEvent.hpp +++ b/sons_of_sol/ControlMotionEvent.hpp @@ -12,54 +12,39 @@ * * These values have been normalized */ class ControlMotionEvent { -public: - enum MotionEventType { - NONE - , PITCH - , ROLL - , YAW - , THROTTLE - , STRAFE_SIDE - , STRAFE_UP - , FIRE_PRIMARY - }; + public: + enum MotionEventType { + NONE, + PITCH, + ROLL, + YAW, + THROTTLE, + STRAFE_SIDE, + STRAFE_UP, + FIRE_PRIMARY + }; - enum MotionOrigin { - JOYSTICK, - MOUSE, - BUTTON - }; + enum MotionOrigin { JOYSTICK, MOUSE, BUTTON }; - ControlMotionEvent( MotionEventType type, double mag, MotionOrigin origin ) : - mag( mag ), type( type ), origin( origin ) {} + ControlMotionEvent(MotionEventType type, double mag, MotionOrigin origin) + : mag(mag), type(type), origin(origin) {} - inline double getMagnitude() const { - return mag; - } + inline double getMagnitude() const { return mag; } - inline MotionEventType getType() const { - return type; - } + inline MotionEventType getType() const { return type; } - inline MotionOrigin getOrigin() const { - return origin; - } + inline MotionOrigin getOrigin() const { return origin; } - inline void setMagnitude( double mag ) { - this->mag = mag; - } + inline void setMagnitude(double mag) { this->mag = mag; } - inline void setType( MotionEventType type ) { - this->type = type; - } + inline void setType(MotionEventType type) { this->type = type; } - inline void setOrigin( MotionOrigin origin ) { - this->origin = origin; - } -private: - double mag; - MotionEventType type; - MotionOrigin origin; + inline void setOrigin(MotionOrigin origin) { this->origin = origin; } + + private: + double mag; + MotionEventType type; + MotionOrigin origin; }; #endif /* CONTROLMOTIONEVENT_HPP_ */ |