OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FadeText.h
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 
19 namespace osgText {
20 
21 
23 {
24 public:
25 
26  FadeText();
27  FadeText(const Text& text,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
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 
41 protected:
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 
55  float _fadeSpeed;
56 
57  mutable ViewBlendColourMap _viewBlendColourMap;
58 };
59 
60 }
61 
62 
63 #endif
float _fadeSpeed
Definition: FadeText.h:55
std::map< osg::View *, osg::Vec4 > ViewBlendColourMap
Definition: FadeText.h:50
ViewBlendColourMap _viewBlendColourMap
Definition: FadeText.h:57
const ViewBlendColourMap & getViewBlendColourMap() const
Definition: FadeText.h:53
META_Object(osgText, FadeText) void setFadeSpeed(float fadeSpeed)
Definition: FadeText.h:29
ViewBlendColourMap & getViewBlendColourMap()
Definition: FadeText.h:52
typedef void(GL_APIENTRY *GLTexImage3DProc)(GLenum target
virtual ~FadeText()
Definition: FadeText.h:43
#define OSGTEXT_EXPORT
Definition: Export.h:39
float getFadeSpeed() const
Definition: FadeText.h:36