[−][src]Module fermium::sensor
Lets SDL use various sensors (such as the accelerometer in a phone).
[SDL_Init
] must have been called with the [SDL_INIT_SENSOR
] flag. This
causes SDL to scan the system for sensors, and load appropriate drivers.
Structs
SDL_Sensor | SDL's opaque sensor type. |
SDL_SensorID | This is a unique ID for a sensor for the time it is connected to the system. |
SDL_SensorType | The different sensors defined by SDL |
Constants
SDL_SENSOR_ACCEL | Accelerometer |
SDL_SENSOR_GYRO | Gyroscope |
SDL_SENSOR_INVALID | Returned for an invalid sensor |
SDL_SENSOR_UNKNOWN | Unknown sensor type |
SDL_STANDARD_GRAVITY | Accelerometer sensor |
Functions
SDL_NumSensors⚠ | Count the number of sensors attached to the system right now. |
SDL_SensorClose⚠ | Close a sensor previously opened with |
SDL_SensorFromInstanceID⚠ | Return the SDL_Sensor associated with an instance id. |
SDL_SensorGetData⚠ | Get the current state of an opened sensor. |
SDL_SensorGetDeviceInstanceID⚠ | Get the instance ID of a sensor. |
SDL_SensorGetDeviceName⚠ | Get the implementation dependent name of a sensor. |
SDL_SensorGetDeviceNonPortableType⚠ | Get the platform dependent type of a sensor. |
SDL_SensorGetDeviceType⚠ | Get the type of a sensor. |
SDL_SensorGetInstanceID⚠ | Get the instance ID of a sensor. |
SDL_SensorGetName⚠ | Get the implementation dependent name of a sensor. |
SDL_SensorGetNonPortableType⚠ | Get the platform dependent type of a sensor. |
SDL_SensorGetType⚠ | Get the type of a sensor. |
SDL_SensorOpen⚠ | Open a sensor for use. |
SDL_SensorUpdate⚠ | Update the current state of the open sensors. |