载入中...
搜索中...
未找到
eve::joystick::Pad类 参考abstract

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>

类 eve::joystick::Pad 继承关系图:
eve::joystick::sdl::Pad

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.h13 行定义.

构造及析构函数说明

◆ ~Pad()

virtual eve::joystick::Pad::~Pad ( )
virtualdefault

成员函数说明

◆ close()

virtual void eve::joystick::Pad::close ( )
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getAxes()

virtual std::vector< float > eve::joystick::Pad::getAxes ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getAxis()

virtual float eve::joystick::Pad::getAxis ( int  axisindex) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getAxisCount()

virtual int eve::joystick::Pad::getAxisCount ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getButtonCount()

virtual int eve::joystick::Pad::getButtonCount ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getDeviceInfo()

virtual void eve::joystick::Pad::getDeviceInfo ( int &  vendorID,
int &  productID,
int &  productVersion 
) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getGamepadAxis()

virtual float eve::joystick::Pad::getGamepadAxis ( const std::string &  axis) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getGamepadMappingString()

virtual std::string eve::joystick::Pad::getGamepadMappingString ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getGUID()

virtual std::string eve::joystick::Pad::getGUID ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getHandle()

virtual void * eve::joystick::Pad::getHandle ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getHat()

virtual std::string eve::joystick::Pad::getHat ( int  hatindex) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getHatCount()

virtual int eve::joystick::Pad::getHatCount ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getID()

virtual int eve::joystick::Pad::getID ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getInstanceID()

virtual int eve::joystick::Pad::getInstanceID ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getName()

virtual std::string eve::joystick::Pad::getName ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ getVibration()

virtual void eve::joystick::Pad::getVibration ( float &  left,
float &  right 
)
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ isConnected()

virtual bool eve::joystick::Pad::isConnected ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ isDown() [1/2]

virtual bool eve::joystick::Pad::isDown ( const std::vector< int > &  buttons) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ isDown() [2/2]

virtual bool eve::joystick::Pad::isDown ( int  button) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ isGamepad()

virtual bool eve::joystick::Pad::isGamepad ( ) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ isGamepadDown() [1/2]

virtual bool eve::joystick::Pad::isGamepadDown ( const std::string &  button) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ isGamepadDown() [2/2]

virtual bool eve::joystick::Pad::isGamepadDown ( const std::vector< std::string > &  buttons) const
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ isVibrationSupported()

virtual bool eve::joystick::Pad::isVibrationSupported ( )
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ open()

virtual bool eve::joystick::Pad::open ( int  deviceindex)
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ openGamepad()

virtual bool eve::joystick::Pad::openGamepad ( int  deviceindex)
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ setVibration() [1/2]

virtual bool eve::joystick::Pad::setVibration ( )
pure virtual

eve::joystick::sdl::Pad 内被实现.

◆ setVibration() [2/2]

virtual bool eve::joystick::Pad::setVibration ( float  left,
float  right,
float  duration = -1.0f 
)
pure virtual

eve::joystick::sdl::Pad 内被实现.


该类的文档由以下文件生成:
  • src/modules/joystick/Pad.h