29 #if defined(MRPT_OS_LINUX) 36 std::vector<bool> m_joystate_btns;
39 std::vector<int> m_joystate_axes;
81 int nJoy,
float& x,
float& y,
float& z, std::vector<bool>& buttons,
82 int* raw_x_pos =
nullptr,
int* raw_y_pos =
nullptr,
83 int* raw_z_pos =
nullptr);
93 int x_min = 0,
int x_max = 0xFFFF,
int y_min = 0,
int y_max = 0xFFFF,
94 int z_min = 0,
int z_max = 0xFFFF);
97 int x_min = -32767,
int x_max = 32767,
int y_min = -32767,
98 int y_max = 32767,
int z_min = -32767,
int z_max = 32767);
Contains classes for various device interfaces.
int m_x_min
The axis limits:
void setLimits(int x_min=0, int x_max=0xFFFF, int y_min=0, int y_max=0xFFFF, int z_min=0, int z_max=0xFFFF)
Set the axis limit values, for computing a [-1,1] position index easily (Only required to calibrate a...
static int getJoysticksCount()
Returns the number of Joysticks in the computer.
bool getJoystickPosition(int nJoy, float &x, float &y, float &z, std::vector< bool > &buttons, int *raw_x_pos=nullptr, int *raw_y_pos=nullptr, int *raw_z_pos=nullptr)
Gets joystick information.
Access to joysticks and gamepads (read buttons and position), and request number of joysticks in the ...
virtual ~CJoystick()
Destructor.