FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
Ship::joystick::JoystickState Struct Reference

#include <JoystickInput.h>

Public Member Functions

std::int16_t Axis (int i) const
 
bool Button (int i) const
 
std::uint8_t Hat (int i) const
 
double ScaledAxis (int i) const
 The OIS axis i, scaled (mAxes[i].abs / MAX_AXIS).
 
double ScaledSlider (int k) const
 The OIS slider k, scaled (mSliders[k].abX / MAX_AXIS); SDL axis kSliderAxisOffset + k.
 

Public Attributes

std::vector< std::int16_t > axes
 
std::vector< std::uint8_t > buttons
 
std::vector< std::uint8_t > hats
 

Detailed Description

A snapshot of a joystick: SDL axes (sliders included), buttons and hats. A missing element reads as neutral: axis 0, button released, hat centered.


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