VR-Forces 4.1.1 Class Documentation
Dt3DTextModelInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: Dt3DTextModelInstance.h,v $ $Revision: 1.0 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef Dt3DTextModelInstance_H_
14 #define Dt3DTextModelInstance_H_
15 
16 #include <vrvOsg/vrvOsg.h>
18 
19 #include <osg/Geode>
20 #include <osg/MatrixTransform>
21 
22 namespace makVrv
23 {
27  {
28  public:
29 
31  {
32  float rColor; // RGB red value
33  float gColor; // RGB green value
34  float bColor; // RGB blue value
35  bool flashing; // Like HTML blink
36  std::string text; // The text to display
37  std::string font; // The font used to render the text
38  int fontSize; // Character size in pixels
39  };
40 
43 
45 
48 
50  virtual ~Dt3DTextModelInstance();
51 
53  virtual void setColor(float r, float g, float b);
54 
56  virtual void setText(const std::string& text);
57 
59  virtual void setFont(const std::string& fontName);
60 
62  virtual void setFontSize(int sizeInPixels);
63 
66  virtual bool realize(DtModelDefinition& definition);
67 
69  virtual void addToConnector( DtOsgSceneConnector* connector );
70 
72  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
73 
75  virtual void setVisible(bool isVisible) {}
76 
77  protected:
78 
80  virtual void build(const TextParameters& parameters);
81 
84 
85  osg::ref_ptr<osg::Geode> myGeode;
86  };
87 
91  {
92  public:
93 
95  static void registerCreator(DtDe& de);
96 
98  virtual ~Dt3DTextModelInstanceCreator ();
99 
101  virtual DtModelInstance* create(DtDe& de);
102 
103  protected:
104 
106  };
107 }
108 
109 #endif
110 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)