libdonut
2.3.2
Application framework for cross-platform game development in C++20
|
Persistent system for mapping physical Input controls to abstract output numbers and processing input events that control their associated values. More...
#include <donut/events/InputManager.hpp>
Classes | |
struct | Binding |
A single configured binding from a physical input to a set of abstract output numbers. More... | |
Public Types | |
using | Outputs = std::bitset< OUTPUT_COUNT > |
Set of up to OUTPUT_COUNT unique abstract output numbers. More... | |
Public Member Functions | |
InputManager (const InputManagerOptions &options={}) | |
Construct an input manager. More... | |
~InputManager () | |
Destructor. More... | |
InputManager (const InputManager &)=delete | |
Copying an input manager is not allowed, since it manages global state. More... | |
InputManager (InputManager &&)=delete | |
Moving an input manager is not allowed, since it manages global state. More... | |
InputManager & | operator= (const InputManager &)=delete |
Copying an input manager is not allowed, since it manages global state. More... | |
InputManager & | operator= (InputManager &&)=delete |
Moving an input manager is not allowed, since it manages global state. More... | |
void | prepareForEvents () |
Update the internal state to prepare for the input events of the current frame to be handled. More... | |
void | handleEvent (const Event &event) |
Handle an event from an EventPump, which may cause updates to the internal input/output state of the current frame. More... | |
void | bind (Input input, Outputs outputs) |
Bind a physical input to a set of abstract output numbers, overriding the previous binding if one already existed for the same input. More... | |
void | addBinding (Input input, Outputs outputs) |
Bind a physical input to a set of abstract output numbers, adding to the previous binding if one already existed for the same input. More... | |
void | unbind (Input input) |
Remove all outputs from a specific input. More... | |
void | unbindAll () noexcept |
Remove all bindings from all inputs. More... | |
void | press (Input input, i32 offset=32767) noexcept |
Add to an input and apply an offset to all of its bound outputs. More... | |
void | release (Input input, i32 offset=-32767) noexcept |
Subtract from an input and apply an offset to all of its bound outputs. More... | |
void | move (Input input, i32 offset) noexcept |
Trigger a transient press and release of an input that only lasts for the current frame and apply a relative offset to all of its bound outputs. More... | |
void | set (Input input, i32 value) noexcept |
Set the absolute value of all outputs bound to a specific input, without affecting the relative values for the current frame. More... | |
void | resetAllInputs () noexcept |
Reset the internal state of all inputs and outputs for both the current and previous frame. More... | |
void | setMouseSensitivity (float sensitivity) noexcept |
Set the mouse sensitivity coefficient. More... | |
void | setControllerLeftStickSensitivity (float sensitivity) noexcept |
Set the controller left analog stick sensitivity coefficient. More... | |
void | setControllerRightStickSensitivity (float sensitivity) noexcept |
Set the controller right analog stick sensitivity coefficient. More... | |
void | setControllerLeftStickDeadzone (float deadzone) noexcept |
Set the controller left analog stick deadzone fraction. More... | |
void | setControllerRightStickDeadzone (float deadzone) noexcept |
Set the controller right analog stick deadzone fraction. More... | |
void | setControllerLeftTriggerDeadzone (float deadzone) noexcept |
Set the controller left trigger deadzone fraction. More... | |
void | setControllerRightTriggerDeadzone (float deadzone) noexcept |
Set the controller right trigger deadzone fraction. More... | |
void | setTouchMotionSensitivity (float sensitivity) noexcept |
Set the touch finger motion sensitivity coefficient. More... | |
void | setTouchPressureDeadzone (float deadzone) noexcept |
Set the touch finger pressure deadzone fraction. More... | |
bool | hasAnyBindings () const noexcept |
Check if this input manager has any active bindings for any input. More... | |
std::vector< Binding > | getBindings () const |
Get all active bindings of this input manager. More... | |
std::optional< Outputs > | findBinding (Input input) const noexcept |
Get the set of outputs that a specific input is currently bound to. More... | |
std::optional< vec2 > | getMousePosition () const noexcept |
Get the latest known mouse position processed by the input manager. More... | |
bool | mouseJustMoved () const noexcept |
Check if the mouse just moved on the current frame. More... | |
bool | mouseWheelJustScrolledHorizontally () const noexcept |
Check if the mouse wheel was just scrolled horizontally on the current frame. More... | |
bool | mouseWheelJustScrolledVertically () const noexcept |
Check if the mouse wheel was just scrolled vertically on the current frame. More... | |
bool | isControllerConnected () const noexcept |
Check if a controller is currently connected as an active input device. More... | |
std::optional< vec2 > | getControllerLeftStickPosition () const noexcept |
Get the latest known position of the left analog stick of the connected controller, if there is one. More... | |
std::optional< vec2 > | getControllerRightStickPosition () const noexcept |
Get the latest known position of the right analog stick of the connected controller, if there is one. More... | |
std::optional< float > | getControllerLeftTriggerPosition () const noexcept |
Get the latest known position of the left trigger of the connected controller, if there is one. More... | |
std::optional< float > | getControllerRightTriggerPosition () const noexcept |
Get the latest known position of the right trigger of the connected controller, if there is one. More... | |
bool | controllerLeftStickJustMoved () const noexcept |
Check if the controller left analog stick just moved on the current frame. More... | |
bool | controllerRightStickJustMoved () const noexcept |
Check if the controller right analog stick just moved on the current frame. More... | |
bool | controllerLeftTriggerJustMoved () const noexcept |
Check if the controller left trigger just moved on the current frame. More... | |
bool | controllerRightTriggerJustMoved () const noexcept |
Check if the controller right trigger just moved on the current frame. More... | |
std::optional< vec2 > | getTouchPosition () const noexcept |
Get the latest known touch finger position processed by the input manager. More... | |
std::optional< float > | getTouchPressure () const noexcept |
Get the latest known touch finger pressure processed by the input manager. More... | |
bool | touchJustMoved () const noexcept |
Check if the touch finger just moved on the current frame. More... | |
bool | touchJustChangedPressure () const noexcept |
Check if the touch finger just changed pressure on the current frame. More... | |
Outputs | getCurrentOutputs () const noexcept |
Get all output numbers for which at least one bound input is currently in a pressed state. More... | |
Outputs | getPreviousOutputs () const noexcept |
Get all output numbers for which at least one bound input was in pressed state on the previous frame. More... | |
Outputs | getJustPressedOutputs () const noexcept |
Get all output numbers for which a press was triggered on the current frame. More... | |
Outputs | getJustReleasedOutputs () const noexcept |
Get all output numbers for which a release was triggered on the current frame. More... | |
bool | isPressed (std::size_t output) const noexcept |
Check if a specific output has any bound inputs which are currently in a pressed state. More... | |
bool | justPressed (std::size_t output) const noexcept |
Check if a specific output had a press triggered on the current frame. More... | |
bool | justReleased (std::size_t output) const noexcept |
Check if a specific output had a release triggered on the current frame. More... | |
i32 | getAbsoluteState (std::size_t output) const noexcept |
Get the current raw total absolute value of a specific output, which consists of the accumulated contributions from all of its bound inputs. More... | |
i32 | getRelativeState (std::size_t output) const noexcept |
Get the current raw total relative value of a specific output, which consists of the accumulated contributions from all of its bound inputs. More... | |
float | getAbsoluteValue (std::size_t outputPositive) const noexcept |
Get the current scaled absolute value of a specific output in a single direction, which consists of the accumulated contributions from all of its bound inputs. More... | |
float | getRelativeValue (std::size_t outputPositive) const noexcept |
Get the current scaled relative value of a specific output in a single direction, which consists of the accumulated contributions from all of its bound inputs. More... | |
float | getAbsoluteValue (std::size_t outputNegative, std::size_t outputPositive) const noexcept |
Get the current combined scaled absolute value of two specific outputs in opposite directions, which consist of the accumulated contributions from all of their bound inputs. More... | |
float | getRelativeValue (std::size_t outputNegative, std::size_t outputPositive) const noexcept |
Get the current combined scaled relative value of two specific outputs in opposite directions, which consist of the accumulated contributions from all of their bound inputs. More... | |
vec2 | getAbsoluteValue (std::size_t outputNegativeX, std::size_t outputPositiveX, std::size_t outputNegativeY, std::size_t outputPositiveY) const noexcept |
Get the current combined scaled absolute value of four specific outputs in orthogonal directions, which consist of the accumulated contributions from all of their bound inputs. More... | |
vec2 | getRelativeValue (std::size_t outputNegativeX, std::size_t outputPositiveX, std::size_t outputNegativeY, std::size_t outputPositiveY) const noexcept |
Get the current combined scaled relative value of four specific outputs in orthogonal directions, which consist of the accumulated contributions from all of their bound inputs. More... | |
vec3 | getAbsoluteValue (std::size_t outputNegativeX, std::size_t outputPositiveX, std::size_t outputNegativeY, std::size_t outputPositiveY, std::size_t outputNegativeZ, std::size_t outputPositiveZ) const noexcept |
Get the current combined scaled absolute value of six specific outputs in orthogonal directions, which consist of the accumulated contributions from all of their bound inputs. More... | |
vec3 | getRelativeValue (std::size_t outputNegativeX, std::size_t outputPositiveX, std::size_t outputNegativeY, std::size_t outputPositiveY, std::size_t outputNegativeZ, std::size_t outputPositiveZ) const noexcept |
Get the current combined scaled relative value of six specific outputs in orthogonal directions, which consist of the accumulated contributions from all of their bound inputs. More... | |
bool | isPressed (Input input) const noexcept |
Check if a specific input is currently in a pressed state. More... | |
bool | justPressed (Input input) const noexcept |
Check if a specific input had a press triggered on the current frame. More... | |
bool | justReleased (Input input) const noexcept |
Check if a specific input had a release triggered on the current frame. More... | |
template<typename... Actions> | |
void | bind (Input input, Actions... actions) requires((std |
Like bind(Input, Outputs), but accepts a pack of "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values. More... | |
template<typename... Actions> | |
void | addBinding (Input input, Actions... actions) requires((std |
Like addBinding(Input, Outputs), but accepts a pack of "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values. More... | |
template<typename Action > | |
bool | isPressed (Action action) const noexcept requires(std |
Like isPressed(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value. More... | |
template<typename Action > | |
bool | justPressed (Action action) const noexcept requires(std |
Like justPressed(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value. More... | |
template<typename Action > | |
bool | justReleased (Action action) const noexcept requires(std |
Like justReleased(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value. More... | |
template<typename Action > | |
i32 | getAbsoluteState (Action action) const noexcept requires(std |
Like getAbsoluteState(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value. More... | |
template<typename Action > | |
i32 | getRelativeState (Action action) const noexcept requires(std |
Like getRelativeState(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value. More... | |
template<typename Action > | |
float | getAbsoluteValue (Action actionPositive) const noexcept requires(std |
Like getAbsoluteValue(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value. More... | |
template<typename Action > | |
float | getRelativeValue (Action actionPositive) const noexcept requires(std |
Like getRelativeValue(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value. More... | |
template<typename Action > | |
float | getAbsoluteValue (Action actionNegative, Action actionPositive) const noexcept requires(std |
Like getAbsoluteValue(std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to output numbers equal to their underlying values. More... | |
template<typename Action > | |
float | getRelativeValue (Action actionNegative, Action actionPositive) const noexcept requires(std |
Like getRelativeValue(std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to output numbers equal to their underlying values. More... | |
template<typename Action > | |
vec2 | getAbsoluteValue (Action actionNegativeX, Action actionPositiveX, Action actionNegativeY, Action actionPositiveY) const noexcept requires(std |
Like getAbsoluteValue(std::size_t, std::size_t, std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values. More... | |
template<typename Action > | |
vec2 | getRelativeValue (Action actionNegativeX, Action actionPositiveX, Action actionNegativeY, Action actionPositiveY) const noexcept requires(std |
Like getRelativeValue(std::size_t, std::size_t, std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values. More... | |
template<typename Action > | |
vec3 | getAbsoluteValue (Action actionNegativeX, Action actionPositiveX, Action actionNegativeY, Action actionPositiveY, Action actionNegativeZ, Action actionPositiveZ) const noexcept requires(std |
Like getAbsoluteValue(std::size_t, std::size_t, std::size_t, std::size_t, std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values. More... | |
template<typename Action > | |
vec3 | getRelativeValue (Action actionNegativeX, Action actionPositiveX, Action actionNegativeY, Action actionPositiveY, Action actionNegativeZ, Action actionPositiveZ) const noexcept requires(std |
Like getRelativeValue(std::size_t, std::size_t, std::size_t, std::size_t, std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values. More... | |
Static Public Attributes | |
static constexpr std::size_t | OUTPUT_COUNT = 64 |
The maximum supported number of separate outputs that the input manager can keep track of. More... | |
Persistent system for mapping physical Input controls to abstract output numbers and processing input events that control their associated values.
By keeping an instance of this class and continuously feeding it the events received from an EventPump, it can serve as the main source of user input for the whole program. After handling the events received in a frame, the input manager can be queried for the current state of any specific physical inputs, or the values of the abstract outputs to which they are bound, as well as the corresponding state of the previous frame. This combination allows the inputs or outputs which were just triggered since the previous frame to be derived as well.
The supported control types include keyboard, mouse, touch and game controller devices, and it is possible for the value of a given output to be affected by the input of different device types simultaneously. However, differentiating the source of an input between multiple connected devices of the same type is not possible. Therefore, if any filtering of events by their source is desired, it needs to be done before feeding the events to the input manager.
using donut::events::InputManager::Outputs = std::bitset<OUTPUT_COUNT> |
Set of up to OUTPUT_COUNT unique abstract output numbers.
Each bit in the set corresponds to the output number that is equal to its index.
donut::events::InputManager::InputManager | ( | const InputManagerOptions & | options = {} | ) |
Construct an input manager.
options | initial configuration of the input manager, see InputManagerOptions. |
events::Error | on failure to initialize the required global subsystems. |
donut::events::InputManager::~InputManager | ( | ) |
Destructor.
|
delete |
Copying an input manager is not allowed, since it manages global state.
|
delete |
Moving an input manager is not allowed, since it manages global state.
|
delete |
Copying an input manager is not allowed, since it manages global state.
|
delete |
Moving an input manager is not allowed, since it manages global state.
void donut::events::InputManager::prepareForEvents | ( | ) |
Update the internal state to prepare for the input events of the current frame to be handled.
This effectively shifts any inputs/outputs which are currently considered to be pressed to the previous frame, and then resets the current input state.
void donut::events::InputManager::handleEvent | ( | const Event & | event | ) |
Handle an event from an EventPump, which may cause updates to the internal input/output state of the current frame.
event | event to handle. |
Bind a physical input to a set of abstract output numbers, overriding the previous binding if one already existed for the same input.
input | physical input to set the binding for. |
outputs | set of outputs which the input should control. |
std::bad_alloc | on allocation failure. |
Bind a physical input to a set of abstract output numbers, adding to the previous binding if one already existed for the same input.
input | physical input to add the binding to. |
outputs | additional set of outputs which the input should control. |
std::bad_alloc | on allocation failure. |
void donut::events::InputManager::unbind | ( | Input | input | ) |
Remove all outputs from a specific input.
input | physical input to remove the binding from. |
std::bad_alloc | on allocation failure. |
|
noexcept |
Remove all bindings from all inputs.
|
noexcept |
Add to an input and apply an offset to all of its bound outputs.
input | physical input to press. |
offset | signed integer offset to apply to all bound outputs. The standard range of values is 0 (no change) to 32767 (fully pressed). |
|
noexcept |
Subtract from an input and apply an offset to all of its bound outputs.
input | physical input to release. |
offset | signed integer offset to apply to all bound outputs. The standard range of values is -32767 (fully unpressed) to 0 (no change). |
|
noexcept |
Trigger a transient press and release of an input that only lasts for the current frame and apply a relative offset to all of its bound outputs.
input | physical input to trigger. |
offset | signed integer offset to apply to all bound outputs. The standard range of values is -32767 to 32767. |
|
noexcept |
Set the absolute value of all outputs bound to a specific input, without affecting the relative values for the current frame.
input | physical input to set. |
value | signed integer value to set all bound outputs to. The standard range of values is 0 (fully unpressed) to 32767 (fully pressed). |
|
noexcept |
Reset the internal state of all inputs and outputs for both the current and previous frame.
|
noexcept |
Set the mouse sensitivity coefficient.
sensitivity | new mouse sensitivity. |
|
noexcept |
Set the controller left analog stick sensitivity coefficient.
sensitivity | new analog stick sensitivity. |
|
noexcept |
Set the controller right analog stick sensitivity coefficient.
sensitivity | new analog stick sensitivity. |
|
noexcept |
Set the controller left analog stick deadzone fraction.
deadzone | new analog stick deadzone. |
|
noexcept |
Set the controller right analog stick deadzone fraction.
deadzone | new analog stick deadzone. |
|
noexcept |
Set the controller left trigger deadzone fraction.
deadzone | new trigger deadzone. |
|
noexcept |
Set the controller right trigger deadzone fraction.
deadzone | new trigger deadzone. |
|
noexcept |
Set the touch finger motion sensitivity coefficient.
sensitivity | new touch finger motion sensitivity. |
|
noexcept |
Set the touch finger pressure deadzone fraction.
deadzone | new touch finger deadzone. |
|
noexcept |
Check if this input manager has any active bindings for any input.
std::vector<Binding> donut::events::InputManager::getBindings | ( | ) | const |
Get all active bindings of this input manager.
std::bad_alloc | on allocation failure. |
Get the set of outputs that a specific input is currently bound to.
input | physical input for which to search for a binding. |
|
noexcept |
Get the latest known mouse position processed by the input manager.
|
noexcept |
Check if the mouse just moved on the current frame.
|
noexcept |
Check if the mouse wheel was just scrolled horizontally on the current frame.
|
noexcept |
Check if the mouse wheel was just scrolled vertically on the current frame.
|
noexcept |
Check if a controller is currently connected as an active input device.
|
noexcept |
Get the latest known position of the left analog stick of the connected controller, if there is one.
|
noexcept |
Get the latest known position of the right analog stick of the connected controller, if there is one.
|
noexcept |
Get the latest known position of the left trigger of the connected controller, if there is one.
|
noexcept |
Get the latest known position of the right trigger of the connected controller, if there is one.
|
noexcept |
Check if the controller left analog stick just moved on the current frame.
|
noexcept |
Check if the controller right analog stick just moved on the current frame.
|
noexcept |
Check if the controller left trigger just moved on the current frame.
|
noexcept |
Check if the controller right trigger just moved on the current frame.
|
noexcept |
Get the latest known touch finger position processed by the input manager.
|
noexcept |
Get the latest known touch finger pressure processed by the input manager.
|
noexcept |
Check if the touch finger just moved on the current frame.
|
noexcept |
Check if the touch finger just changed pressure on the current frame.
|
noexcept |
Get all output numbers for which at least one bound input is currently in a pressed state.
|
noexcept |
Get all output numbers for which at least one bound input was in pressed state on the previous frame.
|
noexcept |
Get all output numbers for which a press was triggered on the current frame.
|
noexcept |
Get all output numbers for which a release was triggered on the current frame.
|
noexcept |
Check if a specific output has any bound inputs which are currently in a pressed state.
output | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to check the associated state of. |
getCurrentOutputs().test(output)
.
|
noexcept |
Check if a specific output had a press triggered on the current frame.
output | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to check the associated state of. |
getJustPressedOutputs().test(output)
.
|
noexcept |
Check if a specific output had a release triggered on the current frame.
output | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to check the associated state of. |
getJustReleasedOutputs().test(output)
.
|
noexcept |
Get the current raw total absolute value of a specific output, which consists of the accumulated contributions from all of its bound inputs.
output | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to check the associated value of. |
|
noexcept |
Get the current raw total relative value of a specific output, which consists of the accumulated contributions from all of its bound inputs.
output | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to check the associated value of. |
|
noexcept |
Get the current scaled absolute value of a specific output in a single direction, which consists of the accumulated contributions from all of its bound inputs.
outputPositive | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the resulting value. |
|
noexcept |
Get the current scaled relative value of a specific output in a single direction, which consists of the accumulated contributions from all of its bound inputs.
outputPositive | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the resulting value. |
|
noexcept |
Get the current combined scaled absolute value of two specific outputs in opposite directions, which consist of the accumulated contributions from all of their bound inputs.
outputNegative | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the resulting value. |
outputPositive | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the resulting value. |
|
noexcept |
Get the current combined scaled relative value of two specific outputs in opposite directions, which consist of the accumulated contributions from all of their bound inputs.
outputNegative | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the resulting value. |
outputPositive | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the resulting value. |
|
noexcept |
Get the current combined scaled absolute value of four specific outputs in orthogonal directions, which consist of the accumulated contributions from all of their bound inputs.
outputNegativeX | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the x component of the resulting vector. |
outputPositiveX | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the x component of the resulting vector. |
outputNegativeY | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the y component of the resulting vector. |
outputPositiveY | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the y component of the resulting vector. |
|
noexcept |
Get the current combined scaled relative value of four specific outputs in orthogonal directions, which consist of the accumulated contributions from all of their bound inputs.
outputNegativeX | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the x component of the resulting vector. |
outputPositiveX | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the x component of the resulting vector. |
outputNegativeY | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the y component of the resulting vector. |
outputPositiveY | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the y component of the resulting vector. |
|
noexcept |
Get the current combined scaled absolute value of six specific outputs in orthogonal directions, which consist of the accumulated contributions from all of their bound inputs.
outputNegativeX | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the x component of the resulting vector. |
outputPositiveX | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the x component of the resulting vector. |
outputNegativeY | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the y component of the resulting vector. |
outputPositiveY | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the y component of the resulting vector. |
outputNegativeZ | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the z component of the resulting vector. |
outputPositiveZ | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the z component of the resulting vector. |
|
noexcept |
Get the current combined scaled relative value of six specific outputs in orthogonal directions, which consist of the accumulated contributions from all of their bound inputs.
outputNegativeX | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the x component of the resulting vector. |
outputPositiveX | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the x component of the resulting vector. |
outputNegativeY | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the y component of the resulting vector. |
outputPositiveY | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the y component of the resulting vector. |
outputNegativeZ | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the negative contribution to the z component of the resulting vector. |
outputPositiveZ | valid output number between 0 (inclusive) and OUTPUT_COUNT (exclusive) to use for the positive contribution to the z component of the resulting vector. |
|
noexcept |
Check if a specific input is currently in a pressed state.
input | valid input value to check the associated state of. |
|
noexcept |
Check if a specific input had a press triggered on the current frame.
input | valid input value to check the associated state of. |
|
noexcept |
Check if a specific input had a release triggered on the current frame.
input | valid input value to check the associated state of. |
|
inline |
Like bind(Input, Outputs), but accepts a pack of "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values.
|
inline |
Like addBinding(Input, Outputs), but accepts a pack of "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values.
|
inlinenoexcept |
Like isPressed(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value.
|
inlinenoexcept |
Like justPressed(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value.
|
inlinenoexcept |
Like justReleased(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value.
|
inlinenoexcept |
Like getAbsoluteState(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value.
|
inlinenoexcept |
Like getRelativeState(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value.
|
inlinenoexcept |
Like getAbsoluteValue(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value.
|
inlinenoexcept |
Like getRelativeValue(std::size_t) const, but accepts an "action" of any enum type, which is interpreted as corresponding to the output number equal to its underlying value.
|
inlinenoexcept |
Like getAbsoluteValue(std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to output numbers equal to their underlying values.
|
inlinenoexcept |
Like getRelativeValue(std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to output numbers equal to their underlying values.
|
inlinenoexcept |
Like getAbsoluteValue(std::size_t, std::size_t, std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values.
|
inlinenoexcept |
Like getRelativeValue(std::size_t, std::size_t, std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values.
|
inlinenoexcept |
Like getAbsoluteValue(std::size_t, std::size_t, std::size_t, std::size_t, std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values.
|
inlinenoexcept |
Like getRelativeValue(std::size_t, std::size_t, std::size_t, std::size_t, std::size_t, std::size_t) const, but accepts "actions" of any enum type, which are interpreted as corresponding to the output numbers equal to their underlying values.
|
staticconstexpr |
The maximum supported number of separate outputs that the input manager can keep track of.