VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtHATLineVisualizer.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 
14 #include <vrvCore/DtWidgetLabel.h>
15 
17 
18 namespace makVrv
19 {
20 
21  class Dt3DSegmentedLineModelAgent;
22  class DtWidgetLabelAgent;
23  class DtSceneObjectAgent;
24  class DtAttachableHatUpdaterAgent;
25  class DtProjectedWidgetModelAgent;
26  class DtAttachableHatTextUpdaterAgent;
27  class DtObjectTypeStateListener;
28 
33  {
34  public:
36  DtHATLineVisualizer( DtBaseConnection& simulation, DtStateListener& listener,
37  DtSceneObjectAgent* sceneObject, DtModelSetId modelSet );
38 
40  virtual ~DtHATLineVisualizer();
41 
43  DtHATLineVisualizer() = delete;
44 
47 
49  DtHATLineVisualizer& operator=(const DtHATLineVisualizer&) = delete;
50 
51  public:
52 
54  virtual void initialize() override;
55 
56  virtual void setVisualDefinitionEnabled( bool );
57 
59  // Set / Get the text color. Can use 0.0-1.0 or 0-255
60  virtual void setTextColor(float r, float g, float b, float a);
61  virtual void getTextColor(float& r, float& g, float& b, float& a) const;
63 
65  // Set / Get the size of the box the text is positioned in, in pixels.
66  virtual void setTextBoxSize( unsigned int textWidth, unsigned int textHeight );
67  virtual void getTextBoxSize( unsigned int& textWidth, unsigned int& textHeight ) const;
69 
71  // Set / Get a pixel offset from the top of the line for the text box.
72  virtual void setOriginOffset( int offsetX, int offsetY );
73  virtual void getOriginOffset( int& offsetX, int& offsetY ) const;
75 
76 
78  // Set / Get the horizontal alignment of the text within the text box.
79  // Values come from DtWidgetLabel
80  virtual void setHorizontalAlignment (DtWidgetLabel::TextHorizontalAlignmentPolicy horizontalAlignment );
81  virtual DtWidgetLabel::TextHorizontalAlignmentPolicy horizontalAlignment() const;
83 
85  // Set / Get the name of the font to use for the height text.
86  virtual void setTextFont( const std::string& textFont) ;
87  virtual std::string textFont() const;
89 
91  // Set / Get the point size of the font used for height text
92  virtual void setTextFontSize( unsigned int textFontSize );
93  virtual unsigned int textFontSize() const;
95 
97  // Set / Get the scale to apply to the font point size for height text.
98  // This is only used if setIsAltitudeBasedScalingEnabled(false).
99  virtual void setTextFontScale( float textFontScale );
100  virtual float textFontScale() const;
102 
104  virtual void setHatLinePeriod( unsigned int frames );
106  virtual unsigned int hatLinePeriod() const;
108 
110  virtual void setUseHighestTerrainLod( bool trueOrFalse );
113  virtual bool useHighestTerrainLod() const;
115 
117  virtual void setLodOutAltitude(double lodOutAltitude);
124  virtual double lodOutAltitude() const;
126 
131  virtual void setIsPinned(bool myPinned);
132 
140  virtual void setIsAltitudeBasedScalingEnabled(bool isAltitudeBasedScalingEnabled);
141 
145  // This is only used if setIsAltitudeBasedScalingEnabled(true).
146  virtual void setAltitudeBasedConfigurations(
148 
150  virtual void setHasMouseCursor(bool);
152  virtual bool hasMouseCursor() const;
154 
157  virtual void slot_setSelected(bool b) override;
158  protected:
159 
160  virtual DtObjectTypeStateListener& objectTypeStateListener();
161 
163  virtual void createModelAgents() override;
164 
166  virtual void destroyModelAgents() override;
167 
170  virtual void updateAltitudeBasedScalingProperties();
171 
174  virtual void updateForcedAltitudeBasedConfigurationEnabledState();
175 
177  virtual void updateLodOutAltitudeProperties();
178 
180  virtual void updateIsLodOutAltitudeEnabledState();
181 
185  virtual void updateOffsets();
186 
188  virtual void slot_milSymbolStandardChanged(DtSymbologyStandard standard);
189 
192  virtual void setModelDefinitionForAgents() override;
193 
196  virtual void connectToListenerSignals() override;
197 
200  virtual void setInitialValuesFromVisualizerDefinition() override;
201 
203  virtual void slot_displayUnitCollectionChanged();
204  protected:
206  Dt3DSegmentedLineModelAgent* myHatLineAgent;
207  DtSceneObjectAgent* myHatLineObjectAgent;
208  DtAttachableHatUpdaterAgent* myHatLineUpdaterAgent;
209 
210  DtSceneObjectAgent* myHatTextObjectAgent;
211  DtProjectedWidgetModelAgent* myHatTextModelAgent;
212  DtWidgetLabelAgent* myHatTextWidgetAgent;
213  DtAttachableHatTextUpdaterAgent* myHatTextUpdaterAgent;
214 
216 
219 
222 
227 
232 
235 
237 
239 
240  // bool myHatLineEnabled;
243  double myTextPosition; // proportion, 0. to 1., 0. at top
244  unsigned int myTextBoxSize[2]; // default is 150 x 25 pixels
246  std::string myTextFont; // default is "FreeMono.otf"
248  unsigned int myTextFontSize; // default is 14
249  float myTextColor[4]; // default is 1., 1., 0., 1.
250  int myOriginOffset[2]; // default is 0, -30
251  unsigned int myHatLinePeriod;
252 
253  };
254 
255 }
bool myVisualDefinitionEnabled
Definition: DtHATLineVisualizer.h:241
Contains the DtAltitudeBasedScaleConfigurationRecord class declaration.
bool myUseHighestTerrainLod
Definition: DtHATLineVisualizer.h:242
DtAttachableHatTextUpdaterAgent * myHatTextUpdaterAgent
Definition: DtHATLineVisualizer.h:213
DtObjectTypeStateListener * myObjectTypeStateListener
Definition: DtHATLineVisualizer.h:205
bool myHasMouseCursor
Definition: DtHATLineVisualizer.h:215
std::string myTextFont
Definition: DtHATLineVisualizer.h:246
unsigned int myTextFontSize
Definition: DtHATLineVisualizer.h:248
Base class for height above terrain line visualizers to show height above terrain line and label...
Definition: DtHATLineVisualizer.h:32
DtWidgetLabel::TextHorizontalAlignmentPolicy myTextHorizontalAlignment
Definition: DtHATLineVisualizer.h:245
The DtBaseConnection is an abstract class.
Definition: DtBaseConnection.h:35
float myTextFontScale
Definition: DtHATLineVisualizer.h:236
Contains various enum classes relating to symbology.
DtSceneObjectAgent * myHatLineObjectAgent
Definition: DtHATLineVisualizer.h:207
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
bool myIsAltitudeBasedScalingEnabled
Whether or not to use altitude-based scaling is used.
Definition: DtHATLineVisualizer.h:234
makArchives::DtAltitudeBasedScaleConfigurationRecordCollection myTextFontScalesByMinimumAltitude
Definition: DtHATLineVisualizer.h:238
Contains makVrv:DtStateVisualizer class.
Contains the makVrv::DtWidgetLabel class declaration.
double myLodOutAltitude
The altitude at which all HAT information will no longer appear The default value is 100000 meters...
Definition: DtHATLineVisualizer.h:226
DtProjectedWidgetModelAgent * myHatTextModelAgent
Definition: DtHATLineVisualizer.h:211
bool myLODOutAltitudeEnabled
Whether or not this visualizer will lod out based on altitude.
Definition: DtHATLineVisualizer.h:221
TextHorizontalAlignmentPolicy
Policy that determines how label is aligned within its bounds - only used when the Size Constraint Po...
Definition: DtWidgetLabel.h:31
std::string myDisplayUnitCollectionName
Definition: DtHATLineVisualizer.h:247
DtSymbologyStandard
Military symbology standard.
Definition: DtSymbologyEnums.h:18
The DtStateVisualizer is an abstract class. Developers derive from this to create logic that &quot;directs...
Definition: DtStateVisualizer.h:30
double myTextPosition
Definition: DtHATLineVisualizer.h:243
bool myPinnedFlag
whether or not the widget this visualizer controls is pinned
Definition: DtHATLineVisualizer.h:218
The DtObjectTypeStateListener is a base class used by elements that have object types ( including ent...
Definition: DtObjectTypeStateListener.h:31
bool myLodOutAltitudeOverridden
Whether or not the lod out altitude is overridden. If overridden, the lod out altitude from the visua...
Definition: DtHATLineVisualizer.h:231
unsigned int myHatLinePeriod
Definition: DtHATLineVisualizer.h:251
DtModelSetId
Definition: DtModelSetEnums.h:19
std::vector< DtAltitudeBasedScaleConfigurationRecord > DtAltitudeBasedScaleConfigurationRecordCollection
Definition: DtAltitudeBasedScaleConfigurationRecord.h:45
The DtStateListener is an abstract class. Subclasses implement functionality that will allow data to ...
Definition: DtStateListener.h:26
Dt3DSegmentedLineModelAgent * myHatLineAgent
Definition: DtHATLineVisualizer.h:206
DtAttachableHatUpdaterAgent * myHatLineUpdaterAgent
Definition: DtHATLineVisualizer.h:208
DtSceneObjectAgent * myHatTextObjectAgent
Definition: DtHATLineVisualizer.h:210
DtWidgetLabelAgent * myHatTextWidgetAgent
Definition: DtHATLineVisualizer.h:212

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)