VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOverlayModel.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2026 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtModel.h>
14 #include <vrvCore/DtUniqueID.h>
16 
17 #include <vrvMath/DtVector2.h>
18 #include <vrvMath/DtVector3.h>
19 #include <vrvMath/DtVector4.h>
20 
22 
23 #include <string>
24 #include <vector>
25 
26 namespace makVrv
27 {
28  class DtDe;
29  class DtSegmentedLineInterface;
30  class DtTextProxyInterface;
31  class DtCoordinateSystem;
32  class DtOverlayGeometryManager;
33 
37  {
38  public:
40  DtOverlayModel( DtDe& de, DtUniqueID id );
41 
43  virtual ~DtOverlayModel();
44 
46  DtOverlayModel() = delete;
47 
49  DtOverlayModel( const DtOverlayModel& ) = delete;
50 
52  DtOverlayModel& operator=( const DtOverlayModel& ) = delete;
53 
55  DtOverlayModel( const DtOverlayModel&& ) = delete;
56 
58  DtOverlayModel& operator=( const DtOverlayModel&& other ) = delete;
59  public:
62 
64  // @{
65  virtual void setOrigin( const DtVector& position );
66  virtual DtVector origin() const;
67  // @}
68 
70  virtual void setOrientation( const DtTaitBryan& orientation );
71 
73  // @{
74  virtual void setScale( float scale );
75  virtual float scale() const;
76  // @}
77 
79  // @{
80  virtual void setVisible( bool isVisible );
81  virtual bool isVisible() const;
82  // @}
83 
85  // @{
86  virtual void setStipplePattern( unsigned int stipplePattern );
87  virtual unsigned int stipplePattern() const;
88  // @}
89 
91  // @{
92  virtual void setLineWidth( float );
93  virtual float lineWidth() const;
94  // @}
95 
97  virtual void setColor( float r, float g, float b, float a );
98  virtual bool getColor( float& r, float& g, float& b, float& a ) const;
99 
101  // @{
102  virtual void setEventsEnabled( bool enabled );
103  virtual bool eventsEnabled() const;
104  // @}
105 
110  // @{
111  virtual void setGroup( int groupNum );
112  virtual int group() const;
113  // @}
114 
116  // @{
117  virtual void setFontFile( std::string fontFile );
118  virtual std::string fontFile() const;
119  // @}
120 
122  // @{
123  virtual void setFontPointSize( float pointSize );
124  virtual float fontPointSize() const;
125  // @}
126 
128  // @{
129  virtual void setFontColor( float r, float g, float b, float a );
130  virtual bool getFontColor( float& r, float& g, float& b, float& a ) const;
131  // @}
132 
135  virtual void setAdditionalLabels( std::vector<std::string>& labels );
136 
140  virtual void setLabelSpanFraction( double fraction );
141 
143  virtual double labelSpanFraction() const;
144 
147  virtual void setLabelGapPadding( double padding );
148 
150  virtual double labelGapPadding() const;
151 
153 
154  // @name Inherited DtModel methods
155  // @{
156 
158  virtual void setPosition( int vtx, const DtVector& position ) override;
159 
162  virtual void setOrientation( int vtx, const DtTaitBryan& orientation ) override;
163 
165  virtual void setModelDefinition( const std::string& str ) override;
166 
167  // @}
168 
169  protected:
170 
171  // @name Inherited DtModel methods
172  // @{
173 
175  virtual void addToScene( const DtUniqueID& sceneObjectId,
176  DtModelSetId modelSet, int visualizerType ) override;
177 
179  virtual void removeFromScene() override;
180 
184  virtual void setIsSupportModel( bool isSupport ) override;
185 
186  // @}
187 
189  virtual void needsUpdate();
190 
192  virtual void update();
193 
195  virtual void createGeometryIfNecessary() = 0;
196 
198  virtual void clearGeometry() = 0;
199 
200 
201 
203  virtual void updateVertices() = 0;
204 
206  virtual void updateColors() = 0;
207  virtual void updateStipplePattern() = 0;
208  virtual void updateLineWidth() = 0;
209  virtual void updateEventsEnabled() = 0;
210 
212  virtual void updateGroup() = 0;
213 
216  virtual void updateLabels() = 0;
217 
219  virtual void slot_coordinateSystemChanged();
220 
221  protected:
222  std::vector<DtVector> myControlPoints;
223  std::vector<bool> myControlPointsSet;
224 
226 
227  boost::signalslib::connection mySignalPostUpdateConnection;
228 
230 
232  float myScale;
233 
234  float myLineWidth;
236  unsigned long long myUserData;
237 
238  bool myVisible;
239  unsigned int myLineStipplePattern;
240  int myGroup;
241 
243 
246 
247  // An overall position
248  DtVector myOrigin;
249 
250  // local clone of the system wide coordinate system.
251  // for thread safety.
254 
255  std::string myFontFile;
259 
261 
263  std::vector<std::string> myAdditionalLabels;
264 
267 
270 
272  };
273 }
int myGeometryInterfaceCount
Definition: DtOverlayModel.h:244
boost::signalslib::connection mySignalPostUpdateConnection
Definition: DtOverlayModel.h:227
float myFontPointSize
Definition: DtOverlayModel.h:256
double myLabelSpanFraction
Desired label height as a fraction of the graphic&#39;s world span. Default 0.06.
Definition: DtOverlayModel.h:266
DtVector4< float > myFontColor
Definition: DtOverlayModel.h:257
2 dimensional vector
voidpf uLong int origin
Definition: ioapi.h:42
DtCoordinateSystem * myCoordinateSystem
Definition: DtOverlayModel.h:253
bool myEventsEnabled
Definition: DtOverlayModel.h:235
DtAltitudeBasedConfigurationCollection myAltitudeBasedConfigurationCollection
Definition: DtOverlayModel.h:260
DtVector myOrigin
Definition: DtOverlayModel.h:248
4 dimensional vector
std::string myFontFile
Definition: DtOverlayModel.h:255
double myLabelGapPadding
Total gap padding around label text as a fraction of the label height. Default 0.6.
Definition: DtOverlayModel.h:269
unsigned long long myUserData
Definition: DtOverlayModel.h:236
float myLineWidth
Definition: DtOverlayModel.h:234
3 dimensional vector
Contains makVrv::DtAltitudeBasedConfiguration class.
std::vector< bool > myControlPointsSet
Definition: DtOverlayModel.h:223
DtFontInterface * myFontInterface
Definition: DtOverlayModel.h:258
Base Overlay Model.
Definition: DtOverlayModel.h:36
int myGroup
Definition: DtOverlayModel.h:240
int myLabelCount
Definition: DtOverlayModel.h:245
unsigned int myLineStipplePattern
Definition: DtOverlayModel.h:239
A class with encapsulated a font loaded from disk with a given size.
Definition: DtFontInterface.h:22
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
float myScale
Definition: DtOverlayModel.h:232
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
bool myVisible
Definition: DtOverlayModel.h:238
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
int myOverlayId
Definition: DtOverlayModel.h:242
Contains makVrv::DtModel class.
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
Definition: DtOverlayGeometryManager.h:27
DtSignalConnectionManager myConnections
Definition: DtOverlayModel.h:252
std::vector< DtVector > myControlPoints
Definition: DtOverlayModel.h:222
Base class to provide boost signal/slot management.
bool myNeedsUpdate
Definition: DtOverlayModel.h:225
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:57
Contains makVrv::DtUniqueID type.
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
std::vector< std::string > myAdditionalLabels
Plain-text additional labels forwarded from the network.
Definition: DtOverlayModel.h:263
DtVector4< double > myColor
Definition: DtOverlayModel.h:231
DtModelSetId
Definition: DtModelSetEnums.h:19
DtTaitBryan myOrientationTaitBryan
Definition: DtOverlayModel.h:229
DtOverlayGeometryManager & myOverlayGeometryManager
Definition: DtOverlayModel.h:271
std::vector< DtAltitudeBasedConfiguration > DtAltitudeBasedConfigurationCollection
A collection of altitude-based configurations for a text proxy.
Definition: DtAltitudeBasedConfiguration.h:42
Contains DLL export macros.

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)