Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Wraps a generic input device (mouse, keyboard, joystick, controller ...) in a hardware agnostic way. More...
#include <foray_inputdevice.hpp>
Classes | |
class | AxisJoystick |
class | ButtonJoystick |
class | ButtonKeyboard |
class | ButtonMouse |
class | DirectionalMouseScroll |
Public Types | |
enum class | EType : uint8_t { Unknown = 0 , Mouse , Keyboard , Joystick } |
using | AxisPtr = const InputAnalogue * |
Public Member Functions | |
SDL_JoystickGUID | Guid () |
SDL_Joystick * | Joystick () |
const SDL_Joystick * | Joystick () const |
SDL_JoystickID | JoystickId () |
InputDevice () | |
InputDevice (const InputDevice &other)=delete | |
InputDevice (const InputDevice &&other)=delete | |
InputDevice & | operator= (const InputDevice &other)=delete |
const std::vector< AxisPtr > & | Axes () const |
const std::vector< InputBinary * > & | Buttons () const |
const std::vector< InputDirectional * > & | Directionals () const |
const std::string & | Name () const |
EType | Type () const |
const InputBinary * | FindButton (EButton button) const |
Finds a button object based on the corresponding enum value. InputBinary objects are valid until the input device is deleted, so storing the object for later use is a good idea. | |
std::string | BuildDebugPrint () const |
virtual | ~InputDevice () |
Static Public Member Functions | |
static InputDevice * | InitKeyboard (std::vector< std::unique_ptr< InputDevice > > &out) |
static InputDevice * | InitMouse (std::vector< std::unique_ptr< InputDevice > > &out) |
static InputDevice * | InitJoystick (std::vector< std::unique_ptr< InputDevice > > &out, SDL_Joystick *joystick) |
Protected Attributes | |
SDL_JoystickGUID | mGuid |
SDL_Joystick * | mJoystick |
SDL_JoystickID | mJoystickId |
ButtonJoystick * | mJoystickButtons |
AxisJoystick * | mJoystickAxes |
ButtonKeyboard * | mKeyboardButtons |
ButtonMouse * | mMouseButtons |
DirectionalMouseScroll | mMouseScroll |
std::string | mName |
EType | mType |
std::vector< AxisPtr > | mAxes |
std::vector< InputBinary * > | mButtons |
std::vector< InputDirectional * > | mDirectionals |
Wraps a generic input device (mouse, keyboard, joystick, controller ...) in a hardware agnostic way.
using foray::osi::InputDevice::AxisPtr = const InputAnalogue* |
|
strong |
|
inline |
|
delete |
|
delete |
|
virtual |
|
inline |
std::string foray::osi::InputDevice::BuildDebugPrint | ( | ) | const |
|
inline |
|
inline |
const InputBinary * foray::osi::InputDevice::FindButton | ( | EButton | button | ) | const |
Finds a button object based on the corresponding enum value. InputBinary objects are valid until the input device is deleted, so storing the object for later use is a good idea.
|
inline |
|
static |
|
static |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
|
delete |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |