VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOverlayScreenIntervaledTextModel.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtModel.h>
15 
16 #include <vrvUtil/DtUnicode.h>
18 
19 #include <matrix/vlVector.h>
20 
21 #include <string>
22 #include <vector>
23 
24 namespace makVrv
25 {
26  class DtDe;
27  class DtChannelManager;
28  class DtChannel;
29  class DtChannelConfiguration;
30  class DtOverlayScreenIntervaledTextInstance;
31  class DtModelDefinition;
32 
36  {
37  public:
38  typedef std::vector<DtUnicode> DtScreenIntervaledTextCollection;
39 
40  public:
43 
46 
47  //@name Distributed Interface
49 
51  virtual void setFont(const std::string& fontFile, float fontPointSize);
52 
54  virtual void setTextColor(float r, float g, float b, float a);
55 
57  virtual void setBackgroundColor(float r, float g, float b, float a);
58 
60  virtual void setPosition(int vtx, const DtVector& position);
61 
63  virtual void setVertexList(const vrvTacticalGraphicUtilities::DtVerticesVector& verList);
64 
66  virtual void removePosition(int index);
67 
70  virtual void setGroup(int);
71 
73  virtual void setOrientation(int vtx, const DtTaitBryan& orientation);
74 
78  virtual void setIsSupportModel(bool isSupport);
79 
81  virtual void setEventsEnabled(bool);
82 
84  virtual void setVisible(bool isVisible);
86 
87  //@name Local Interface
89 
91  virtual void addToScene(const DtUniqueID& sceneObjectId, DtModelSetId modelSet,
92  int visualizerType);
93 
95  virtual void removeFromScene();
96 
98  virtual void setModelDefinition(const std::string& str);
100 
103  virtual void setIsClosedFigure(bool);
104 
107  virtual void setScreenIntervaledTextPrefixAndPostFixSeparator(const std::string& separatorString);
108 
111  virtual void setScreenIntervaledTextPrefix(const std::string& prefixString);
112 
115  virtual void setScreenIntervaledTextPostfix(const std::string& postfixString);
116 
120  virtual void setScreenIntervaledTextCollection(const DtScreenIntervaledTextCollection&);
121 
127  virtual void setScreenIntervaledTextInterval(int intervalInScreenSpaceCM);
128 
129  protected:
130 
132  virtual void update();
133 
135  virtual void needsUpdate();
136 
139  virtual void slot_channelCreated(DtChannel* channel);
140 
142  virtual void slot_channelDestroyed(DtChannelManager* channelManager, DtChannel* channel);
143 
145  virtual void setupInstanceWithCurrentValues(DtOverlayScreenIntervaledTextInstance*, const vrvTacticalGraphicUtilities::DtVerticesVector&);
146 
149  virtual void addedToSceneObject(const DtUniqueID& sceneObj, DtModelSetId modelSet,
150  int visualizerType);
151 
152  protected:
154  DtTaitBryan myRotation;
155 
157 
159 
165 
168 
169  float myTextColor[4];
170  float myBackgroundColor[4];
172 
176 
177  typedef std::map<DtChannel*, DtOverlayScreenIntervaledTextInstance*> ChannelInstances;
179 
181 
183 
187  std::string myModelDefinition;
188  int myGroup;
190  };
191 }
DtTaitBryan myRotation
Definition: DtOverlayScreenIntervaledTextModel.h:154
std::string myScreenIntervaledTextPrefixPostfixSeparatorString
Definition: DtOverlayScreenIntervaledTextModel.h:173
vrvTacticalGraphicUtilities::DtVerticesVector myVertices
Definition: DtOverlayScreenIntervaledTextModel.h:158
bool myIsClosedFigure
Definition: DtOverlayScreenIntervaledTextModel.h:182
DtScreenIntervaledTextCollection myScreenIntervaledTextCollection
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayScreenIntervaledTextModel.h:163
ChannelInstances myChannelInstances
Definition: DtOverlayScreenIntervaledTextModel.h:178
std::string myScreenIntervaledTextPrefixString
Definition: DtOverlayScreenIntervaledTextModel.h:174
int myGroup
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayScreenIntervaledTextModel.h:188
std::vector< DtVector > DtVerticesVector
Definition: DtTacticalGraphicUtilities.h:25
std::string myScreenIntervaledTextPostfixString
Definition: DtOverlayScreenIntervaledTextModel.h:175
Class to draw a screen spaced perimeter text on polygons, lines, or other geometry.
Definition: DtOverlayScreenIntervaledTextInstance.h:32
The abstract Channel Class.
Definition: DtChannel.h:35
OSG implementation of overlay polygon model.
Definition: DtOverlayScreenIntervaledTextModel.h:35
DtSignalConnectionManager myConnections
Definition: DtOverlayScreenIntervaledTextModel.h:156
std::string myScreenIntervaledTextFontFile
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayScreenIntervaledTextModel.h:166
int myScreenIntervaledTextIntervalInScreenSpaceCM
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayScreenIntervaledTextModel.h:164
bool myNeedsUpdate
Definition: DtOverlayScreenIntervaledTextModel.h:180
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
std::string myModelDefinition
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOverlayScreenIntervaledTextModel.h:187
bool myEventsEnabled
Definition: DtOverlayScreenIntervaledTextModel.h:153
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Contains makVrv::DtModel class.
Base class for handling DtChannels. Derived classes should override the tick() method and advance the...
Definition: DtChannelManager.h:32
Base class to provide boost signal/slot management.
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:56
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
std::vector< DtUnicode > DtScreenIntervaledTextCollection
Definition: DtOverlayScreenIntervaledTextModel.h:38
DtModelSetId
Definition: DtModelSetEnums.h:19
float myScreenIntervaledTextFontPointSize
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOverlayScreenIntervaledTextModel.h:167
std::map< DtChannel *, DtOverlayScreenIntervaledTextInstance * > ChannelInstances
Definition: DtOverlayScreenIntervaledTextModel.h:177
Contains DLL export macros.

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)