openscenegraph
FadeText
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGTEXT_FADETEXT
15#define OSGTEXT_FADETEXT 1
16
17#include <osgText/Text>
18
19namespace osgText {
20
21
23{
24public:
25
28
30
31
32
33 void setFadeSpeed(float fadeSpeed) { _fadeSpeed = fadeSpeed; }
34
36 float getFadeSpeed() const { return _fadeSpeed; }
37
39 virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
40
41protected:
42
43 virtual ~FadeText() {}
44
45 void init();
46
47 struct FadeTextUpdateCallback;
48 friend struct FadeTextUpdateCallback;
49
50 typedef std::map<osg::View*, osg::Vec4 > ViewBlendColourMap;
51
52 ViewBlendColourMap& getViewBlendColourMap() { return _viewBlendColourMap; }
53 const ViewBlendColourMap& getViewBlendColourMap() const { return _viewBlendColourMap; }
54
56
58};
59
60}
61
62
63#endif
Definition FadeText:23
virtual ~FadeText()
Definition FadeText:43
float _fadeSpeed
Definition FadeText:55
float getFadeSpeed() const
Definition FadeText:36
const ViewBlendColourMap & getViewBlendColourMap() const
Definition FadeText:53
virtual void drawImplementation(osg::RenderInfo &renderInfo) const
ViewBlendColourMap & getViewBlendColourMap()
Definition FadeText:52
META_Object(osgText, FadeText) void setFadeSpeed(float fadeSpeed)
Definition FadeText:29
ViewBlendColourMap _viewBlendColourMap
Definition FadeText:57
std::map< osg::View *, osg::Vec4 > ViewBlendColourMap
Definition FadeText:50
FadeText(const Text &text, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition Text:27
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition RenderInfo:28
#define OSGTEXT_EXPORT
Definition osgText/Export:39