Go to the documentation of this file.
6 #ifndef CNOID_UTIL_JOYSTICK_H
7 #define CNOID_UTIL_JOYSTICK_H
12 #include "exportdecl.h"
25 std::string device()
const;
26 int fileDescriptor()
const;
30 const char* errorMessage()
const;
59 virtual int numAxes()
const override;
60 virtual int numButtons()
const override;
61 virtual bool readCurrentState()
override;
62 virtual double getPosition(
int axis)
const override;
63 virtual bool getButtonState(
int button)
const override;
65 void setAxisEnabled(
int axis,
bool on);
71 bool getButtonDown(
int button)
const;
72 bool getButtonUp(
int button)
const;
73 bool getButtonHold(
int button,
int duration)
const;
74 bool getButtonHoldOn(
int button,
int duration)
const;
77 bool isActive()
const;
78 SignalProxy<void(
int id,
bool isPressed)> sigButton();
79 SignalProxy<void(
int id,
double position)> sigAxis();
83 friend class JoystickImpl;
@ LOGO_BUTTON
Definition: Joystick.h:55
@ A_BUTTON
Definition: Joystick.h:45
@ Y_BUTTON
Definition: Joystick.h:48
@ B_BUTTON
Definition: Joystick.h:46
Definition: Joystick.h:18
@ R_STICK_H_AXIS
Definition: Joystick.h:35
@ R_TRIGGER_AXIS
Definition: Joystick.h:40
@ DIRECTIONAL_PAD_V_AXIS
Definition: Joystick.h:38
Definition: JoystickInterface.h:13
@ R_BUTTON
Definition: Joystick.h:50
AxisID
Definition: Joystick.h:32
@ START_BUTTON
Definition: Joystick.h:52
@ L_STICK_BUTTON
Definition: Joystick.h:53
@ L_BUTTON
Definition: Joystick.h:49
@ DIRECTIONAL_PAD_H_AXIS
Definition: Joystick.h:37
Definition: AbstractSceneLoader.h:11
ButtonID
Definition: Joystick.h:44
@ SELECT_BUTTON
Definition: Joystick.h:51
@ L_STICK_V_AXIS
Definition: Joystick.h:34
@ R_STICK_BUTTON
Definition: Joystick.h:54
@ X_BUTTON
Definition: Joystick.h:47
@ L_STICK_H_AXIS
Definition: Joystick.h:33
@ R_STICK_V_AXIS
Definition: Joystick.h:36
@ L_TRIGGER_AXIS
Definition: Joystick.h:39