| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <array> |
| 7 |
#include <string> |
| 8 |
|
| 9 |
#include "Common/Matrix.h" |
| 10 |
#include "InputCommon/ControllerEmu/StickGate.h" |
| 11 |
|
| 12 |
namespace ControllerEmu |
| 13 |
{ |
| 14 |
class Force : public ReshapableInput |
| 15 |
{ |
| 16 |
public: |
| 17 |
using StateData = Common::Vec3; |
| 18 |
|
| 19 |
explicit Force(const std::string& name); |
| 20 |
|
| 21 |
ReshapeData GetReshapableState(bool adjusted) const final; |
| 22 |
ControlState GetGateRadiusAtAngle(double ang) const final; |
| 23 |
|
| 24 |
ControlState GetDefaultInputRadiusAtAngle(double angle) const final; |
| 25 |
|
| 26 |
StateData GetState(bool adjusted = true) const; |
| 27 |
|
| 28 |
|
| 29 |
ControlState GetSpeed() const; |
| 30 |
ControlState GetReturnSpeed() const; |
| 31 |
|
| 32 |
|
| 33 |
ControlState GetTwistAngle() const; |
| 34 |
|
| 35 |
|
| 36 |
ControlState GetMaxDistance() const; |
| 37 |
|
| 38 |
private: |
| 39 |
SettingValue<double> m_distance_setting; |
| 40 |
SettingValue<double> m_speed_setting; |
| 41 |
SettingValue<double> m_return_speed_setting; |
| 42 |
SettingValue<double> m_angle_setting; |
| 43 |
}; |
| 44 |
|
| 45 |
class Shake : public ControlGroup |
| 46 |
{ |
| 47 |
public: |
| 48 |
using StateData = Common::Vec3; |
| 49 |
|
| 50 |
explicit Shake(const std::string& name, ControlState default_intensity_scale = 1); |
| 51 |
|
| 52 |
StateData GetState(bool adjusted = true) const; |
| 53 |
|
| 54 |
ControlState GetDeadzone() const; |
| 55 |
|
| 56 |
|
| 57 |
ControlState GetIntensity() const; |
| 58 |
|
| 59 |
|
| 60 |
ControlState GetFrequency() const; |
| 61 |
|
| 62 |
private: |
| 63 |
SettingValue<double> m_deadzone_setting; |
| 64 |
SettingValue<double> m_intensity_setting; |
| 65 |
SettingValue<double> m_frequency_setting; |
| 66 |
}; |
| 67 |
|
| 68 |
} |