VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrvOsg
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
>
17
#include <
vrvOsg/DtOsgModelInstance.h
>
18
19
#include <osg/Geode>
20
#include <osg/MatrixTransform>
21
22
namespace
makVrv
23
{
26
class
DT_DLL_VRVOSG
Dt3DTextModelInstance
:
public
DtOsgModelInstance
27
{
28
public
:
29
30
struct
TextParameters
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
42
static
const
TextParameters
defaultParameters
;
43
44
friend
class
Dt3DTextModelInstanceCreator
;
45
47
Dt3DTextModelInstance
(
DtDe
& de);
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
83
TextParameters
myParameters
;
84
85
osg::ref_ptr<osg::Geode>
myGeode
;
86
};
87
90
class
DT_DLL_VRVOSG
Dt3DTextModelInstanceCreator
:
public
DtModelInstanceCreator
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
105
Dt3DTextModelInstanceCreator
();
106
};
107
}
108
109
#endif
110
Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)