summaryrefslogtreecommitdiff
path: root/src/core/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/frontend')
-rw-r--r--src/core/frontend/input.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h
index 0a5713dc0..a8be49440 100644
--- a/src/core/frontend/input.h
+++ b/src/core/frontend/input.h
@@ -11,6 +11,7 @@
11#include <utility> 11#include <utility>
12#include "common/logging/log.h" 12#include "common/logging/log.h"
13#include "common/param_package.h" 13#include "common/param_package.h"
14#include "common/vector_math.h"
14 15
15namespace Input { 16namespace Input {
16 17
@@ -107,4 +108,23 @@ using ButtonDevice = InputDevice<bool>;
107 */ 108 */
108using AnalogDevice = InputDevice<std::tuple<float, float>>; 109using AnalogDevice = InputDevice<std::tuple<float, float>>;
109 110
111/**
112 * A motion device is an input device that returns a tuple of accelerometer state vector and
113 * gyroscope state vector.
114 *
115 * For accelerometer state vector:
116 * x+ is the same direction as LEFT on D-pad.
117 * y+ is normal to the touch screen, pointing outward.
118 * z+ is the same direction as UP on D-pad.
119 * Units: measured in unit of gravitational acceleration
120 *
121 * For gyroscope state vector:
122 * x+ is the same direction as LEFT on D-pad.
123 * y+ is normal to the touch screen, pointing outward.
124 * z+ is the same direction as UP on D-pad.
125 * Orientation is determined by right-hand rule.
126 * Units: deg/sec
127 */
128using MotionDevice = InputDevice<std::tuple<Math::Vec3<float>, Math::Vec3<float>>>;
129
110} // namespace Input 130} // namespace Input