// Copyright 2017 Dolphin Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include #include #include "Common/Matrix.h" #include "InputCommon/ControllerEmu/StickGate.h" namespace ControllerEmu { class Force : public ReshapableInput { public: using StateData = Common::Vec3; explicit Force(const std::string& name); ReshapeData GetReshapableState(bool adjusted) const final; ControlState GetGateRadiusAtAngle(double ang) const final; ControlState GetDefaultInputRadiusAtAngle(double angle) const final; StateData GetState(bool adjusted = true) const; // Velocities returned in m/s. ControlState GetSpeed() const; ControlState GetReturnSpeed() const; // Return twist angle in radians. ControlState GetTwistAngle() const; // Return swing distance in meters. ControlState GetMaxDistance() const; private: SettingValue m_distance_setting; SettingValue m_speed_setting; SettingValue m_return_speed_setting; SettingValue m_angle_setting; }; class Shake : public ControlGroup { public: using StateData = Common::Vec3; explicit Shake(const std::string& name, ControlState default_intensity_scale = 1); StateData GetState(bool adjusted = true) const; ControlState GetDeadzone() const; // Return total travel distance in meters. ControlState GetIntensity() const; // Return frequency in Hz. ControlState GetFrequency() const; private: SettingValue m_deadzone_setting; SettingValue m_intensity_setting; SettingValue m_frequency_setting; }; } // namespace ControllerEmu