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.3Pawnmotion_sensor.inc

motion sensor.inc

SDK Source File: motion_sensor.inc

Source / SDK 6.3 / 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 * * pat - count of pats in the sequence
11 ******/
12
13/****e* PawnLibs/motion_sensor/ON_Pat
14 * Summary
15 * Pats handler.
16 * Synopsis
17 */
18forward ON_Tap(const count, const display, const bool:opposite);
19forward ON_Pat(const count, const display, const bool:opposite);
20/*
21 * Description
22 * Public function with such signature will be called when the pats sequence
23 * is detected.
24 * Inputs
25 * * count - how many pats there are in the pats sequence
26 * * display - TBD: currently most recent pats axis
27 * * opposite - true, if most recent pat was detected from the opposite side
28 * of cube
29 * History
30 * * v6.2 - ON_Tap is deprecated, added ON_Pat alias
31 ******/
32
33/****n* PawnLibs/motion_sensor/MS_getFaceAccelX
34 * Summary
35 * Get accelerometer value along X axis of some display.
36 * Synopsis
37 */
38native MS_getFaceAccelX(const display);
39/* Inputs
40 * * display - for which accelerometer value will be returned
41 * Return value
42 * Accelerometer value along X axis.
43 ******/
44
45/****n* PawnLibs/motion_sensor/MS_getFaceAccelY
46 * Summary
47 * Get accelerometer value along Y axis of some display.
48 * Synopsis
49 */
50native MS_getFaceAccelY(const display);
51/* Inputs
52 * * display - for which accelerometer value will be returned
53 * Return value
54 * Accelerometer value along Y axis.
55 ******/
56
57/****n* PawnLibs/motion_sensor/MS_getFaceAccelZ
58 * Summary
59 * Get accelerometer value along Z axis of some display.
60 * Synopsis
61 */
62native MS_getFaceAccelZ(const display);
63/*
64 * Description
65 * Z axis directed towards the center of the cube - TBD: check.
66 * Inputs
67 * * display - for which accelerometer value will be returned
68 * Return value
69 * Accelerometer value along Z axis.
70 ******/
71
72/****n* PawnLibs/motion_sensor/MS_getFaceGyroX
73 * Summary
74 * Get gyroscope value around X axis of some display.
75 * Synopsis
76 */
77native MS_getFaceGyroX(const display);
78/*
79 * Description
80 * Value increases clockwise - TBD: check.
81 * Inputs
82 * * display - for which gyroscope value will be returned
83 * Return value
84 * Gyroscope value around X axis.
85 ******/
86
87/****n* PawnLibs/motion_sensor/MS_getFaceGyroY
88 * Summary
89 * Get gyroscope value around Y axis of some display.
90 * Synopsis
91 */
92native MS_getFaceGyroY(const display);
93/*
94 * Description
95 * Value increases clockwise - TBD: check.
96 * Inputs
97 * * display - for which gyroscope value will be returned
98 * Return value
99 * Gyroscope value around Y axis.
100 ******/
101
102/****n* PawnLibs/motion_sensor/MS_getFaceGyroZ
103 * Summary
104 * Get gyroscope value around Z axis of some display.
105 * Synopsis
106 */
107native MS_getFaceGyroZ(const display);
108/*
109 * Description
110 * Value increases clockwise - TBD: check.
111 * Inputs
112 * * display - for which gyroscope value will be returned
113 * Return value
114 * Gyroscope value around Z axis.
115 ******/
116
117
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Related nodes

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