30 #if defined(MRPT_OS_LINUX) 37 std::vector<bool> m_joystate_btns;
40 std::vector<int> m_joystate_axes;
82 int nJoy,
float&
x,
float&
y,
float&
z, std::vector<bool>& buttons,
83 int* raw_x_pos =
nullptr,
int* raw_y_pos =
nullptr,
84 int* raw_z_pos =
nullptr);
94 int x_min = 0,
int x_max = 0xFFFF,
int y_min = 0,
int y_max = 0xFFFF,
95 int z_min = 0,
int z_max = 0xFFFF);
98 int x_min = -32767,
int x_max = 32767,
int y_min = -32767,
99 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.