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