Choreonoid
1.8
src
Base
JoystickCapture.h
Go to the documentation of this file.
1
6
#ifndef CNOID_BASE_JOYSTICK_CAPTURE_H
7
#define CNOID_BASE_JOYSTICK_CAPTURE_H
8
9
#include <cnoid/Signal>
10
#include "exportdecl.h"
11
12
namespace
cnoid
{
13
14
class
JoystickCaptureImpl;
15
16
class
CNOID_EXPORT
JoystickCapture
17
{
18
public
:
19
JoystickCapture
();
20
~
JoystickCapture
();
21
22
bool
setDevice(
const
char
* device);
23
bool
isReady()
const
;
24
void
releaseDevice();
25
26
SignalProxy
<void(
int
id
,
bool
isPressed)> sigButton();
27
SignalProxy
<void(
int
id
,
double
position)> sigAxis();
28
29
int
numAxes()
const
;
30
void
setAxisEnabled(
int
axis,
bool
on);
31
int
numButtons()
const
;
32
bool
readCurrentState();
33
double
getPosition(
int
axis)
const
;
34
bool
getButtonState(
int
button)
const
;
35
bool
isActive()
const
;
36
37
private
:
38
JoystickCaptureImpl* impl;
39
};
40
41
}
42
43
#endif
cnoid
Definition:
AbstractSceneLoader.h:11
cnoid::JoystickCapture
Definition:
JoystickCapture.h:16
cnoid::SignalProxy
Definition:
Signal.h:470
Generated by
1.8.17