17 #ifndef GAMEPADROUTER_H
18 #define GAMEPADROUTER_H
22 #include "ControllerEvent.h"
23 #include "ControllerFactory.h"
24 #include "InputRouter.h"
25 #include "JoystickAxisScheme.h"
26 #include "KeyScheme.h"
27 #include "TriggerAxisScheme.h"
106 std::vector<GamepadControllerFactory> mGamepadControllerFactories;
112 #endif // GAMEPADROUTER_H
virtual VirtualController * createNewController(int deviceId) const override
Returns a new VirtualController for the specified deviceId.
virtual bool intersects(const ControllerFactory &otherFactory) const override
Returns whether or not this ControllerFactory intersects (i.e. overlaps input schemes) with the speci...
Represents a scheme mapping input trigger axes to output actions.
Definition: TriggerAxisScheme.h:28
static std::set< JoystickAxisCode > sValidJoystickAxisCodes
Set of JoystickAxisCodes valid as input on a gamepad.
Definition: GamepadRouter.h:76
Software represention and state capable of describing almost all physical controllers.
Definition: VirtualController.h:36
Base interface for constructing virtual controllers from a deviceId.
Definition: ControllerFactory.h:34
A platform independent event generated by controller device.
Definition: ControllerEvent.h:34
Factory for constructing VirtualControllers to represent gamepad devices as controllers.
Definition: GamepadRouter.h:41
Represents a scheme mapping input joystick axes to output actions.
Definition: JoystickAxisScheme.h:28
GamepadControllerFactory(const KeyScheme &keyScheme, const JoystickAxisScheme &joystickAxisScheme, const TriggerAxisScheme &triggerAxisScheme)
Constructs a GamepadControllerFactory from input schemes.
static GamepadRouter * getInstance()
Returns the singleton instance of GamepadRouter.
static std::set< TriggerAxisCode > sValidTriggerAxisCodes
Set of TriggerAxisCodes valid as input on a gamepad.
Definition: GamepadRouter.h:80
static std::set< KeyCode > sValidKeyCodes
Set of KeyCodes valid as input on a gamepad.
Definition: GamepadRouter.h:72
Represents a scheme mapping keyboard input to output actions.
Definition: KeyScheme.h:28
Routes gamepad-related ControllerEvents according to inherent GamepadControllerFactory specifications...
Definition: GamepadRouter.h:34
bool addGamepadControllerFactory(const GamepadControllerFactory &factory)
Adds the specified GamepadControllerFactory to the list of factories to route by. ...
virtual bool handlesControllerEvent(const ControllerEvent *event) const override
Returns whether or not this ControllerFactory can process the specified event.