24#include <OgrePrerequisites.h>
26#include <unordered_map>
41 std::map<Ogre::String, Ogre::SimpleSpline>
m_splines;
Loads and manages 'inertia_models.cfg'.
std::map< Ogre::String, Ogre::SimpleSpline > m_splines
void LoadDefaultInertiaModels()
Ogre::SimpleSpline * GetSplineByName(Ogre::String model)
Designed to be run in physics loop (2khz)
std::string m_stop_function
std::string m_start_function
Ogre::SimpleSpline * m_stop_spline
const std::string & GetStopFunction() const
float CalcCmdKeyDelay(float cmd_input, float dt)
int SetCmdKeyDelay(RoR::CmdKeyInertiaConfig &cfg, float start_delay, float stop_delay, std::string start_function, std::string stop_function)
float CalculateCmdOutput(float time, Ogre::SimpleSpline *spline)
float GetStartDelay() const
const std::string & GetStartFunction() const
Ogre::SimpleSpline * m_start_spline
float GetStopDelay() const
Designed to be run on main/rendering loop (FPS)
Ogre::SimpleSpline * m_stop_spline
void SetSimpleDelay(RoR::CmdKeyInertiaConfig &cfg, float start_delay, float stop_delay, std::string start_function, std::string stop_function)
Ogre::SimpleSpline * m_start_spline
float CalcSimpleDelay(bool input, float dt)
Expected to be invoked in main/rendering loop, once per frame. The dt is in seconds.