OpenSceneGraph 3.6.5
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
49
50 typedef std::map<osg::View*, osg::Vec4 > ViewBlendColourMap;
51
54
56
58};
59
60}
61
62
63#endif
The osgText library is a NodeKit that extends the core scene graph to support high quality text.
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition RenderInfo:28
virtual ~FadeText()
Definition FadeText:43
float _fadeSpeed
Definition FadeText:55
float getFadeSpeed() const
Get the speed that the alpha value changes.
Definition FadeText:36
const ViewBlendColourMap & getViewBlendColourMap() const
Definition FadeText:53
virtual void drawImplementation(osg::RenderInfo &renderInfo) const
Draw the text.
ViewBlendColourMap & getViewBlendColourMap()
Definition FadeText:52
META_Object(osgText, FadeText) void setFadeSpeed(float fadeSpeed)
Set the speed that the alpha value changes as the text is occluded or becomes visible.
Definition FadeText:29
ViewBlendColourMap _viewBlendColourMap
Definition FadeText:57
std::map< osg::View *, osg::Vec4 > ViewBlendColourMap
Definition FadeText:50
friend struct FadeTextUpdateCallback
Definition FadeText:48
FadeText(const Text &text, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition Text:27
#define OSGTEXT_EXPORT
Definition Export:39

osg logo
Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.