OpenCOVER
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>
30namespace opencover
31{
55class COVEREXPORT coOnscreenDebug
56{
57public:
59 void show();
60
62 void hide();
63
66
68 void redraw();
69
71 void update();
72
74 void setText(const char *text);
75
80
84 ostringstream &out();
85
92
93protected:
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
Definition: ARToolKit.h:33
This class handles onscreen debugging output.
Definition: coOnscreenDebug.h:56
osg::ref_ptr< osg::Geode > geode
Definition: coOnscreenDebug.h:99
void show()
show the debugging output
static coOnscreenDebug * singleton
Definition: coOnscreenDebug.h:102
osg::ref_ptr< osg::Camera > camera
Definition: coOnscreenDebug.h:100
void redraw()
redraw the debugging output
void setText(const char *text)
set the text of the label
osg::ref_ptr< osgText::Text > text
Definition: coOnscreenDebug.h:98
static coOnscreenDebug * instance()
bool visible
Definition: coOnscreenDebug.h:97
void update()
update (does nothing)
void hide()
hide the debugging output
ostringstream os
Definition: coOnscreenDebug.h:104
void toggleVisibility()
toggle visibility
ostringstream & out()