9 #ifndef _TurtleBrainsUnstable_ControllerManager_hpp
10 #define _TurtleBrainsUnstable_ControllerManager_hpp
12 #include <turtle_brains/core/tb_configuration.hpp>
13 #include <turtle_brains/core/tb_noncopyable.hpp>
14 #include <turtle_brains/core/tb_types.hpp>
33 DeviceHandle InvalidDeviceHandle(
void);
34 ButtonIdentifier InvalidButton(
void);
35 AxisIdentifier InvalidAxis(
void);
40 int ConnectWithDevices(
void);
41 void DisconnectFromDevices(
void);
42 void PollInputDevices(
void);
44 size_t GetAxisCount(
const DeviceHandle& device)
const;
45 size_t GetButtonCount(
const DeviceHandle& device)
const;
47 bool IsButtonPressed(
const DeviceHandle& device,
const ButtonIdentifier& button)
const;
48 bool IsButtonReleased(
const DeviceHandle& device,
const ButtonIdentifier& button)
const;
49 bool IsButtonDown(
const DeviceHandle& device,
const ButtonIdentifier& button)
const;
59 AxisValue GetCurrentAxisValue(
const DeviceHandle& device,
const AxisIdentifier& axis)
const;
62 enum class PercentageRange { kZeroToPositiveOne, kNegativeToPositiveOne };
63 float GetAxisPercentage(
const DeviceHandle& device,
const AxisIdentifier& axis,
const PercentageRange& range = PercentageRange::kZeroToPositiveOne)
const;
70 InputDeviceManager(
void);
76 ~InputDeviceManager(
void);
78 friend class tbImplementation::InputDeviceManagerCreator;
85 extern InputDeviceManager& theInputDeviceManager;
Definition: tb_noncopyable.hpp:22
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
int32_t int32
Signed integer with a size of 32 bits. Supports values from -2147483648 to 2147483647.
Definition: tb_types.hpp:27
Definition: tb_system_timer.hpp:14
uint8_t uint8
Unsigned integer with a size of 8 bits. Supports values from 0 to 255.
Definition: tb_types.hpp:23
Definition: tb_application_dialog.hpp:19