Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sreekanth Arikatla
iMSTK
Commits
8b50def8
Commit
8b50def8
authored
Aug 30, 2017
by
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Source/SimulationManager/imstkSimulationManager.cpp
View file @
8b50def8
...
...
@@ -368,6 +368,8 @@ SimulationManager::startViewer(const bool debug /*= true*/)
// Start Rendering
if
(
!
m_viewer
->
isRendering
())
{
this
->
printUserControlsInfo
();
LOG
(
INFO
)
<<
"Starting viewer"
;
m_viewer
->
startRenderingLoop
();
// Infinite loop
...
...
@@ -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
SimulationManager
::
runSimulation
()
{
...
...
Source/SimulationManager/imstkSimulationManager.h
View file @
8b50def8
...
...
@@ -151,6 +151,11 @@ public:
///
void
startViewer
(
const
bool
debug
=
true
);
///
/// \brief Print user keyboard controls
///
void
printUserControlsInfo
();
///
/// \brief Launch simulation for the first time.
/// 1. Initialize the active scene if not initialized already.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment