17 #ifndef VIRTUALCONTROLLER_H
18 #define VIRTUALCONTROLLER_H
22 #include "ControllerEvent.h"
23 #include "InputScheme.h"
24 #include "JoystickAxisScheme.h"
25 #include "KeyScheme.h"
26 #include "TriggerAxisScheme.h"
132 std::map<InputScheme<>::Action, std::vector<JoystickAxisCode> > mActionJoystickAxes;
136 std::map<InputScheme<>::Action, std::vector<KeyCode> > mActionKeys;
140 std::map<InputScheme<>::Action, std::vector<TriggerAxisCode> > mActionTriggerAxes;
148 #endif // VIRTUALCONTROLLER_H
Action has a normalized [0.0f, 1.0f] real value.
Definition: VirtualController.h:55
Represents a scheme mapping input trigger axes to output actions.
Definition: TriggerAxisScheme.h:28
Software represention and state capable of describing almost all physical controllers.
Definition: VirtualController.h:36
Action is binary (i.e. can be "on/off").
Definition: VirtualController.h:50
void setTriggerAxisScheme(const TriggerAxisScheme &triggerAxisScheme)
Sets the VirtualController's TriggerAxisScheme.
virtual float getActionUnitIntervalValue(const InputScheme<>::Action &action) const
Returns the [0.0f, 1.0f] unit interval value for action.
int getDeviceId() const
Returns the VirtualController's device identifier.
Definition: VirtualController.h:90
A platform independent event generated by controller device.
Definition: ControllerEvent.h:34
Represents a scheme mapping input joystick axes to output actions.
Definition: JoystickAxisScheme.h:28
virtual bool onControllerEvent(ControllerEvent *event)
Notifies the VirtualController of the event.
virtual int getActionSupport(const InputScheme<>::Action &action) const
Returns the VirtualController's type of support for action (as a set of flags).
void setJoystickAxisScheme(const JoystickAxisScheme &joystickAxisScheme)
Sets the VirtualController's JoystickAxisScheme.
virtual bool isActionActivated(const InputScheme<>::Action &action) const
Returns whether or not action is "activated" (i.e. the binary value of the action).
Action has a bipolar [-1.0f, 1.0f] real value.
Definition: VirtualController.h:60
SupportedAsFlag
Flags to specify how an action is supported (i.e. what data can be retrieved for it).
Definition: VirtualController.h:41
bool isSourceOfEvent(ControllerEvent *event) const
Returns whether or not this VirtualController, and the device it abstracts, is the source of event...
Represents a scheme mapping keyboard input to output actions.
Definition: KeyScheme.h:28
VirtualController(int deviceId)
Constructs a VirtualController with the specified deviceId.
void setKeyScheme(const KeyScheme &keyScheme)
Sets the VirtualController's KeyScheme.
virtual float getActionSymmetricUnitIntervalValue(const InputScheme<>::Action &action) const
Returns the [-1.0f, 1.0f] symmetric unit interval value for action.
Action is unsupported.
Definition: VirtualController.h:45