Antkeeper
0.0.1
|
Maps a direction along a gamepad axis to a control input value. More...
#include <mapping.hpp>
Public Member Functions | |
constexpr mapping_type | get_mapping_type () const noexcept override |
Returns mapping_type::gamepad_axis. More... | |
gamepad_axis_mapping (input::gamepad *gamepad, gamepad_axis axis, bool direction) | |
Constructs a gamepad axis mapping. More... | |
gamepad_axis_mapping ()=default | |
Constructs a gamepad axis mapping. More... | |
![]() | |
mapping ()=default | |
Constructs an input mapping. More... | |
virtual | ~mapping ()=default |
Destructs an input mapping. More... | |
Public Attributes | |
input::gamepad * | gamepad {nullptr} |
Pointer to the mapped gamepad, or nullptr if input from any gamepad is accepted. More... | |
gamepad_axis | axis {0} |
Mapped gamepad axis. More... | |
bool | direction {false} |
Sign bit of the mapped direction. More... | |
Maps a direction along a gamepad axis to a control input value.
Definition at line 60 of file mapping.hpp.
input::gamepad_axis_mapping::gamepad_axis_mapping | ( | input::gamepad * | gamepad, |
gamepad_axis | axis, | ||
bool | direction | ||
) |
Constructs a gamepad axis mapping.
gamepad | Pointer to the gamepad to map, or nullptr if input from any gamepad will be mapped. |
axis | Gamepad axis to map. |
direction | Sign bit of the direction to map. |
Definition at line 28 of file mapping.cpp.
|
default |
Constructs a gamepad axis mapping.
gamepad | Pointer to the gamepad to map, or nullptr if input from any gamepad will be mapped. |
axis | Gamepad axis to map. |
direction | Sign bit of the direction to map. |
|
inlineconstexproverridevirtualnoexcept |
Returns mapping_type::gamepad_axis.
Implements input::mapping.
Definition at line 76 of file mapping.hpp.
gamepad_axis input::gamepad_axis_mapping::axis {0} |
Mapped gamepad axis.
Definition at line 85 of file mapping.hpp.
bool input::gamepad_axis_mapping::direction {false} |
Sign bit of the mapped direction.
Definition at line 88 of file mapping.hpp.
input::gamepad* input::gamepad_axis_mapping::gamepad {nullptr} |
Pointer to the mapped gamepad, or nullptr
if input from any gamepad is accepted.
Definition at line 82 of file mapping.hpp.