VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtOsgPerformanceStatsOverlay.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
16 #include <string>
17 #include <vector>
18 #include <map>
19 
20 namespace osg
21 {
22  class FrameStamp;
23 }
24 
25 #define MAX_FRAMES 60
26 
27 namespace makVrv
28 {
29  class DtOsgRenderer;
30  class DtWindowTextAgent;
31  class DtProfileNode;
32  class DtEventProcessorInterface;
33 
37  {
38  public:
39 
41  const static unsigned int overlayLayerId = 33;
42 
45 
46  virtual void reset();
47 
49  void addLabel(const std::string& group, const std::string& name);
50 
51  void removeLabel(const std::string& group, const std::string& name);
52 
55 
57  virtual void updateCallback();
58 
59  protected:
60  void updateGroupNodeList();
61  void updateFrameTimes();
62  DtWindowTextAgent* makeLine(double x, double y);
63  void printLine(const std::string& line);
64  bool findNodes( DtProfileNode* parent, std::string name, std::vector<DtProfileNode*>& found );
66 
69 
70  struct StatData
71  {
72  std::string name;
73  std::vector<DtProfileNode*> nodes;
74  double totals[MAX_FRAMES];
75  };
76 
77  typedef std::vector<StatData*> StatList;
78  typedef std::map<std::string, StatList*> GroupMap;
80  std::vector<DtWindowTextAgent*> myLines;
81 
83 
87  };
88 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)