|
VoltAir
|
Software represention and state capable of describing almost all physical controllers. More...
Public Types | |
| enum | SupportedAsFlag { NO_SUPPORT = 0x00, BINARY_ACTION = 0x01, UNIT_INTERVAL_ACTION = 0x02, SYMMETRIC_UNIT_INTERVAL_ACTION = 0x04 } |
| Flags to specify how an action is supported (i.e. what data can be retrieved for it). More... | |
Public Member Functions | |
| VirtualController (int deviceId) | |
Constructs a VirtualController with the specified deviceId. More... | |
| void | setJoystickAxisScheme (const JoystickAxisScheme &joystickAxisScheme) |
| Sets the VirtualController's JoystickAxisScheme. More... | |
| void | setKeyScheme (const KeyScheme &keyScheme) |
| Sets the VirtualController's KeyScheme. More... | |
| void | setTriggerAxisScheme (const TriggerAxisScheme &triggerAxisScheme) |
| Sets the VirtualController's TriggerAxisScheme. More... | |
| int | getDeviceId () const |
| Returns the VirtualController's device identifier. More... | |
| bool | isSourceOfEvent (ControllerEvent *event) const |
Returns whether or not this VirtualController, and the device it abstracts, is the source of event. More... | |
| virtual bool | onControllerEvent (ControllerEvent *event) |
Notifies the VirtualController of the event. More... | |
| virtual int | getActionSupport (const InputScheme<>::Action &action) const |
Returns the VirtualController's type of support for action (as a set of flags). More... | |
| virtual bool | isActionActivated (const InputScheme<>::Action &action) const |
Returns whether or not action is "activated" (i.e. the binary value of the action). More... | |
| virtual float | getActionUnitIntervalValue (const InputScheme<>::Action &action) const |
Returns the [0.0f, 1.0f] unit interval value for action. More... | |
| virtual float | getActionSymmetricUnitIntervalValue (const InputScheme<>::Action &action) const |
Returns the [-1.0f, 1.0f] symmetric unit interval value for action. More... | |
Software represention and state capable of describing almost all physical controllers.
Specifically, a VirtualController represents the state of any controller whose input capabilities can be specified in a ControllerEvent. Furthermore, this abstraction stores the state of higher-level, pre-specified actions as opposed to lower level event data.
Flags to specify how an action is supported (i.e. what data can be retrieved for it).
| VirtualController::VirtualController | ( | int | deviceId | ) |
Constructs a VirtualController with the specified deviceId.
| deviceId | Id to identify the VirtualController |
|
virtual |
Returns the VirtualController's type of support for action (as a set of flags).
| action | Action to query the VirtualController's type of support for |
|
virtual |
Returns the [-1.0f, 1.0f] symmetric unit interval value for action.
| action | Action to query for symmetric unit interval value |
|
virtual |
Returns the [0.0f, 1.0f] unit interval value for action.
| action | Action to query for unit interval value |
|
inline |
Returns the VirtualController's device identifier.
|
virtual |
Returns whether or not action is "activated" (i.e. the binary value of the action).
| action | Action to query for binary value |
| bool VirtualController::isSourceOfEvent | ( | ControllerEvent * | event | ) | const |
Returns whether or not this VirtualController, and the device it abstracts, is the source of event.
| event | ControllerEvent to check source of |
|
virtual |
Notifies the VirtualController of the event.
true if event was handled by this VirtualController. | event | ControllerEvent to process |
| void VirtualController::setJoystickAxisScheme | ( | const JoystickAxisScheme & | joystickAxisScheme | ) |
Sets the VirtualController's JoystickAxisScheme.
| joystickAxisScheme | JoystickAxisScheme to use |
| void VirtualController::setKeyScheme | ( | const KeyScheme & | keyScheme | ) |
Sets the VirtualController's KeyScheme.
| keyScheme | KeyScheme to use |
| void VirtualController::setTriggerAxisScheme | ( | const TriggerAxisScheme & | triggerAxisScheme | ) |
Sets the VirtualController's TriggerAxisScheme.
| triggerAxisScheme | TriggerAxisScheme to use |