#include <PhxLogicalInputEngine.h>
Inheritance diagram for Phx::LogicalInputEngine:

Public Types | |
| typedef double | AxisState |
| Value type for axis state. | |
| typedef ValueType< ButtonStateClass, uint8_t > | ButtonState |
| Value type for button state. | |
Public Member Functions | |
| virtual void | rawInputEngine (const Ptr< RawInputEngine > &rawInputEngine)=0 |
| virtual Ptr< AxisClient > | newAxisClient (const String &axisName)=0 |
| Creates a new AxisClient interface for the logical axis specified by the given name. | |
| virtual Ptr< ButtonClient > | newButtonClient (const String &buttonName)=0 |
| Creates a new ButtonClient interface for the logical button specified by the given name. | |
| virtual Ptr< AnalogAxisDriver > | newAnalogAxisDriver (const String &axisName)=0 |
Creates a new AnalogAxisDriver that will bind the logical axis axisName to a raw analog axis. | |
| virtual Ptr< DigitalAxisDriver > | newDigitalAxisDriver (const String &axisName)=0 |
Creates a new DigitalAxisDriver that will bind the logical axis axisName to a set of raw buttons. | |
| virtual Ptr< AnalogButtonDriver > | newAnalogButtonDriver (const String &buttonName)=0 |
Creates a new AnalogButtonDriver that will bind the logical button buttonName to a raw analog axis. | |
| virtual Ptr< DigitalButtonDriver > | newDigitalButtonDriver (const String &buttonName)=0 |
Creates a new DigitalButtonDriver that will bind the logical button buttonName to a set of raw buttons. | |
| virtual void | listener (Listener *listener)=0 |
| Sets the Listener that will be notified when logical. | |
Static Public Attributes | |
| static const NamedInterface::Type | INTERFACE_TYPE |
| static const String | INTERFACE_TYPE_NAME |
| static const NamedInterface::Identifier | LOGICAL_INPUT_ENGINE_IDENTIFIER |
| static const String | LOGICAL_INPUT_ENGINE_NAME |
| static const ButtonState | PRESSED |
| The standard "pressed" state for 2-state buttons. | |
| static const ButtonState | RELEASED |
| The standard "released" state for 2-state buttons. | |
Classes | |
| class | AnalogAxisDriver |
| A LogicalInputEngine driver that binds a logical axis directly to an raw axis. More... | |
| class | AnalogButtonDriver |
| A LogicalInputEngine driver that triggers its logical button whenever an analog axis exceeds a threshold value. More... | |
| class | AxisClient |
| A sub-interface of LogicalInputEngine that allows a client to retrieve the state of a logical axis. More... | |
| class | AxisDriver |
| An abstract interface to a driver for a logical axis created by the LogicalInputEngine. More... | |
| class | AxisSpec |
| A value-type that specifies a raw axis by its driver and identifier. More... | |
| class | ButtonClient |
| A sub-interface of LogicalInputEngine that allows a client to retrieve the state of a logical button. More... | |
| class | ButtonDriver |
| An abstract interface to a driver for a logical button created by the LogicalInputEngine. More... | |
| class | ButtonSpec |
| A value-type that specifies a raw button by its driver and identifier. More... | |
| class | ButtonSpecState |
| A value type that specifies a raw button with a ButtonSpec and a state for that button. More... | |
| class | DigitalAxisDriver |
| A LogicalInputEngine driver that controls a logical axis by binding it to a set of raw buttons. More... | |
| class | DigitalButtonDriver |
| A LogicalInputEngine driver that triggers a logical button when a set of raw buttons enter specified states. More... | |
| class | Listener |
| A listener that can receive notifications as axis and button clients are created. More... | |
The logical input engine acts as an organizer for drivers and interfaces to digital-type button inputs and analog-type axis inputs. The logical inputs (as seen by game objects) are identified by string names.
Game objects can retrieve client interfaces that allow them to poll the current state of logical buttons/axes, or be notified when the state of the button/axis changes.
For each logical axis or button, there is a corresopnding driver (also called a "binding") whose job is to determine the logical state given the current state of raw input devices. In simple cases, this merely involves forwarding information from a single raw input (e.g., feeding the raw joystick data to the logical aircraft control stick). In other cases, the driver may use combinations of buttons and/or axes (possibly coming from multiple devices) to determine the output of a single logical button or axis. For instance, an infrequently used knob in the cockpit could be controlled by holding down Shift and then rotating a knob on the joystick (note that one event is from the keyboard, the other from a joystick). Another example: a user that does not have an appropriate physical device may want to emulate a logical axis by using several keys on the keyboard to increase/decrease/center the axis (e.g., for rudder control if they do not own pedals; or the radar range knob if their HOTAS does not have a knob for this).
|
|
Value type for axis state. Unlike the RawInputEngine::AxisState, which represents raw digital values, this represents a "continuous" value, normalized to the full range of the axis. |
|
|
Value type for button state. This is essentially the same value as the value reported by the raw input layer. Typically, a button state has a value matching the constants PRESSED or RELEASED; however, multistage buttons (e.g., a 2-stage trigger) may define more states.
|
|
|
Sets the Listener that will be notified when logical. axes/buttons are created.
|
|
|
Creates a new AnalogAxisDriver that will bind the logical axis
|
|
|
Creates a new AnalogButtonDriver that will bind the logical button
|
|
|
Creates a new AxisClient interface for the logical axis specified by the given name.
|
|
|
Creates a new ButtonClient interface for the logical button specified by the given name.
|
|
|
Creates a new DigitalAxisDriver that will bind the logical axis
|
|
|
Creates a new DigitalButtonDriver that will bind the logical button
|
1.4.2