OpenWalnut
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
src
core
graphicsEngine
widgets
labeling
WGELabel.h
1
//---------------------------------------------------------------------------
2
//
3
// Project: OpenWalnut ( http://www.openwalnut.org )
4
//
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
7
//
8
// This file is part of OpenWalnut.
9
//
10
// OpenWalnut is free software: you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// OpenWalnut is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU Lesser General Public License for more details.
19
//
20
// You should have received a copy of the GNU Lesser General Public License
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22
//
23
//---------------------------------------------------------------------------
24
25
#ifndef WGELABEL_H
26
#define WGELABEL_H
27
28
#include <osgText/Text>
29
#include <osgText/FadeText>
30
31
#include "WGELayoutableItem.h"
32
33
/**
34
* Label layout-item. An layoutable item which displays text. This is nice for labeling elements on the screen. It can be used stand-alone (as it
35
* simply is an osgText::Text instance or in conjunction with an WGEItemLayouter.
36
*/
37
class
WGELabel
:
public
osgText::Text,
38
WGELayoutableItem
39
{
40
public
:
41
/**
42
* Convenience typedef for a osg::ref_ptr< WGELabel >.
43
*/
44
typedef
osg::ref_ptr< WGELabel >
SPtr
;
45
46
/**
47
* Convenience typedef for a osg::ref_ptr< const WGELabel >.
48
*/
49
typedef
osg::ref_ptr< const WGELabel >
ConstSPtr
;
50
51
/**
52
* Default constructor.
53
*/
54
WGELabel
();
55
56
/**
57
* Destructor.
58
*/
59
virtual
~WGELabel
();
60
61
/**
62
* Gets the current anchor point of the label.
63
*
64
* \return the anchor.
65
*/
66
virtual
osg::Vec3
getAnchor
()
const
;
67
68
/**
69
* Sets the anchor point in world coordinates of this labels.
70
*
71
* \param anchor the anchor point
72
*/
73
virtual
void
setAnchor
(
const
osg::Vec3& anchor );
74
75
protected
:
76
/**
77
* The anchor of the label in world space.
78
*/
79
osg::Vec3
m_anchor
;
80
81
private
:
82
};
83
84
#endif // WGELABEL_H
85
Generated by
1.8.4