summaryrefslogtreecommitdiffstats
path: root/src/core/frontend
diff options
context:
space:
mode:
authorgerman <german@thesoftwareartisans.com>2020-09-05 04:48:03 +0200
committergerman <german@thesoftwareartisans.com>2020-09-05 04:48:03 +0200
commitff679f3d171ace12d1b3b68f305b1bb24b2130de (patch)
tree67cd6da1b1ef1e7b817ffd82cc8606ace6da779e /src/core/frontend
parentMerge pull request #4629 from Morph1984/mergesinglejoyasdualjoy-impl (diff)
downloadyuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.gz
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.bz2
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.lz
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.xz
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.zst
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.zip
Diffstat (limited to 'src/core/frontend')
-rw-r--r--src/core/frontend/input.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h
index 2b098b7c6..6770475cf 100644
--- a/src/core/frontend/input.h
+++ b/src/core/frontend/input.h
@@ -137,6 +137,33 @@ using AnalogDevice = InputDevice<std::tuple<float, float>>;
using MotionDevice = InputDevice<std::tuple<Common::Vec3<float>, Common::Vec3<float>>>;
/**
+ * A real motion device is an input device that returns a tuple of accelerometer state vector,
+ * gyroscope state vector, rotation state vector and orientation state matrix.
+ *
+ * For both vectors:
+ * x+ is the same direction as RIGHT on D-pad.
+ * y+ is normal to the touch screen, pointing outward.
+ * z+ is the same direction as UP on D-pad.
+ *
+ * For accelerometer state vector
+ * Units: g (gravitational acceleration)
+ *
+ * For gyroscope state vector:
+ * Orientation is determined by right-hand rule.
+ * Units: deg/sec
+ *
+ * For rotation state vector
+ * Units: rotations
+ *
+ * For orientation state matrix
+ * x vector
+ * y vector
+ * z vector
+ */
+using RealMotionDevice = InputDevice<std::tuple<Common::Vec3<float>, Common::Vec3<float>,
+ Common::Vec3<float>, std::array<Common::Vec3f, 3>>>;
+
+/**
* A touch device is an input device that returns a tuple of two floats and a bool. The floats are
* x and y coordinates in the range 0.0 - 1.0, and the bool indicates whether it is pressed.
*/