iMSTK
Interactive Medical Simulation Toolkit
imstkPerformanceGraph.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkComponent.h"
10 
11 namespace imstk
12 {
13 class SceneManager;
14 class Viewer;
15 
23 {
24 public:
25  PerformanceGraph(const std::string& name = "PerformanceGraph") : SceneBehaviour(name) { }
26 
30  void visualUpdate(const double& dt);
31 
32  void setViewer(std::weak_ptr<Viewer> viewer);
33  void setSceneManager(std::weak_ptr<SceneManager> sceneManager);
34 
35 protected:
36  //std::shared_ptr<TextVisualModel> m_fpsTextVisualModel;
37  std::weak_ptr<Viewer> m_viewer;
38  std::weak_ptr<SceneManager> m_sceneManager;
39  int m_prevInfoLevel = -1;
40  double m_t = 0.0;
41  double m_updateDuration = 0.15;
42  bool m_enabled = false;
43 };
44 } // namespace imstk
Compound Geometry.
A Behaviour represents a single component system A template is used here for UpdateInfo to keep the C...
Displays task graph node durations of a scene as overlay on the screen.
void visualUpdate(const double &dt)
Update the display of the last frames update times.
Base class for viewer that manages render window and the renderers /// Creates backend-specific rende...
double m_updateDuration
seconds long to wait before updating again