33 #ifndef DART_GUI_OSG_REALTIMEWORLDNODE_HPP_ 34 #define DART_GUI_OSG_REALTIMEWORLDNODE_HPP_ 38 #include "dart/gui/osg/WorldNode.hpp" 68 const std::shared_ptr<dart::simulation::World>& world =
nullptr,
69 const ::osg::ref_ptr<osgShadow::ShadowTechnique>& shadower =
nullptr,
70 double targetFrequency = 60.0,
71 double targetRealTimeFactor = 1.0);
126 #endif // DART_GUI_OSG_REALTIMEWORLDNODE_HPP_ double getLowestRealTimeFactor() const
Get the lowest real time factor that has been hit during the simulation.
Definition: RealTimeWorldNode.cpp:91
double mLowestRealTimeFactor
The lowest RTF that has been achieved.
Definition: RealTimeWorldNode.hpp:116
void refresh() override
This function is called at the beginning of each rendering cycle.
Definition: RealTimeWorldNode.cpp:103
void setTargetRealTimeFactor(double targetRTF)
Set the target real time factor.
Definition: RealTimeWorldNode.cpp:73
double getHighestRealTimeFactor() const
Get the highest real time factor that has been hit during the simulation.
Definition: RealTimeWorldNode.cpp:97
WorldNode class encapsulates a World to be displayed in OpenSceneGraph.
Definition: WorldNode.hpp:64
RealTimeWorldNode(const std::shared_ptr< dart::simulation::World > &world=nullptr, const ::osg::ref_ptr< osgShadow::ShadowTechnique > &shadower=nullptr, double targetFrequency=60.0, double targetRealTimeFactor=1.0)
Construct a world node that will attempt to run a simulation with close to real-time playback...
Definition: RealTimeWorldNode.cpp:42
Definition: Aspect.cpp:40
void setTargetFrequency(double targetFrequency)
Set the target refresh rate frequency.
Definition: RealTimeWorldNode.cpp:59
double getTargetFrequency() const
Get the target refresh rate frequency.
Definition: RealTimeWorldNode.cpp:67
double mHighestRealTimeFactor
The highest RTF that has been achieved.
Definition: RealTimeWorldNode.hpp:119
double getLastRealTimeFactor() const
Get the real time factor that was achieved in the last refresh cycle.
Definition: RealTimeWorldNode.cpp:85
double mLastRealTimeFactor
The RTF that was achieved in the last refresh cycle.
Definition: RealTimeWorldNode.hpp:113
::osg::Timer mRefreshTimer
Keeps track of the time between refreshes.
Definition: RealTimeWorldNode.hpp:104
bool mFirstRefresh
Reset each time the simulation is paused.
Definition: RealTimeWorldNode.hpp:101
double getTargetRealTimeFactor() const
Get the target real time factor.
Definition: RealTimeWorldNode.cpp:79
double mTargetRealTimeLapse
The target for how much time should elapse between refreshes.
Definition: RealTimeWorldNode.hpp:107
double mTargetSimTimeLapse
The target for how much simulation time should elapse between refreshes.
Definition: RealTimeWorldNode.hpp:110
Definition: RealTimeWorldNode.hpp:44