9 #ifndef _TurtleBrainsUnstable_ControllerManager_h_
10 #define _TurtleBrainsUnstable_ControllerManager_h_
12 #include "../../core/tb_configuration.h"
13 #if defined(tb_with_input_devices)
15 #include "../../core/tb_noncopyable.h"
16 #include "../../core/tb_types.h"
35 DeviceHandle InvalidDeviceHandle(
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.h:22
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
int32_t int32
Signed integer with a size of 32 bits. Supports values from -2147483648 to 2147483647.
Definition: tb_types.h:27
Definition: tb_system_timer.h:14
uint8_t uint8
Unsigned integer with a size of 8 bits. Supports values from 0 to 255.
Definition: tb_types.h:23
Definition: tb_application_dialog.h:19