class
FDeviceSensors
- Module
- Input
- Header
#include "Input/DeviceSensors.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
FDeviceSensors& | Get | |
void | SetSource | Replaces the source; null falls back to the platform's (SDL sensors on Android and iOS, nothing elsewhere). |
void | Update | |
bool | HasAccelerometer | |
bool | HasGyroscope | |
bool | HasCompass | |
bool | HasLocation | |
Vec3 | GetAcceleration | |
Vec3 | GetRotationRate | |
Vec3 | GetGravity | Unit vector pointing down in device axes (the accelerometer at rest). |
float | GetPitchDegrees | Rotation about the device X axis (screen top tilting away is positive) and about the Y axis, in degrees; both 0 with the device flat, face up. |
float | GetRollDegrees | |
float | GetCompassHeadingDegrees | Degrees clockwise from magnetic north that the device's +Y axis points, 0 to 360, compensated for tilt using gravity. |
double | GetLatitude | |
double | GetLongitude | |
float | GetAltitudeMeters | |
float | GetLocationAccuracyMeters |
Function details
Get
C++
static FDeviceSensors& Get()SetSource
C++
void SetSource(std::unique_ptr<IDeviceSensorSource> source)Replaces the source; null falls back to the platform's (SDL sensors on Android and iOS, nothing elsewhere).
Update
C++
void Update()HasAccelerometer
C++
bool HasAccelerometer() constHasGyroscope
C++
bool HasGyroscope() constHasCompass
C++
bool HasCompass() constHasLocation
C++
bool HasLocation() constGetAcceleration
C++
Vec3 GetAcceleration() constGetRotationRate
C++
Vec3 GetRotationRate() constGetGravity
C++
Vec3 GetGravity() constUnit vector pointing down in device axes (the accelerometer at rest).
GetPitchDegrees
C++
float GetPitchDegrees() constRotation about the device X axis (screen top tilting away is positive) and about the Y axis, in degrees; both 0 with the device flat, face up.
GetRollDegrees
C++
float GetRollDegrees() constGetCompassHeadingDegrees
C++
float GetCompassHeadingDegrees() constDegrees clockwise from magnetic north that the device's +Y axis points, 0 to 360, compensated for tilt using gravity. 0 without a compass.
GetLatitude
C++
double GetLatitude() constGetLongitude
C++
double GetLongitude() constGetAltitudeMeters
C++
float GetAltitudeMeters() constGetLocationAccuracyMeters
C++
float GetLocationAccuracyMeters() constGenerated from Input/DeviceSensors.h via input.json · Dec 5, 2026Version 1.1.0