VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgPerformanceStats.h
Go to the documentation of this file.
1 /******************************************************************************
2 /******************************************************************************
3 ** Copyright (c) 2017 MAK Technologies, Inc.
4 ** All rights reserved.
5 ******************************************************************************/
6 
10 
11 #pragma once
12 
13 #include <vrvOsg/vrvOsg.h>
14 
16 #include <boost/signals.hpp>
17 
18 #include <string>
19 #include <vector>
20 #include <map>
21 
22 #define MAX_FRAMES 60
23 
24 namespace makVrv
25 {
26  class DtKeyEvent;
30  {
31  public:
32 
35 
36  virtual void reset();
37 
39  void addLabel(const std::string& group, const std::string& name);
40 
41  void removeLabel(const std::string& group, const std::string& name);
42 
44  virtual ~DtOsgPerformanceStats();
45 
47  virtual void updateCallback();
48 
50  virtual void handleKeyEvent(int key, int modifier);
51 
53  boost::signal<void(const std::string&)> signal_statsChanged;
54 
55  protected:
56  void updateGroupNodeList();
57  void updateFrameTimes();
59  void appendToString(const std::string& str);
60  bool findNodes(DtProfileNode* parent, const std::string& name, std::vector<DtProfileNode*>& found);
61 
63 
64 
65 
66  struct StatData
67  {
68  std::string name;
69  std::vector<DtProfileNode*> nodes;
70  double totals[MAX_FRAMES];
71  };
72 
73  typedef std::vector<StatData*> StatList;
74  typedef std::map<std::string, StatList*> GroupMap;
76 
80 
81  std::string myStatsInString;
86  };
87 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)