Debian Codegraph @

Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.h

raw symbols SCIP
1 // Copyright 2017 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <string>
7
8 #include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
9 #include "InputCommon/ControllerEmu/StickGate.h"
10 #include "InputCommon/ControllerInterface/CoreDevice.h"
11
12 namespace ControllerEmu
13 {
14 class Tilt : public ReshapableInput
15 {
16 public:
17 using StateData = ReshapeData;
18
19 explicit Tilt(const std::string& name);
20
21 ReshapeData GetReshapableState(bool adjusted) const final;
22 ControlState GetGateRadiusAtAngle(double angle) const final;
23
24 // Tilt is using the gate radius to adjust the tilt angle so we must provide an unadjusted value
25 // for the default input radius.
26 ControlState GetDefaultInputRadiusAtAngle(double angle) const final;
27
28 StateData GetState() const;
29
30 // Return peak rotational velocity (for a complete turn) in radians/sec
31 ControlState GetMaxRotationalVelocity() const;
32
33 private:
34 Control* GetModifierInput() const override;
35
36 SettingValue<double> m_max_angle_setting;
37 SettingValue<double> m_max_rotational_velocity;
38 };
39 } // namespace ControllerEmu