 |
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
24 #include <OgrePrerequisites.h>
26 #include <unordered_map>
41 std::map<Ogre::String, Ogre::SimpleSpline>
m_splines;
Ogre::SimpleSpline * m_stop_spline
Ogre::SimpleSpline * m_start_spline
Ogre::SimpleSpline * m_start_spline
void SetSimpleDelay(RoR::CmdKeyInertiaConfig &cfg, float start_delay, float stop_delay, std::string start_function, std::string stop_function)
float CalcSimpleDelay(bool input, float dt)
Expected to be invoked in main/rendering loop, once per frame. The dt is in seconds.
std::string m_stop_function
Ogre::SimpleSpline * m_stop_spline
Designed to be run on main/rendering loop (FPS)
std::string m_start_function
float CalculateCmdOutput(float time, Ogre::SimpleSpline *spline)
const std::string & GetStartFunction() const
void LoadDefaultInertiaModels()
float GetStopDelay() const
Designed to be run in physics loop (2khz)
std::map< Ogre::String, Ogre::SimpleSpline > m_splines
Ogre::SimpleSpline * GetSplineByName(Ogre::String model)
Loads and manages 'inertia_models.cfg'.
const std::string & GetStopFunction() const
float GetStartDelay() 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)