VR-Forces 4.3 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 
36  {
37  public:
38 
40  const static unsigned int overlayLayerId = 33;
41 
44 
46  void addLabel(const std::string& group, const std::string& name);
47 
48  void removeLabel(const std::string& group, const std::string& name);
49 
52 
54  virtual void updateCallback();
55 
56  protected:
57  void updateGroupNodeList();
58  void updateFrameTimes();
59  DtWindowTextAgent* makeLine(double x, double y);
60  void printLine(const std::string& line);
61  bool findNodes( DtProfileNode* parent, std::string name, std::vector<DtProfileNode*>& found );
63 
66 
67  struct StatData
68  {
69  std::string name;
70  std::vector<DtProfileNode*> nodes;
71  double totals[MAX_FRAMES];
72  };
73 
74  typedef std::vector<StatData*> StatList;
75  typedef std::map<std::string, StatList*> GroupMap;
77  std::vector<DtWindowTextAgent*> myLines;
78 
80  };
81 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)