Choreonoid
1.8
src
Util
ExtJoystick.h
Go to the documentation of this file.
1
6
#ifndef CNOID_UTIL_EXT_JOYSTICK_H
7
#define CNOID_UTIL_EXT_JOYSTICK_H
8
9
#include "
Signal.h
"
10
#include <string>
11
#include "exportdecl.h"
12
13
namespace
cnoid
{
14
15
class
CNOID_EXPORT
ExtJoystick
16
{
17
Signal
<void()> sigDestroyed_;
18
19
public
:
20
static
void
registerJoystick(
const
std::string& name,
ExtJoystick
* joystick);
21
static
ExtJoystick
* findJoystick(
const
std::string& name);
22
23
SignalProxy
<void()>
sigDestroyed
() {
return
sigDestroyed_; }
24
25
virtual
~
ExtJoystick
();
26
virtual
int
numAxes()
const
= 0;
27
virtual
int
numButtons()
const
= 0;
28
virtual
bool
readCurrentState() = 0;
29
virtual
double
getPosition(
int
axis)
const
= 0;
30
virtual
bool
getButtonState(
int
button)
const
= 0;
31
virtual
bool
isActive()
const
= 0;
32
virtual
SignalProxy
<void(
int
id
,
double
position)> sigAxis() = 0;
33
virtual
SignalProxy
<void(
int
id
,
bool
isPressed)> sigButton() = 0;
34
};
35
36
}
37
38
#endif
cnoid
Definition:
AbstractSceneLoader.h:11
Signal.h
cnoid::ExtJoystick
Definition:
ExtJoystick.h:15
cnoid::ExtJoystick::sigDestroyed
SignalProxy< void()> sigDestroyed()
Definition:
ExtJoystick.h:23
cnoid::Signal
Definition:
Signal.h:165
cnoid::SignalProxy
Definition:
Signal.h:470
Generated by
1.8.17