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) 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>
14 #include <vrvCore/DtUniqueID.h>
16 
17 #include <vrvMath/DtVector2.h>
18 #include <vrvMath/DtVector3.h>
19 #include <vrvMath/DtVector4.h>
20 
22 
23 namespace makVrv
24 {
25  class DtDe;
26  class DtSegmentedLineInterface;
27  class DtTextProxyInterface;
28  class DtCoordinateSystem;
29  class DtOverlayGeometryManager;
30 
34  {
35  public:
37  DtOverlayModel( DtDe& de, DtUniqueID id );
38 
40  virtual ~DtOverlayModel();
41 
43  DtOverlayModel() = delete;
44 
46  DtOverlayModel( const DtOverlayModel& ) = delete;
47 
49  DtOverlayModel& operator=( const DtOverlayModel& ) = delete;
50 
52  DtOverlayModel( const DtOverlayModel&& ) = delete;
53 
55  DtOverlayModel& operator=( const DtOverlayModel&& other ) = delete;
56  public:
59 
61  // @{
62  virtual void setOrigin( const DtVector& position );
63  virtual DtVector origin() const;
64  // @}
65 
67  virtual void setOrientation( const DtTaitBryan& orientation );
68 
70  // @{
71  virtual void setScale( float scale );
72  virtual float scale() const;
73  // @}
74 
76  // @{
77  virtual void setVisible( bool isVisible );
78  virtual bool isVisible() const;
79  // @}
80 
82  // @{
83  virtual void setStipplePattern( unsigned int stipplePattern );
84  virtual unsigned int stipplePattern() const;
85  // @}
86 
88  // @{
89  virtual void setLineWidth( float );
90  virtual float lineWidth() const;
91  // @}
92 
94  virtual void setColor( float r, float g, float b, float a );
95  virtual bool getColor( float& r, float& g, float& b, float& a ) const;
96 
98  // @{
99  virtual void setEventsEnabled( bool enabled );
100  virtual bool eventsEnabled() const;
101  // @}
102 
107  // @{
108  virtual void setGroup( int groupNum );
109  virtual int group() const;
110  // @}
111 
113  // @{
114  virtual void setFontFile( std::string fontFile );
115  virtual std::string fontFile() const;
116  // @}
117 
119  // @{
120  virtual void setFontPointSize( float pointSize );
121  virtual float fontPointSize() const;
122  // @}
123 
125  // @{
126  virtual void setFontColor( float r, float g, float b, float a );
127  virtual bool getFontColor( float& r, float& g, float& b, float& a ) const;
128  // @}
129 
131 
132  // @name Inherited DtModel methods
133  // @{
134 
136  virtual void setPosition( int vtx, const DtVector& position ) override;
137 
140  virtual void setOrientation( int vtx, const DtTaitBryan& orientation ) override;
141 
143  virtual void setModelDefinition( const std::string& str ) override;
144 
145  // @}
146 
147  protected:
148 
149  // @name Inherited DtModel methods
150  // @{
151 
153  virtual void addToScene( const DtUniqueID& sceneObjectId,
154  DtModelSetId modelSet, int visualizerType ) override;
155 
157  virtual void removeFromScene() override;
158 
162  virtual void setIsSupportModel( bool isSupport ) override;
163 
164  // @}
165 
167  virtual void needsUpdate();
168 
170  virtual void update();
171 
173  virtual void createGeometryIfNecessary() = 0;
174 
176  virtual void clearGeometry() = 0;
177 
178 
179 
181  virtual void updateVertices() = 0;
182 
184  virtual void updateColors() = 0;
185  virtual void updateStipplePattern() = 0;
186  virtual void updateLineWidth() = 0;
187  virtual void updateEventsEnabled() = 0;
188 
190  virtual void updateGroup() = 0;
191 
194  virtual void updateLabels() = 0;
195 
197  virtual void slot_coordinateSystemChanged();
198 
199  protected:
200  std::vector<DtVector> myControlPoints;
201  std::vector<bool> myControlPointsSet;
202 
204 
205  boost::signalslib::connection mySignalPostUpdateConnection;
206 
208 
210  float myScale;
211 
212  float myLineWidth;
214  unsigned long long myUserData;
215 
216  bool myVisible;
217  unsigned int myLineStipplePattern;
218  int myGroup;
219 
221 
224 
225  // An overall position
226  DtVector myOrigin;
227 
228  // local clone of the system wide coordinate system.
229  // for thread safety.
232 
233  std::string myFontFile;
237 
239 
241  };
242 }
int myGeometryInterfaceCount
Definition: DtOverlayModel.h:222
boost::signalslib::connection mySignalPostUpdateConnection
Definition: DtOverlayModel.h:205
float myFontPointSize
Definition: DtOverlayModel.h:234
DtVector4< float > myFontColor
Definition: DtOverlayModel.h:235
2 dimensional vector
voidpf uLong int origin
Definition: ioapi.h:42
DtCoordinateSystem * myCoordinateSystem
Definition: DtOverlayModel.h:231
bool myEventsEnabled
Definition: DtOverlayModel.h:213
DtAltitudeBasedConfigurationCollection myAltitudeBasedConfigurationCollection
Definition: DtOverlayModel.h:238
DtVector myOrigin
Definition: DtOverlayModel.h:226
4 dimensional vector
std::string myFontFile
Definition: DtOverlayModel.h:233
unsigned long long myUserData
Definition: DtOverlayModel.h:214
float myLineWidth
Definition: DtOverlayModel.h:212
3 dimensional vector
Contains makVrv::DtAltitudeBasedConfiguration class.
std::vector< bool > myControlPointsSet
Definition: DtOverlayModel.h:201
DtFontInterface * myFontInterface
Definition: DtOverlayModel.h:236
Base Overlay Model.
Definition: DtOverlayModel.h:33
int myGroup
Definition: DtOverlayModel.h:218
int myLabelCount
Definition: DtOverlayModel.h:223
unsigned int myLineStipplePattern
Definition: DtOverlayModel.h:217
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:210
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
bool myVisible
Definition: DtOverlayModel.h:216
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
int myOverlayId
Definition: DtOverlayModel.h:220
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:230
std::vector< DtVector > myControlPoints
Definition: DtOverlayModel.h:200
Base class to provide boost signal/slot management.
bool myNeedsUpdate
Definition: DtOverlayModel.h:203
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:56
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
DtVector4< double > myColor
Definition: DtOverlayModel.h:209
DtModelSetId
Definition: DtModelSetEnums.h:19
DtTaitBryan myOrientationTaitBryan
Definition: DtOverlayModel.h:207
DtOverlayGeometryManager & myOverlayGeometryManager
Definition: DtOverlayModel.h:240
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 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)