WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. Source
  4. motion sensor.inc
Mission NodeSDK 6.1Pawnmotion_sensor.inc

motion sensor.inc

SDK Source File: motion_sensor.inc

Source / SDK 6.1 / Pawn / Core

motion_sensor.inc

motion sensor.inc
CPP
1/****h* PawnLibs/motion_sensor
2 * Description
3 * Interfaces for getting motion sensor data. Motion sensors are useful for
4 * monitoring module movement. Supported sensor data types:
5 * * accelerometer - acceleration force along 3 axis, measured in m/s^2, range
6 * +- 2g TBD: currently raw data is provided, should be redesigned
7 * * gyroscope - rate of rotation around 3 axis, measured in rad/s, range
8 * +-2000 dps TBD: currently raw data is provided, should be redesigned
9 * * shake - count of shakes in the sequence
10 * * tap - count of taps in the sequence
11 ******/
12
13/****e* PawnLibs/motion_sensor/ON_Shake
14 * Summary
15 * Shakes handler.
16 * Synopsis
17 */
18forward ON_Shake(const count);
19/*
20 * Description
21 * Public function with such signature will be called when the shakes sequence
22 * is detected. Shake is a continuous significant motion which direction has
23 * been changed since the previous recent shake. TBD: current implementation
24 * works ineffective, should be redesigned.
25 * Inputs
26 * * count - how many shakes there are in the shakes sequence
27 * See also
28 * * SENSITIVITY_MENU_CHANGE_SCRIPT
29 * * quit()
30 ******/
31
32/****e* PawnLibs/motion_sensor/ON_Tap
33 * Summary
34 * Taps handler.
35 * Synopsis
36 */
37forward ON_Tap(const count, const display, const bool:opposite);
38/*
39 * Description
40 * Public function with such signature will be called when the taps sequence
41 * is detected.
42 * Inputs
43 * * count - how many taps there are in the taps sequence
44 * * display - TBD: currently most recent taps axis
45 * * opposite - true, if most recenttap was detected from the opposite side of
46 * cube
47 ******/
48
49/****n* PawnLibs/motion_sensor/MS_getFaceAccelX
50 * Summary
51 * Get accelerometer value along X axis of some display.
52 * Synopsis
53 */
54native MS_getFaceAccelX(const display);
55/* Inputs
56 * * display - for which accelerometer value will be returned
57 * Return value
58 * Accelerometer value along X axis.
59 ******/
60
61/****n* PawnLibs/motion_sensor/MS_getFaceAccelY
62 * Summary
63 * Get accelerometer value along Y axis of some display.
64 * Synopsis
65 */
66native MS_getFaceAccelY(const display);
67/* Inputs
68 * * display - for which accelerometer value will be returned
69 * Return value
70 * Accelerometer value along Y axis.
71 ******/
72
73/****n* PawnLibs/motion_sensor/MS_getFaceAccelZ
74 * Summary
75 * Get accelerometer value along Z axis of some display.
76 * Synopsis
77 */
78native MS_getFaceAccelZ(const display);
79/*
80 * Description
81 * Z axis directed towards the center of the cube - TBD: check.
82 * Inputs
83 * * display - for which accelerometer value will be returned
84 * Return value
85 * Accelerometer value along Z axis.
86 ******/
87
88/****n* PawnLibs/motion_sensor/MS_getFaceGyroX
89 * Summary
90 * Get gyroscope value around X axis of some display.
91 * Synopsis
92 */
93native MS_getFaceGyroX(const display);
94/*
95 * Description
96 * Value increases clockwise - TBD: check.
97 * Inputs
98 * * display - for which gyroscope value will be returned
99 * Return value
100 * Gyroscope value around X axis.
101 ******/
102
103/****n* PawnLibs/motion_sensor/MS_getFaceGyroY
104 * Summary
105 * Get gyroscope value around Y axis of some display.
106 * Synopsis
107 */
108native MS_getFaceGyroY(const display);
109/*
110 * Description
111 * Value increases clockwise - TBD: check.
112 * Inputs
113 * * display - for which gyroscope value will be returned
114 * Return value
115 * Gyroscope value around Y axis.
116 ******/
117
118/****n* PawnLibs/motion_sensor/MS_getFaceGyroZ
119 * Summary
120 * Get gyroscope value around Z axis of some display.
121 * Synopsis
122 */
123native MS_getFaceGyroZ(const display);
124/*
125 * Description
126 * Value increases clockwise - TBD: check.
127 * Inputs
128 * * display - for which gyroscope value will be returned
129 * Return value
130 * Gyroscope value around Z axis.
131 ******/
132
133
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Related nodes

fixed.inc
Source / SDK 6.1 / Pawn / Core
graphics.inc
Source / SDK 6.1 / Pawn / Core
leaderboard.inc
Source / SDK 6.1 / Pawn / Core
log.inc
Source / SDK 6.1 / Pawn / Core
Previous Node
math.inc
Source / SDK 6.1 / Pawn / Core
Next Node
network.inc
Source / SDK 6.1 / Pawn / Core