9 #include "imstkModuleDriver.h" 11 #include <unordered_map> 34 enum class ThreadingType
55 void start()
override;
61 void addModule(std::shared_ptr<Module> module)
override;
78 double getDesiredDt()
const 96 m_threadType = threadType;
110 void requestStop(
Event* e);
112 void runModuleParallel(std::shared_ptr<Module> module);
114 std::vector<std::shared_ptr<Viewer>> m_viewers;
116 std::unordered_map<Module*, bool> m_running;
122 ThreadingType m_threadType = ThreadingType::STL;
double m_desiredDt
Desired timestep.
void setDesiredDt(const double dt)
Sets the target fixed timestep (may violate), seconds This ultimately effects the number of iteration...
void setThreadType(ThreadingType threadType)
Set the thread type to run the parallel modules with.
Defines a sequential substepping approach to driving the modules and rendering. The user provides a d...
Base class for events which contain a type, priority, and data priority defaults to 0 and uses a grea...
void setUseRemainderTimeDivide(const bool useRemainderTimeDivide)
The number of substeps is computed as N = (accumulated time / desiredDt). This leaves a remainder...
void addModule(std::shared_ptr< Module > module) override
Add a module to run.
std::vector< std::shared_ptr< Module > > m_adaptiveModules
Modules that update adpatively to keep up with real time.
std::vector< std::shared_ptr< Module > > m_asyncModules
Modules that run on completely other threads without restraint.
std::vector< std::shared_ptr< Module > > m_syncModules
Modules called once per update.
bool m_useRemainderTimeDivide
Whether to divide out remainder time or not.
double m_dt
Actual timestep.
Base class for viewer that manages render window and the renderers /// Creates backend-specific rende...
SIGNAL(SimulationManager, starting)
Called after initialization but before starting the loop.
void clearModules() override
Remove all modules.
Defines the control of modules.
double getDt() const
Get the current actual timestep.