sensor topic

CategorySensor

SDL sensor management.

These APIs grant access to gyros and accelerometers on various platforms.

In order to use these functions, 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.

Functions

sdlCloseSensor(Pointer<SdlSensor> sensor) → void sensor
Close a sensor previously opened with SDL_OpenSensor().
sdlGetSensorData(Pointer<SdlSensor> sensor, Pointer<Float> data, int numValues) bool sensor
Get the current state of an opened sensor.
sdlGetSensorFromId(int instanceId) Pointer<SdlSensor> sensor
Return the SDL_Sensor associated with an instance ID.
sdlGetSensorId(Pointer<SdlSensor> sensor) int sensor
Get the instance ID of a sensor.
sdlGetSensorName(Pointer<SdlSensor> sensor) String? sensor
Get the implementation dependent name of a sensor.
sdlGetSensorNameForId(int instanceId) String? sensor
Get the implementation dependent name of a sensor.
sdlGetSensorNonPortableType(Pointer<SdlSensor> sensor) int sensor
Get the platform dependent type of a sensor.
sdlGetSensorNonPortableTypeForId(int instanceId) int sensor
Get the platform dependent type of a sensor.
sdlGetSensorProperties(Pointer<SdlSensor> sensor) int sensor
Get the properties associated with a sensor.
sdlGetSensors(Pointer<Int32> count) Pointer<Uint32> sensor
Get a list of currently connected sensors.
sdlGetSensorType(Pointer<SdlSensor> sensor) int sensor
Get the type of a sensor.
sdlGetSensorTypeForId(int instanceId) int sensor
Get the type of a sensor.
sdlOpenSensor(int instanceId) Pointer<SdlSensor> sensor
Open a sensor for use.
sdlUpdateSensors() → void sensor
Update the current state of the open sensors.