OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
coOnscreenDebug.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef CO_ONSCREENDEBUG_H
9 #define CO_ONSCREENDEBUG_H
10 
24 #include <sstream>
25 #include <util/common.h>
26 #include <osg/Version>
27 #include <osg/Camera>
28 #include <osg/Geode>
29 #include <osgText/Text>
30 namespace opencover
31 {
55 class COVEREXPORT coOnscreenDebug
56 {
57 public:
59  void show();
60 
62  void hide();
63 
65  void toggleVisibility();
66 
68  void redraw();
69 
71  void update();
72 
74  void setText(const char *text);
75 
79  static coOnscreenDebug *instance();
80 
84  ostringstream &out();
85 
91  void updateString();
92 
93 protected:
95  virtual ~coOnscreenDebug();
96 
97  bool visible;
98  osg::ref_ptr<osgText::Text> text;
99  osg::ref_ptr<osg::Geode> geode;
100  osg::ref_ptr<osg::Camera> camera;
101 
103 
104  ostringstream os;
105 };
106 }
107 #endif //CO_ONSCREENDEBUG_H
osg::ref_ptr< osgText::Text > text
Definition: coOnscreenDebug.h:98
ostringstream os
Definition: coOnscreenDebug.h:104
static coOnscreenDebug * singleton
Definition: coOnscreenDebug.h:102
This class handles onscreen debugging output.
Definition: coOnscreenDebug.h:55
bool visible
Definition: coOnscreenDebug.h:97
osg::ref_ptr< osg::Camera > camera
Definition: coOnscreenDebug.h:100
osg::ref_ptr< osg::Geode > geode
Definition: coOnscreenDebug.h:99