sdl.sensor

SDL Sensor Handling

Members

Aliases

SDL_SensorID
alias SDL_SensorID = Uint32

This is a unique ID for a sensor for the time it is connected to the system, and is never reused for the lifetime of the application.

Enums

SDL_SensorType
enum SDL_SensorType

The different sensors defined by SDL.

Functions

SDL_CloseSensor
void SDL_CloseSensor(SDL_Sensor* sensor)

Close a sensor previously opened with SDL_OpenSensor().

SDL_GetSensorData
bool SDL_GetSensorData(SDL_Sensor* sensor, float* data, int num_values)

Get the current state of an opened sensor.

SDL_GetSensorFromID
SDL_Sensor* SDL_GetSensorFromID(SDL_SensorID instance_id)

Return the SDL_Sensor associated with an instance ID.

SDL_GetSensorID
SDL_SensorID SDL_GetSensorID(SDL_Sensor* sensor)

Get the instance ID of a sensor.

SDL_GetSensorName
const(char)* SDL_GetSensorName(SDL_Sensor* sensor)

Get the implementation dependent name of a sensor.

SDL_GetSensorNameForID
const(char)* SDL_GetSensorNameForID(SDL_SensorID instance_id)

Get the implementation dependent name of a sensor.

SDL_GetSensorNonPortableType
int SDL_GetSensorNonPortableType(SDL_Sensor* sensor)

Get the platform dependent type of a sensor.

SDL_GetSensorNonPortableTypeForID
int SDL_GetSensorNonPortableTypeForID(SDL_SensorID instance_id)

Get the platform dependent type of a sensor.

SDL_GetSensorProperties
SDL_PropertiesID SDL_GetSensorProperties(SDL_Sensor* sensor)

Get the properties associated with a sensor.

SDL_GetSensorType
SDL_SensorType SDL_GetSensorType(SDL_Sensor* sensor)

Get the type of a sensor.

SDL_GetSensorTypeForID
SDL_SensorType SDL_GetSensorTypeForID(SDL_SensorID instance_id)

Get the type of a sensor.

SDL_GetSensors
SDL_SensorID* SDL_GetSensors(int* count)

Get a list of currently connected sensors.

SDL_OpenSensor
SDL_Sensor* SDL_OpenSensor(SDL_SensorID instance_id)

Open a sensor for use.

SDL_UpdateSensors
void SDL_UpdateSensors()

Update the current state of the open sensors.

Manifest constants

SDL_STANDARD_GRAVITY
enum SDL_STANDARD_GRAVITY;

A constant to represent standard gravity for accelerometer sensors.

Structs

SDL_Sensor
struct SDL_Sensor

The opaque structure used to identify an opened SDL sensor.

See Also

Meta

License

Subject to the terms of the Zlib License, as written in the LICENSE file.

Authors

Luna Nielsen