VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCigiSymbolHandler.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 <vrvCigi/vrvCigi.h>
13 
14 #include <vrvCore/DtUniqueID.h>
15 #include <vrvCore/DtWindowObjectAgent.hpp>
16 #include <vrvCore/DtWindowEllipseAgent.hpp>
19 #include <vrvUtil/signalslib.h>
20 #include <map>
21 
22 #include <boost/bimap.hpp>
23 
24 class CigiBaseSymbolLineDef;
25 class CigiBaseSymbolCtrl;
26 class CigiBaseSymbolSurfaceDef;
27 class CigiBaseSymbolTextDef;
28 class CigiBaseSymbolCircleDef;
29 
30 namespace makVrv
31 {
32  class DtDe;
33  class DtCigiConnection;
34 
35 
53  {
54  public:
56 
58  typedef boost::bimap<unsigned int, DtWindowObjectAgent*> DtSymbolMap;
59 
61  typedef boost::bimap<unsigned int, DtWindowObjectAgent*> DtSurfaceMap;
62 
66  typedef std::map<unsigned int, std::vector<DtWindowObjectAgent*>> DtGroupedAgentMap;
67 
72  {
73  Hidden = 0,
75  Destroyed
76  };
77 
82  {
83  unsigned int symbolId;
84  unsigned int parentSymbolId;
87  bool flashControl; // 0 Continue / 1 Reset
89  unsigned int layer;
90  unsigned int flashDutyCyclePercentage; // 0 - 100
91  unsigned int surfaceId;
92  float flashPeriod;
93  float positionU;
94  float positionV;
95  float rotation;
96  float red;
97  float green;
98  float blue;
99  float alpha;
100  float scaleU;
101  float scaleV;
102  };
103 
106  {
107  SurfaceActive = 0,
108  SurfaceDestroyed
109  };
110 
119  {
120  unsigned int surfaceId;
121  unsigned int viewId;
122  unsigned int entityId;
125  float left;
126  float right;
127  float top;
128  float bottom;
129  float width;
130  float height;
131  float minU;
132  float maxU;
133  float minV;
134  float maxV;
135  float xOffset;
136  float yOffset;
137  float zOffset;
138  };
139 
142  {
143  Point = 0,
149  TriangleFan
150  };
151 
153  struct Vertex
154  {
155  float u;
156  float v;
157  bool operator==( const Vertex& rhs ) const
158  {
159  return (u == rhs.u && v == rhs.v);
160  }
161  };
162 
165  {
166  unsigned int symbolId;
168  unsigned int stipplePattern;
169  float lineWidth;
171  std::vector<Vertex> vertices;
172  };
173 
176  {
177  unsigned int symbolId;
178  std::string font;
179  unsigned int alignment;
180  unsigned int orientation;
181  float fontSize;
182  std::string textString;
183  };
184 
188  struct Circle
189  {
190  float centerU;
191  float centerV;
192  float radius;
193  float innerRadius;
194  float startAngle;
195  float endAngle;
196  };
197 
200  {
201  unsigned int symbolId;
202  unsigned int stipplePattern;
204  float lineWidth;
206  std::vector<Circle> circles;
207  };
208 
210  virtual ~DtCigiSymbolHandler();
211 
216  virtual void reset();
217 
218  protected:
220  DtCigiSymbolHandler( DtDe& de, DtCigiConnection& connection );
221 
223 
224  virtual void slot_onSymbolControlReceived( CigiBaseSymbolCtrl& packet );
229 
236  virtual void slot_onSymbolSurfaceDefinitionReceived( CigiBaseSymbolSurfaceDef& packet );
237 
245  virtual void slot_onSymbolPolygonDefinitionReceived( CigiBaseSymbolLineDef& packet );
246 
254  virtual void slot_onSymbolLineDefinitionReceived( CigiBaseSymbolLineDef& packet );
255 
260  virtual void slot_onSymbolTextDefinitionReceived( CigiBaseSymbolTextDef& packet );
261 
266  virtual void slot_onSymbolCircleDefinitionReceived( CigiBaseSymbolCircleDef& packet );
268 
271 
272  virtual void performSymbolControl(const SymbolControl& symbolControl );
275 
281  virtual void performSymbolSurfaceDefinition( const SymbolSurfaceDefinition & surfaceDefinition );
282 
288  virtual void performPolygonDefinition( const PolygonDefinition& polygonDefinition );
289 
293  virtual void performTextDefinition( const TextDefinition& textDefinition );
294 
298  virtual void performCircleDefinition( const CircleDefinition& circleDefinition );
299 
303  virtual DtWindowObjectAgent* findWindowObjectAgent( unsigned int symbolId );
304  virtual DtWindowObjectAgent* findWindowObjectAgentFromUniqueId( DtUniqueID uniqueId );
305 
308  virtual void createPolygon( const PolygonDefinition& polygonDefinition );
309 
312  virtual void createTextObject( const TextDefinition& textDefinition );
313 
315  virtual void deleteWindowObjectAndChildren( unsigned int symbolId );
316 
319  virtual void deleteSurfaceAndChildren( unsigned int surfaceId );
320 
324  virtual void deleteEntityAttachedSurfaceAndChildren( int entityID );
326  protected:
330  virtual void slot_onEntityDeleted( int entityID );
331 
336  virtual void slot_setChannelOnChildFromSurface();
337 
341  virtual void setChannelOnChildFromSurface( );
342 
348  std::vector<std::pair<unsigned int, unsigned int>> mySetSurfaceChannelOnSymbolVector;
349 
350  public:
353  DtCigiSymbolHandler() = delete;
356  DtCigiSymbolHandler& operator=( DtCigiSymbolHandler& ) = delete;
357  DtCigiSymbolHandler& operator=( DtCigiSymbolHandler&& ) = delete;
359  protected:
362 
366 
370 
377  std::multimap<unsigned int, unsigned int> myEntityIdToSurfaceIdMap;
378  std::map< unsigned int, unsigned int > mySurfaceIdToEntityIdMap;
380 
382  vrvSignalsLib::connection myPostTickConnection;
383  };
384 
388  {
389  public:
392 
394  virtual ~DtCigiSymbolHandlerCreator();
395 
397  static DtCigiSymbolHandlerCreator& instance( DtDe& de );
398 
400  virtual DtCigiSymbolHandler* create( DtCigiConnection& connection ) const;
401 
402  protected:
404  };
405 }
unsigned int flashDutyCyclePercentage
Definition: DtCigiSymbolHandler.h:90
unsigned int orientation
Definition: DtCigiSymbolHandler.h:180
float alpha
Definition: DtCigiSymbolHandler.h:99
unsigned int stipplePattern
Definition: DtCigiSymbolHandler.h:202
unsigned int entityId
Definition: DtCigiSymbolHandler.h:122
DtSymbolMap mySymbolMap
This map is accessed in the render thread. Do not access it in the CIGI thread if multithreading is o...
Definition: DtCigiSymbolHandler.h:365
float centerU
Definition: DtCigiSymbolHandler.h:190
DtDe & myDe
Definition: DtCigiSymbolHandler.h:403
unsigned int symbolId
Definition: DtCigiSymbolHandler.h:201
Struct for symbol control, used to reduce amount of code; CIGI base contains all the V3 &amp; V4 informat...
Definition: DtCigiSymbolHandler.h:81
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
This class handles all the processing of CIGI Symbol Messages. CIGI Symbols require no responses so t...
Definition: DtCigiSymbolHandler.h:52
float right
Definition: DtCigiSymbolHandler.h:126
Definition: DtCigiSymbolHandler.h:144
float stipplePatternLength
Definition: DtCigiSymbolHandler.h:170
std::multimap< unsigned int, unsigned int > myEntityIdToSurfaceIdMap
These are separate because when entities get deleted we need to remove the surface and all the symbol...
Definition: DtCigiSymbolHandler.h:377
Struct for a vertex.
Definition: DtCigiSymbolHandler.h:153
std::string font
Definition: DtCigiSymbolHandler.h:178
unsigned int alignment
Definition: DtCigiSymbolHandler.h:179
float positionV
Definition: DtCigiSymbolHandler.h:94
boost::bimap< unsigned int, DtWindowObjectAgent * > DtSymbolMap
Typedef map to store the symbols. Key is Symbol ID.
Definition: DtCigiSymbolHandler.h:58
unsigned int symbolId
Definition: DtCigiSymbolHandler.h:83
float minV
Definition: DtCigiSymbolHandler.h:133
float maxV
Definition: DtCigiSymbolHandler.h:134
Definition: DtCigiSymbolHandler.h:148
SurfaceState
State of a surface.
Definition: DtCigiSymbolHandler.h:105
Struct for storing a single circle Many circles can be associated with a single symbol id...
Definition: DtCigiSymbolHandler.h:188
Struct for surface definition, used to reduce amount of code; CIGI base contains all the V3 &amp; V4 info...
Definition: DtCigiSymbolHandler.h:118
float yOffset
Definition: DtCigiSymbolHandler.h:136
PrimitiveType primitiveType
Definition: DtCigiSymbolHandler.h:167
float positionU
Definition: DtCigiSymbolHandler.h:93
float centerV
Definition: DtCigiSymbolHandler.h:191
Contains DLL export macros.
float green
Definition: DtCigiSymbolHandler.h:97
float minU
Definition: DtCigiSymbolHandler.h:131
unsigned int layer
Definition: DtCigiSymbolHandler.h:89
unsigned int symbolId
Definition: DtCigiSymbolHandler.h:166
bool attachState
Definition: DtCigiSymbolHandler.h:86
float xOffset
Definition: DtCigiSymbolHandler.h:135
Definition: DtCigiSymbolHandler.h:74
float maxU
Definition: DtCigiSymbolHandler.h:132
std::vector< std::pair< unsigned int, unsigned int > > mySetSurfaceChannelOnSymbolVector
Used in performSymbolControl if the surface and/or the symbol have not been created yet and they requ...
Definition: DtCigiSymbolHandler.h:348
Struct for non-ccl Text definition.
Definition: DtCigiSymbolHandler.h:175
DtSignalConnectionManager mySignalConnections
Definition: DtCigiSymbolHandler.h:381
Contains makVrv::DtVirtualBaseClass class.
unsigned int viewId
Definition: DtCigiSymbolHandler.h:121
DtDe & myDe
Definition: DtCigiSymbolHandler.h:360
DtCigiConnection & myConnection
Definition: DtCigiSymbolHandler.h:361
float scaleU
Definition: DtCigiSymbolHandler.h:100
float left
Definition: DtCigiSymbolHandler.h:125
unsigned int symbolId
Definition: DtCigiSymbolHandler.h:177
unsigned int surfaceId
Definition: DtCigiSymbolHandler.h:120
float scaleV
Definition: DtCigiSymbolHandler.h:101
SurfaceState surfaceState
Definition: DtCigiSymbolHandler.h:123
unsigned int surfaceId
Definition: DtCigiSymbolHandler.h:91
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Definition: DtCigiSymbolHandler.h:147
Definition: vrfObjectManipulationHandlerBaseClass.h:60
Definition: DtCigiSymbolHandler.h:146
Struct for non-ccl polygon and line packet storage.
Definition: DtCigiSymbolHandler.h:164
bool inheritColor
Definition: DtCigiSymbolHandler.h:88
float startAngle
Definition: DtCigiSymbolHandler.h:194
This class is responsible for the actual processing of CIGI data. This holds the entity visualizer...
Definition: DtCigiConnection.h:58
bool drawingStyle
Definition: DtCigiSymbolHandler.h:203
Definition: DtCigiSymbolHandler.h:145
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
float flashPeriod
Definition: DtCigiSymbolHandler.h:92
float innerRadius
Definition: DtCigiSymbolHandler.h:193
bool flashControl
Definition: DtCigiSymbolHandler.h:87
float blue
Definition: DtCigiSymbolHandler.h:98
Creator class for the DtCigiSymbolHandler.
Definition: DtCigiSymbolHandler.h:387
unsigned int parentSymbolId
Definition: DtCigiSymbolHandler.h:84
vrvSignalsLib::connection myPostTickConnection
Definition: DtCigiSymbolHandler.h:382
Struct for non-ccl circle definitions.
Definition: DtCigiSymbolHandler.h:199
std::map< unsigned int, std::vector< DtWindowObjectAgent * > > DtGroupedAgentMap
Typedef to store grouped object agents An ellipse group can have X number of agents associated with i...
Definition: DtCigiSymbolHandler.h:66
float u
Definition: DtCigiSymbolHandler.h:155
float v
Definition: DtCigiSymbolHandler.h:156
Base class to provide boost signal/slot management.
unsigned int stipplePattern
Definition: DtCigiSymbolHandler.h:168
float stipplePatternLength
Definition: DtCigiSymbolHandler.h:205
std::string textString
Definition: DtCigiSymbolHandler.h:182
float width
Definition: DtCigiSymbolHandler.h:129
Contains makVrv::DtUniqueID type.
float red
Definition: DtCigiSymbolHandler.h:96
float bottom
Definition: DtCigiSymbolHandler.h:128
std::map< unsigned int, unsigned int > mySurfaceIdToEntityIdMap
These are separate because when entities get deleted we need to remove the surface and all the symbol...
Definition: DtCigiSymbolHandler.h:378
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:76
float rotation
Definition: DtCigiSymbolHandler.h:95
bool operator==(const Vertex &rhs) const
Definition: DtCigiSymbolHandler.h:157
float endAngle
Definition: DtCigiSymbolHandler.h:195
std::vector< Vertex > vertices
Definition: DtCigiSymbolHandler.h:171
std::vector< Circle > circles
Definition: DtCigiSymbolHandler.h:206
#define DT_DLL_VRVCIGI
Definition: vrvCigi.h:19
float radius
Definition: DtCigiSymbolHandler.h:192
PrimitiveType
Enum for polygon &amp; line primitive types.
Definition: DtCigiSymbolHandler.h:141
float top
Definition: DtCigiSymbolHandler.h:127
float lineWidth
Definition: DtCigiSymbolHandler.h:169
bool attachType
Definition: DtCigiSymbolHandler.h:124
SymbolState symbolState
Definition: DtCigiSymbolHandler.h:85
DtSurfaceMap mySurfaceMap
This map is accessed in the render thread. Do not access it in the CIGI thread if multithreading is o...
Definition: DtCigiSymbolHandler.h:369
SymbolState
If a user sets a symbol to HIDDEN, they MUST set a color when setting the visibility back to visible...
Definition: DtCigiSymbolHandler.h:71
float zOffset
Definition: DtCigiSymbolHandler.h:137
float fontSize
Definition: DtCigiSymbolHandler.h:181
float lineWidth
Definition: DtCigiSymbolHandler.h:204
boost::bimap< unsigned int, DtWindowObjectAgent * > DtSurfaceMap
Typedef map to store the surfaces. Key is surface ID.
Definition: DtCigiSymbolHandler.h:61
float height
Definition: DtCigiSymbolHandler.h:130

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)