|
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.
Ogre::SimpleSpline * m_stop_spline
Designed to be run on main/rendering loop (FPS)
float CalculateCmdOutput(float time, Ogre::SimpleSpline *spline)
void LoadDefaultInertiaModels()
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'.
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)