23#include <boost/bimap.hpp>
48 typedef boost::bimap<game_controller_button_ordinal, game_controller_button>
button_map_type;
93 std::optional<game_player> iPlayer;
94 std::optional<game_controller_port> iPort;
96 std::array<bool, MAX_BUTTONS> iButtonState = {};
97 double iLeftTriggerPosition = 0.0;
98 double iRightTriggerPosition = 0.0;
99 vec2 iLeftThumbPosition;
100 vec2 iRightThumbPosition;
103 vec2 iSliderPosition;
virtual void update_state()=0
void set_stick_position(const vec3 &aPosition)
game_controller(hid_device_subclass aSubclass, const hid_device_uuid &aProductId, const hid_device_uuid &aInstanceId, const button_map_type &aButtonMap={})
key_modifiers_e key_modifiers_e const vec2 key_modifiers_e stick_moved
boost::bimap< game_controller_button_ordinal, game_controller_button > button_map_type
define_declared_event(ButtonPressed, button_pressed, game_controller_button, key_modifiers_e) define_declared_event(ButtonReleased
void unassign_player() override
double left_trigger_position() const override
void set_right_trigger_position(double aPosition)
bool button_mapped(game_controller_button aButton) const override
void clear_port() override
void set_right_thumb_position(const vec2 &aPosition)
const vec2 & left_thumb_position() const override
const vec3 & stick_position() const override
void set_left_trigger_position(double aPosition)
const vec2 & right_thumb_position() const override
bool is_button_pressed(game_controller_button aButton) const override
key_modifiers_e key_modifiers_e left_thumb_moved
void set_port(game_controller_port aPort) override
button_map_type & button_map()
game_player player() const override
bool have_port() const override
void set_stick_rotation(const vec3 &aRotation)
static constexpr game_controller_button_ordinal MAX_BUTTONS
void set_left_thumb_position(const vec2 &aPosition)
uint32_t button_count() const override
const vec3 & stick_rotation() const override
void set_button_state(game_controller_button_ordinal aButtonOrdinal, bool aIsPressed)
game_controller_port port() const override
bool is_button_pressed(game_controller_button_ordinal aButtonOrdinal) const override
bool needs_calibrating() const override
void assign_player(game_player aPlayer) override
key_modifiers_e key_modifiers_e const vec2 key_modifiers_e const vec3 key_modifiers_e slider_moved
game_controller_button_ordinal button_to_button_ordinal(game_controller_button aButton) const override
game_controller_button button_ordinal_to_button(game_controller_button_ordinal aButtonOrdinal) const override
key_modifiers_e left_trigger_moved
const vec2 & slider_position() const override
void set_button_state(game_controller_button aButton, bool aIsPressed)
bool player_assigned() const override
void set_slider_position(const vec2 &aPosition)
double right_trigger_position() const override
uint32_t game_controller_port
uint32_t game_controller_button_ordinal
#define define_declared_event(name, declName,...)