Commit 8b50def8 authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

ENH: Print the user controls

Print the user controls at the start
of the simulation.
parent 77268e45
Pipeline #70490 running with stage
...@@ -368,6 +368,8 @@ SimulationManager::startViewer(const bool debug /*= true*/) ...@@ -368,6 +368,8 @@ SimulationManager::startViewer(const bool debug /*= true*/)
// Start Rendering // Start Rendering
if (!m_viewer->isRendering()) if (!m_viewer->isRendering())
{ {
this->printUserControlsInfo();
LOG(INFO) << "Starting viewer"; LOG(INFO) << "Starting viewer";
m_viewer->startRenderingLoop(); // Infinite loop m_viewer->startRenderingLoop(); // Infinite loop
...@@ -382,6 +384,20 @@ SimulationManager::startViewer(const bool debug /*= true*/) ...@@ -382,6 +384,20 @@ SimulationManager::startViewer(const bool debug /*= true*/)
} }
} }
void
SimulationManager::printUserControlsInfo()
{
LOG(INFO) <<
"\n------------------------\n" <<
" User controls\n" <<
"------------------------\n" <<
"<space> - pause or unpause simulation\n" <<
" R/r - reset simulation\n" <<
" D/d - toggle between debug and simulation rendering modes\n" <<
" P/p - Display render frame rate on the screen\n" <<
"------------------------\n\n";
}
void void
SimulationManager::runSimulation() SimulationManager::runSimulation()
{ {
......
...@@ -151,6 +151,11 @@ public: ...@@ -151,6 +151,11 @@ public:
/// ///
void startViewer(const bool debug = true); void startViewer(const bool debug = true);
///
/// \brief Print user keyboard controls
///
void printUserControlsInfo();
/// ///
/// \brief Launch simulation for the first time. /// \brief Launch simulation for the first time.
/// 1. Initialize the active scene if not initialized already. /// 1. Initialize the active scene if not initialized already.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment