|
VoltAir
|
Factory for constructing VirtualControllers to represent gamepad devices as controllers. More...
Public Member Functions | |
| GamepadControllerFactory (const KeyScheme &keyScheme, const JoystickAxisScheme &joystickAxisScheme, const TriggerAxisScheme &triggerAxisScheme) | |
| Constructs a GamepadControllerFactory from input schemes. More... | |
| virtual VirtualController * | createNewController (int deviceId) const override |
Returns a new VirtualController for the specified deviceId. More... | |
| virtual bool | intersects (const ControllerFactory &otherFactory) const override |
| Returns whether or not this ControllerFactory intersects (i.e. overlaps input schemes) with the specified ControllerFactory. More... | |
| bool | intersects (const GamepadControllerFactory &otherFactory) const |
| Returns whether or not this GamepadControllerFactory intersects (i.e. overlaps input schemes) with the specified GamepadControllerFactory. More... | |
| virtual bool | handlesControllerEvent (const ControllerEvent *event) const override |
Returns whether or not this ControllerFactory can process the specified event. More... | |
Static Public Attributes | |
| static std::set< KeyCode > | sValidKeyCodes |
| Set of KeyCodes valid as input on a gamepad. More... | |
| static std::set< JoystickAxisCode > | sValidJoystickAxisCodes |
| Set of JoystickAxisCodes valid as input on a gamepad. More... | |
| static std::set< TriggerAxisCode > | sValidTriggerAxisCodes |
| Set of TriggerAxisCodes valid as input on a gamepad. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ControllerFactory | |
| template<typename Input > | |
| static bool | isValidInputScheme (const InputScheme< Input > &scheme, std::set< Input > &validInputs) |
| Returns whether or not the given InputScheme is valid (i.e. only contains input mappings which are valid) according to the specified validation set. More... | |
Factory for constructing VirtualControllers to represent gamepad devices as controllers.
|
explicit |
Constructs a GamepadControllerFactory from input schemes.
| keyScheme | KeyScheme for constructed VirtualControllers |
| joystickAxisScheme | JoystickAxisScheme for constructed VirtualControllers |
| triggerAxisScheme | TriggerAxisScheme for constructed VirtualControllers |
|
overridevirtual |
Returns a new VirtualController for the specified deviceId.
| deviceId | Id to identify the constructed VirtualController |
Implements ControllerFactory.
|
overridevirtual |
Returns whether or not this ControllerFactory can process the specified event.
| event | ControllerEvent to check for affinity with this ControllerFactory |
Implements ControllerFactory.
|
overridevirtual |
Returns whether or not this ControllerFactory intersects (i.e. overlaps input schemes) with the specified ControllerFactory.
true for handlesControllerEvent() when passed the same event. | otherFactory | ControllerFactory to test for intersection with this |
Implements ControllerFactory.
| bool GamepadRouter::GamepadControllerFactory::intersects | ( | const GamepadControllerFactory & | otherFactory | ) | const |
Returns whether or not this GamepadControllerFactory intersects (i.e. overlaps input schemes) with the specified GamepadControllerFactory.
true for handlesControllerEvent() when passed the same event. | otherFactory | GamepadControllerFactory to test for intersection with this |
|
static |
Set of JoystickAxisCodes valid as input on a gamepad.
|
static |
Set of KeyCodes valid as input on a gamepad.
|
static |
Set of TriggerAxisCodes valid as input on a gamepad.