VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgOverlaySegmentedLineModel.h
Go to the documentation of this file.
1 // /******************************************************************************
2 // ** Copyright (c) 2022 MAK Technologies, Inc.
3 // ** All rights reserved.
4 // ******************************************************************************/
5 
9 
10 #pragma once
11 
16 
17 #include <vrvUtil/signalslib.h>
18 
19 namespace makVrv
20 {
21  class DtChannelManager;
22  class DtChannel;
23  class DtChannelConfiguration;
24  class DtModelDefinition;
25  class DtCoordinateSystem;
26  class DtDe;
27 
32  {
33  public:
36 
39 
41  virtual void setPosition( int vtx, const DtVector& position );
42 
44  virtual void removePosition( int vtx );
45 
47  virtual void setOrientation( int vtx, const DtTaitBryan& orientation );
48 
51  // @{
52  virtual void setNorthUnit(DtSharedDisplayUnitsSettings::NorthUnits unit);
53  virtual DtSharedDisplayUnitsSettings::NorthUnits northUnit() const;
54  // @}
55 
57  // @{
58  virtual void setPosition(const DtVector& position);
59  virtual DtVector position() const;
60  // @}
61 
63  virtual void setColor( float r, float g, float b, float a );
64 
66  virtual void setWidth( float width );
67 
69  virtual void setStipplePattern( unsigned int pattern, int repeatFactor );
70 
73  virtual void setStyleSegments(const std::vector<double>& segmentPercentages);
74 
76  virtual void setSegmentColor(unsigned int segmentIndex,
77  float r, float g, float b, float a);
78 
80  virtual void setSegmentLightningStyle(unsigned int segmentIndex,
81  bool enableLightningStyle);
82 
84  virtual void setSegmentStartArrow(unsigned int segmentIndex,
85  bool enableArrow);
86 
88  virtual const std::vector<DtVector>& points() const;
89 
92  virtual void setGroup( int );
93 
95  virtual void setSegmentEndArrow(unsigned int segmentIndex,
96  bool enableArrow);
97 
100  virtual void setSegmentStipplePattern(unsigned int segmentIndex,
101  unsigned int stipplePattern, int repeatFactor);
102 
104  virtual void setSegmentWidth(unsigned int segmentIndex,
105  double width);
106 
108  virtual void setArrowSize(double);
109 
111  virtual void setLineStyle(int);
112 
114  virtual void setArrowStyle(int);
115 
118  virtual void setSegmentStartColor( unsigned int segmentIndex, float r,
119  float g, float b, float a );
120 
123  virtual void setSegmentEndColor( unsigned int segmentIndex, float r,
124  float g, float b, float a );
125 
127  virtual void setEventsEnabled( bool );
128 
130  virtual void setEventWidth(float width);
131 
132  // @name Inherited DtModel methods
133  // @{
134 
136  virtual void addToScene( const DtUniqueID& sceneObjectId, DtModelSetId modelSet, int visualizerType );
137 
139  virtual void removeFromScene();
140 
142  virtual void setModelDefinition( const std::string& str );
143 
145  virtual void setVisible( bool isVisible );
146 
148  virtual void setIsSupportModel(bool isSupport);
149 
150  // @}
151 
153  virtual void update();
154 
156  virtual void needsUpdate();
157 
160  virtual void setFixedWidthSizing(bool);
161 
165  // @{
166  virtual void setIsMeasurementTextRenderingEnabled(bool isMeasurementTextRenderingEnabled);
167  virtual bool isMeasurementTextRenderingEnabled() const;
168  // @}
169 
170  // @{
172 
174  virtual void setIsScreenIntervaledTextRenderingEnabled(bool);
175 
177  virtual void setScreenIntervaledTextPrefix(const std::string& prefixString);
178 
180  virtual void setScreenIntervaledTextPostfix(const std::string& postfixString);
181 
185  virtual void setScreenIntervaledTextCollection(const DtOverlayScreenIntervaledTextInstance::DtScreenIntervaledTextCollection&);
186 
192  virtual void setScreenIntervaledTextInterval(int intervalInScreenSpaceCM);
193 
195  virtual void setScreenIntervaledTextFont(const std::string& fontFile, float fontPointSize);
196 
198  virtual void setScreenIntervaledTextColor(float r, float g, float b, float a);
199 
201  virtual void setScreenIntervaledTextBackgroundColor(float r, float g, float b, float a);
202  // @}
203 
204  protected:
208  virtual void moveInstancesFromChannelSpecific();
209 
213  virtual void moveInstancesToChannelSpecific();
214 
217  virtual void slot_channelCreated( DtChannel* channel);
218 
220  virtual void slot_channelDestroyed( DtChannelManager* channelManager, DtChannel* channel);
221 
224  virtual void slot_channelConfigurationModified(const std::string& deName,
225  const std::string& winName, const std::string& oldChannelName,
226  const DtChannelConfiguration& config);
227 
229  virtual void slot_displayUnitUnitChanged(const DtUnicode& displayUnitCollectionName,
230  const DtUnicode& displayUnitName, unsigned int newUnit, unsigned int oldUnit);
231 
233  virtual void slot_displayUnitDecimalsChanged(const DtUnicode& displayUnitCollectionName,
234  const DtUnicode& displayUnitName, unsigned int newDecimals, unsigned int oldDecimals);
235 
236  virtual void slot_suppressMagneticNorthNotationEnabledChanged(bool isEnabled);
237 
239  virtual void setupInstanceWithCurrentValues(DtOverlaySegmentedLineModelInstance*, DtOverlayScreenIntervaledTextInstance*);
240 
241  virtual void initializeSettings();
242 
243  protected:
245  {
246  DtOverlaySegmentedLineModelInstance* channelLineModelInstance = nullptr;
247  DtOverlayScreenIntervaledTextInstance* screenTextInstance = nullptr;
248  };
249 
254 
258 
265 
268 
271 
272  float myScreenIntervaledTextFontColor[4];
273  float myScreenIntervaledTextBackgroundColor[4];
275 
276  typedef std::map<DtChannel*, ChannelInstance> ChannelInstances;
278 
282 
286  std::vector<DtVector> myPoints;
287  double myArrowSize;
291  std::string myModelDefinition;
292  float myColor[4];
293  unsigned int myStipplePattern;
295  float myWidth;
297  int myGroup;
300 
301  vrvSignalsLib::connection myModelInstanceChangedConnection;
302  vrvSignalsLib::connection myChannelCreatedConnection;
303  vrvSignalsLib::connection myChannelToBeDestroyedConnection;
304  vrvSignalsLib::connection myChannelConfigurationModifiedConnection;
305  vrvSignalsLib::connection myPostUpdateConnection;
306  };
307 }
308 
std::map< DtChannel *, ChannelInstance > ChannelInstances
Definition: DtOsgOverlaySegmentedLineModel.h:276
bool myFixedWidthSizing
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:296
bool myEventsEnabled
Definition: DtOsgOverlaySegmentedLineModel.h:251
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
The model interface for remote graphics segmented lines.
Definition: DtOverlaySegmentedLineModel.h:19
vrvSignalsLib::connection myPostUpdateConnection
Definition: DtOsgOverlaySegmentedLineModel.h:305
float myWidth
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:295
DtUniqueID mySceneObjectId
Definition: DtOsgOverlaySegmentedLineModel.h:250
std::string myModelDefinition
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:291
std::string myScreenIntervaledTextPostfixString
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOsgOverlaySegmentedLineModel.h:267
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Model instance to draw a 3D line with styleable segments onto the 2D overlay.
Definition: DtOverlaySegmentedLineModelInstance.h:37
Contains makVrv::DtOverlayScreenIntervaledTextInstance class declaration.
DtSharedDisplayUnitsSettings::NorthUnits myNorthToUse
Definition: DtOsgOverlaySegmentedLineModel.h:280
int myScreenIntervaledTextIntervalInScreenSpaceCM
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOsgOverlaySegmentedLineModel.h:264
std::vector< DtVector > myPoints
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:286
NorthUnits
Enumeration of the different north units.
Definition: DtDisplayUnitsSettingsRecord.h:151
int myRepeatFactor
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:294
Contains declaration of DtOverlaySegmentedLineModel.
std::string myScreenIntervaledTextPrefixString
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOsgOverlaySegmentedLineModel.h:266
LineStyle
Default line Styles.
Definition: DtTacticalGraphicUtilities.h:28
bool myChannelSpecificMode
Set to true if displaying model instances on a per channel basis. Default is false.
Definition: DtOsgOverlaySegmentedLineModel.h:257
std::string myScreenIntervaledTextFontFile
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOsgOverlaySegmentedLineModel.h:269
Class to draw a screen spaced perimeter text on polygons, lines, or other geometry.
Definition: DtOverlayScreenIntervaledTextInstance.h:32
Definition: DtOsgOverlaySegmentedLineModel.h:244
The abstract Channel Class.
Definition: DtChannel.h:35
float myScreenIntervaledTextFontPointSize
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOsgOverlaySegmentedLineModel.h:270
Contains makVrv::DtOverlaySegmentedLineModelInstance class.
vrvSignalsLib::connection myChannelToBeDestroyedConnection
Definition: DtOsgOverlaySegmentedLineModel.h:303
DtSignalConnectionManager myDisplayUnitConnections
Definition: DtOsgOverlaySegmentedLineModel.h:279
unsigned int myStipplePattern
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:293
double myArrowSize
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:287
ArrowStyle
Definition: DtTacticalGraphicUtilities.h:46
DtVector myPosition
Definition: DtOsgOverlaySegmentedLineModel.h:281
float myEventWidth
Definition: DtOsgOverlaySegmentedLineModel.h:252
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
vrvSignalsLib::connection myChannelCreatedConnection
Definition: DtOsgOverlaySegmentedLineModel.h:302
DtOsgOverlayLineModel extends the DtLineModel interface to include operations only appropriate for 2D...
Definition: DtOsgOverlaySegmentedLineModel.h:31
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
vrvSignalsLib::connection myModelInstanceChangedConnection
Definition: DtOsgOverlaySegmentedLineModel.h:301
ChannelInstances myChannelInstances
Definition: DtOsgOverlaySegmentedLineModel.h:277
std::vector< DtUnicode > DtScreenIntervaledTextCollection
Definition: DtOverlayScreenIntervaledTextInstance.h:35
vrvTacticalGraphicUtilities::LineStyle myLineStyle
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:289
Base class for handling DtChannels. Derived classes should override the tick() method and advance the...
Definition: DtChannelManager.h:32
bool myIsScreenIntervaledTextRenderingEnabled
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOsgOverlaySegmentedLineModel.h:262
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition: DtChannelConfiguration.h:24
std::vector< SegmentAttributes > SegmentAttributesVector
Vector of segment information.
Definition: DtOverlaySegmentedLineModelInstance.h:58
vrvTacticalGraphicUtilities::ArrowStyle myArrowStyle
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:288
DtOverlayScreenIntervaledTextInstance::DtScreenIntervaledTextCollection myScreenIntervaledTextCollection
These are channel specific variables for perimeter text rendering They are not part of the model set ...
Definition: DtOsgOverlaySegmentedLineModel.h:263
bool myIsMeasurementTextRenderingEnabled
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:298
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
bool myNeedsUpdate
Definition: DtOsgOverlaySegmentedLineModel.h:253
DtModelSetId
Definition: DtModelSetEnums.h:19
DtOverlaySegmentedLineModelInstance::SegmentAttributesVector mySegmentInformation
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:290
vrvSignalsLib::connection myChannelConfigurationModifiedConnection
Definition: DtOsgOverlaySegmentedLineModel.h:304
int myGroup
Variables that are saved in order to switch between channel instance and model set instance...
Definition: DtOsgOverlaySegmentedLineModel.h:297

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)