VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
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 
The base class for all model instances.
Definition: DtModelInstance.h:39
std::string text
Definition: Dt3DTextModelInstance.h:36
TextParameters myParameters
The current parameter set.
Definition: Dt3DTextModelInstance.h:83
osg::ref_ptr< osg::Geode > myGeode
Definition: Dt3DTextModelInstance.h:85
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
int fontSize
Definition: Dt3DTextModelInstance.h:38
Definition: Dt3DTextModelInstance.h:30
float rColor
Definition: Dt3DTextModelInstance.h:32
std::string font
Definition: Dt3DTextModelInstance.h:37
A model definition Interaction any number of named parameters, and also can be used to store cached d...
Definition: DtModelDefinition.h:33
A Creator for the makVrv::Dt3DTextModelInstance class.
Definition: Dt3DTextModelInstance.h:90
Contains makVrv::DtOsgModelInstance class.
DtOsgSceneConnector is used by models to create an OSG position/orientation transform so that it can ...
Definition: DtOsgSceneConnector.h:76
bool flashing
Definition: Dt3DTextModelInstance.h:35
virtual void setVisible(bool isVisible)
no-op
Definition: Dt3DTextModelInstance.h:75
The base class for simple OSG based model instances.
Definition: DtOsgModelInstance.h:72
The polymorphic creator for the DtModelInstance.
Definition: DtModelInstance.h:148
static const TextParameters defaultParameters
Default values for the line parameters.
Definition: Dt3DTextModelInstance.h:42
float bColor
Definition: Dt3DTextModelInstance.h:34
Contains DLL export macros.
Model instance to draw 3D text.
Definition: Dt3DTextModelInstance.h:26
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
float gColor
Definition: Dt3DTextModelInstance.h:33

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)