summaryrefslogtreecommitdiff
path: root/src/core/frontend/input.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/frontend/input.h')
-rw-r--r--src/core/frontend/input.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h
index 2b098b7c6..9da0d2829 100644
--- a/src/core/frontend/input.h
+++ b/src/core/frontend/input.h
@@ -119,11 +119,11 @@ using ButtonDevice = InputDevice<bool>;
119using AnalogDevice = InputDevice<std::tuple<float, float>>; 119using AnalogDevice = InputDevice<std::tuple<float, float>>;
120 120
121/** 121/**
122 * A motion device is an input device that returns a tuple of accelerometer state vector and 122 * A motion status is an object that returns a tuple of accelerometer state vector,
123 * gyroscope state vector. 123 * gyroscope state vector, rotation state vector and orientation state matrix.
124 * 124 *
125 * For both vectors: 125 * For both vectors:
126 * x+ is the same direction as LEFT on D-pad. 126 * x+ is the same direction as RIGHT on D-pad.
127 * y+ is normal to the touch screen, pointing outward. 127 * y+ is normal to the touch screen, pointing outward.
128 * z+ is the same direction as UP on D-pad. 128 * z+ is the same direction as UP on D-pad.
129 * 129 *
@@ -133,8 +133,22 @@ using AnalogDevice = InputDevice<std::tuple<float, float>>;
133 * For gyroscope state vector: 133 * For gyroscope state vector:
134 * Orientation is determined by right-hand rule. 134 * Orientation is determined by right-hand rule.
135 * Units: deg/sec 135 * Units: deg/sec
136 *
137 * For rotation state vector
138 * Units: rotations
139 *
140 * For orientation state matrix
141 * x vector
142 * y vector
143 * z vector
144 */
145using MotionStatus = std::tuple<Common::Vec3<float>, Common::Vec3<float>, Common::Vec3<float>,
146 std::array<Common::Vec3f, 3>>;
147
148/**
149 * A motion device is an input device that returns a motion status object
136 */ 150 */
137using MotionDevice = InputDevice<std::tuple<Common::Vec3<float>, Common::Vec3<float>>>; 151using MotionDevice = InputDevice<MotionStatus>;
138 152
139/** 153/**
140 * A touch device is an input device that returns a tuple of two floats and a bool. The floats are 154 * A touch device is an input device that returns a tuple of two floats and a bool. The floats are