One connected (or previously connected) joystick / gamepad device. Gamepad axis/button names follow SDL GameController strings (e.g. "leftx", "a", "dpup"). Hat directions: c/u/d/l/r/lu/ld/ru/rd. 更多...
#include <Pad.h>
Public 成员函数 | |
| virtual | ~Pad ()=default |
| virtual bool | open (int deviceindex)=0 |
| virtual void | close ()=0 |
| virtual bool | isConnected () const =0 |
| virtual std::string | getName () const =0 |
| virtual int | getAxisCount () const =0 |
| virtual int | getButtonCount () const =0 |
| virtual int | getHatCount () const =0 |
| virtual float | getAxis (int axisindex) const =0 |
| virtual std::vector< float > | getAxes () const =0 |
| virtual std::string | getHat (int hatindex) const =0 |
| virtual bool | isDown (int button) const =0 |
| virtual bool | isDown (const std::vector< int > &buttons) const =0 |
| virtual bool | openGamepad (int deviceindex)=0 |
| virtual bool | isGamepad () const =0 |
| virtual float | getGamepadAxis (const std::string &axis) const =0 |
| virtual bool | isGamepadDown (const std::string &button) const =0 |
| virtual bool | isGamepadDown (const std::vector< std::string > &buttons) const =0 |
| virtual std::string | getGamepadMappingString () const =0 |
| virtual void * | getHandle () const =0 |
| virtual std::string | getGUID () const =0 |
| virtual int | getInstanceID () const =0 |
| virtual int | getID () const =0 |
| virtual void | getDeviceInfo (int &vendorID, int &productID, int &productVersion) const =0 |
| virtual bool | isVibrationSupported ()=0 |
| virtual bool | setVibration (float left, float right, float duration=-1.0f)=0 |
| virtual bool | setVibration ()=0 |
| virtual void | getVibration (float &left, float &right)=0 |
详细描述
One connected (or previously connected) joystick / gamepad device. Gamepad axis/button names follow SDL GameController strings (e.g. "leftx", "a", "dpup"). Hat directions: c/u/d/l/r/lu/ld/ru/rd.
构造及析构函数说明
◆ ~Pad()
|
virtualdefault |
被 eve::joystick::sdl::Pad 重载.
成员函数说明
◆ close()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getAxes()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getAxis()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getAxisCount()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getButtonCount()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getDeviceInfo()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getGamepadAxis()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getGamepadMappingString()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getGUID()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getHandle()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getHat()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getHatCount()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getID()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getInstanceID()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getName()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ getVibration()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ isConnected()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ isDown() [1/2]
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ isDown() [2/2]
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ isGamepad()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ isGamepadDown() [1/2]
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ isGamepadDown() [2/2]
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ isVibrationSupported()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ open()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ openGamepad()
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ setVibration() [1/2]
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
◆ setVibration() [2/2]
|
pure virtual |
在 eve::joystick::sdl::Pad 内被实现.
该类的文档由以下文件生成:
- src/modules/joystick/Pad.h