OpenCOVER
coHud.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_HUD_H
9#define CO_HUD_H
10
24#include <util/common.h>
25#include <osg/Version>
26
27#include <osg/Camera>
28#include <osg/Geode>
29#include <osgText/Text>
30namespace opencover
31{
32class COVEREXPORT coHud
33{
34 coHud();
35public:
36 virtual ~coHud();
37 static coHud *instance();
38
39 void show();
40 void hide();
41 void redraw();
42 void hideLater(float time = -1.);
43 bool update();
44 bool isVisible() const;
45
46 void setText1(const std::string &text);
47 void setText2(const std::string &text);
48 void setText3(const std::string &text);
49
50protected:
51 bool visible;
52 osg::ref_ptr<osgText::Text> line1;
53 osg::ref_ptr<osgText::Text> line2;
54 osg::ref_ptr<osgText::Text> line3;
55 osg::ref_ptr<osg::Geode> geode;
56 osg::ref_ptr<osg::Camera> camera;
57
58 double hudTime;
59 double logoTime;
60 bool doHide;
61
62private:
63 static coHud *instance_;
64};
65}
66#endif
Definition: ARToolKit.h:33
Definition: coHud.h:33
double hudTime
Definition: coHud.h:58
osg::ref_ptr< osgText::Text > line3
Definition: coHud.h:54
osg::ref_ptr< osgText::Text > line2
Definition: coHud.h:53
double logoTime
Definition: coHud.h:59
bool doHide
Definition: coHud.h:60
void hideLater(float time=-1.)
void setText3(const std::string &text)
osg::ref_ptr< osgText::Text > line1
Definition: coHud.h:52
osg::ref_ptr< osg::Camera > camera
Definition: coHud.h:56
osg::ref_ptr< osg::Geode > geode
Definition: coHud.h:55
bool visible
Definition: coHud.h:51
void setText1(const std::string &text)
void setText2(const std::string &text)
static coHud * instance()
virtual ~coHud()
bool isVisible() const