32 #if defined(MRPT_OS_LINUX) 84 int nJoy,
float&
x,
float&
y,
float&
z, std::vector<bool>& buttons,
85 int* raw_x_pos =
nullptr,
int* raw_y_pos =
nullptr,
86 int* raw_z_pos =
nullptr);
94 #ifdef MRPT_OS_WINDOWS 96 int x_min = 0,
int x_max = 0xFFFF,
int y_min = 0,
int y_max = 0xFFFF,
97 int z_min = 0,
int z_max = 0xFFFF);
100 int x_min = -32767,
int x_max = 32767,
int y_min = -32767,
101 int y_max = 32767,
int z_min = -32767,
int z_max = 32767);
std::vector< bool > vector_bool
A type for passing a vector of bools.
int m_x_min
The axis limits:
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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.
void setLimits(int x_min=-32767, int x_max=32767, int y_min=-32767, int y_max=32767, int z_min=-32767, int z_max=32767)
Set the axis limit values, for computing a [-1,1] position index easily (Only required to calibrate a...
std::vector< int32_t > vector_int
Access to joysticks and gamepads (read buttons and position), and request number of joysticks in the ...
virtual ~CJoystick()
Destructor.