OpenWalnut
1.2.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
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
#include "../../WExportWGE.h"
33
34
/**
35
* 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
36
* simply is an osgText::Text instance or in conjunction with an WGEItemLayouter.
37
*/
38
class
WGE_EXPORT
WGELabel
:
public
osgText::Text,
39
WGELayoutableItem
40
{
41
public
:
42
43
/**
44
* Convenience typedef for a osg::ref_ptr< WGELabel >.
45
*/
46
typedef
osg::ref_ptr< WGELabel >
SPtr
;
47
48
/**
49
* Convenience typedef for a osg::ref_ptr< const WGELabel >.
50
*/
51
typedef
osg::ref_ptr< const WGELabel >
ConstSPtr
;
52
53
/**
54
* Default constructor.
55
*/
56
WGELabel
();
57
58
/**
59
* Destructor.
60
*/
61
virtual
~
WGELabel
();
62
63
/**
64
* Gets the current anchor point of the label.
65
*
66
* \return the anchor.
67
*/
68
virtual
osg::Vec3
getAnchor
()
const
;
69
70
/**
71
* Sets the anchor point in world coordinates of this labels.
72
*
73
* \param anchor the anchor point
74
*/
75
virtual
void
setAnchor(
const
osg::Vec3& anchor );
76
77
protected
:
78
79
/**
80
* The anchor of the label in world space.
81
*/
82
osg::Vec3
m_anchor
;
83
84
private
:
85
};
86
87
#endif // WGELABEL_H
88
Generated by
1.8.1