Blue Brain BioExplorer
Viewer.cpp
Go to the documentation of this file.
1 /*
2  *
3  * The Blue Brain BioExplorer is a tool for scientists to extract and analyse
4  * scientific data from visualization
5  *
6  * This file is part of Blue Brain BioExplorer <https://github.com/BlueBrain/BioExplorer>
7  *
8  * Copyright 2020-2024 Blue BrainProject / EPFL
9  *
10  * This program is free software: you can redistribute it and/or modify it under
11  * the terms of the GNU General Public License as published by the Free Software
12  * Foundation, either version 3 of the License, or (at your option) any later
13  * version.
14  *
15  * This program is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License along with
21  * this program. If not, see <https://www.gnu.org/licenses/>.
22  */
23 
24 #include "Viewer.h"
25 
26 #include <platform/core/Core.h>
29 
30 namespace core
31 {
33  : BaseWindow(core)
34 {
35 }
36 
38 {
39  const auto& pm = _core.getParametersManager();
40  std::stringstream ss;
41  ss << "BioExplorer Viewer";
42  const auto animationFrame = pm.getAnimationParameters().getFrame();
43  const auto engineName = pm.getApplicationParameters().getEngine();
44  ss << " [" << engineName << "]";
45  if (animationFrame != std::numeric_limits<uint32_t>::max())
46  ss << " (frame " << animationFrame << ")";
48  ss << " @ " << _timer.perSecondSmoothed() << " FPS";
49  setTitle(ss.str());
50 
52 }
53 } // namespace core
virtual void display()
Definition: BaseWindow.cpp:247
void setTitle(const std::string &title)
Definition: BaseWindow.h:64
PLATFORM_API ParametersManager & getParametersManager()
Definition: Core.cpp:514
PLATFORM_API ApplicationParameters & getApplicationParameters()
PLATFORM_API AnimationParameters & getAnimationParameters()
double perSecondSmoothed() const
Definition: Timer.cpp:80
void display()
Definition: Viewer.cpp:37
Viewer(Core &core)
Definition: Viewer.cpp:32