SDL_SensorEvent Struct Reference

`#include <SDL_events.h>`

## Data Fields

SDL_EventType | type
Uint32 | reserved
Uint64 | timestamp
SDL_SensorID | which
float | data [6]
Uint64 | sensor_timestamp

## Detailed Description

Sensor event structure (event.sensor.*)

Since
  This struct is available since SDL 3.2.0.

Definition at line 933 of file SDL_events.h.

## Field Documentation

## data

float SDL_SensorEvent::data[6]

Up to 6 values from the sensor - additional values can be queried using SDL_GetSensorData()

Definition at line 939 of file SDL_events.h.

## reserved

Uint32 SDL_SensorEvent::reserved

Definition at line 936 of file SDL_events.h.

## sensor_timestamp

Uint64 SDL_SensorEvent::sensor_timestamp

The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock

Definition at line 940 of file SDL_events.h.

## timestamp

Uint64 SDL_SensorEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 937 of file SDL_events.h.

## type

SDL_EventType SDL_SensorEvent::type

SDL_EVENT_SENSOR_UPDATE

Definition at line 935 of file SDL_events.h.

## which

SDL_SensorID SDL_SensorEvent::which

The instance ID of the sensor

Definition at line 938 of file SDL_events.h.

The documentation for this struct was generated from the following file:

- SDL_events.h