InputManager.ixx File
InputManager providing access to various input states. More...
Included Headers
#include <memory>
#include <stdexcept>
#include <cassert>
#include <cmath>
#include <helios.engine.util.log.Logger>
#include <helios.engine.util.log.LogManager>
#include <helios.engine.input.types.Key>
#include <helios.engine.input.InputAdapter>
#include <helios.engine.input.gamepad.GamepadState>
#include <helios.engine.input.types.Gamepad>
Namespaces Index
| namespace | helios |
| namespace | window |
| namespace | engine |
| namespace | input |
Classes Index
| class | InputManager |
|
InputManager providing access to various input states. More... | |
Macro Definitions Index
| #define | HELIOS_LOG_SCOPE "helios::engine::input::InputManager" |
Description
InputManager providing access to various input states.
Macro Definitions
HELIOS_LOG_SCOPE
|
Definition at line 25 of file InputManager.ixx.
25#define HELIOS_LOG_SCOPE "helios::engine::input::InputManager"
File Listing
The file content with the documentation metadata removed is:
22 class Window;
25#define HELIOS_LOG_SCOPE "helios::engine::input::InputManager"
26export namespace helios::engine::input {
41 class InputManager {
63 inline static const helios::engine::util::log::Logger& logger_ = helios::engine::util::log::LogManager::loggerForScope(HELIOS_LOG_SCOPE);
74 explicit InputManager(std::unique_ptr<helios::engine::input::InputAdapter> input)
75 : input_(std::move(input)) {}
136 [[nodiscard]] bool isKeyPressed(const helios::engine::input::types::Key& key) const noexcept {
157 [[nodiscard]] bool isKeyReleased(const helios::engine::input::types::Key& key) const noexcept {
178 unsigned int registerGamepads(unsigned int mask) noexcept {
179 const unsigned int maxMask = static_cast<int>(std::pow(
190 gamepadMask_ = mask;
213 [[nodiscard]] const helios::engine::input::gamepad::GamepadState& gamepadState(const helios::engine::input::types::Gamepad gamepadId) const noexcept {
214 return input_->gamepadState(gamepadId);
224 [[nodiscard]] bool isConnected(helios::engine::input::types::Gamepad gamepadId) const noexcept {
225 return input_->isConnected(gamepadId);
234 [[nodiscard]] const helios::engine::input::InputAdapter& inputAdapter() const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.