VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtEntityHATLineFacade.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2021 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 
14 #include <vrvCore/DtUniqueID.h>
15 
16 #include <string>
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 DtAgentManagerInterface;
28 
33  {
34  public:
35 
38  int modelSet, DtUniqueID entityId );
39 
41  virtual ~DtEntityHATLineFacade();
42 
44  virtual void setHatLineVisible( bool );
45  virtual bool hatLineVisible() const;
46 
48  // Set / Get the text color. Can use 0.0-1.0 or 0-255
49  virtual void setTextColor(float r, float g, float b, float a);
50  virtual void getTextColor(float& r, float& g, float& b, float& a) const;
52 
54  // Set / Get the size of the box the text is positioned in, in pixels.
55  virtual void setTextBoxSize( unsigned int textWidth, unsigned int textHeight );
56  virtual void getTextBoxSize( unsigned int& textWidth, unsigned int& textHeight ) const;
58 
60  // Set / Get a pixel offset from the top of the line for the text box.
61  virtual void setOriginOffset( int offsetX, int offsetY );
62  virtual void getOriginOffset( int& offsetX, int& offsetY ) const;
64 
65 
67  // Set / Get the horizontal alignment of the text within the text box.
68  // Values come from DtWidgetLabel
69  virtual void setHorizontalAlignment (unsigned int horizontalAlignment );
70  virtual unsigned int horizontalAlignment() const;
72 
74  // Set / Get the name of the font to use for the height text.
75  virtual void setTextFont( const std::string& textFont) ;
76  virtual std::string textFont() const;
78 
80  // Set / Get the point size of the font used for height text
81  virtual void setTextFontSize( unsigned int textFontSize );
82  virtual unsigned int textFontSize() const;
84 
86  virtual void setModelDefinition( const std::string& modelDefinition );
87  virtual const std::string& modelDefinition() const;
89 
91  virtual void setUseHighestTerrainLod( bool useHighest );
92  virtual bool useHighestTerrainLod() const;
94 
96  virtual void setElementID(DtElementID elementID);
97  virtual DtElementID elementID() const;
99 
100  protected:
101 
103  void createModelAgents();
104 
106  virtual void destroyModelAgents();
107 
108  protected:
109 
114 
115  Dt3DSegmentedLineModelAgent* myHatLineAgent;
116  DtSceneObjectAgent* myHatLineObjectAgent;
117  DtAttachableHatUpdaterAgent* myHatLineUpdaterAgent;
118 
119  DtSceneObjectAgent* myHatTextObjectAgent;
120  DtProjectedWidgetModelAgent* myHatTextModelAgent;
121  DtWidgetLabelAgent* myHatTextWidgetAgent;
122  DtAttachableHatTextUpdaterAgent* myHatTextUpdaterAgent;
123 
124  bool myHatLineVisible; // default is true
125  bool myUseHighestTerrainLod; // default is true; applies only to osgEarth terrains
126  double myTextPosition; // proportion, 0. to 1., 0. at top
127  unsigned int myTextBoxSize[2]; // default is 150 x 25 pixels
128  unsigned int myTextHorizontalAlignment; // default is center
129  std::string myTextFont; // default is "FreeMono.otf"
130  unsigned int myTextFontSize; // default is 14
131  float myTextColor[4]; // default is 1., 1., 0., 1.
132  int myOriginOffset[2]; // default is 0, -30
133  std::string myModelDefinition; // default is "HeightAboveTerrainLine"
134 
135  };
136 
137 }
bool myUseHighestTerrainLod
Definition: DtEntityHATLineFacade.h:125
unsigned int myTextHorizontalAlignment
Definition: DtEntityHATLineFacade.h:128
unsigned int myTextFontSize
Definition: DtEntityHATLineFacade.h:130
int myModelSet
Definition: DtEntityHATLineFacade.h:113
DtAttachableHatTextUpdaterAgent * myHatTextUpdaterAgent
Definition: DtEntityHATLineFacade.h:122
Dt3DSegmentedLineModelAgent * myHatLineAgent
Definition: DtEntityHATLineFacade.h:115
Class for height above terrain line to show height above terrain line and label.
Definition: DtEntityHATLineFacade.h:32
DtSceneObjectAgent * myHatLineObjectAgent
Definition: DtEntityHATLineFacade.h:116
double myTextPosition
Definition: DtEntityHATLineFacade.h:126
DtAgentManagerInterface & myAgentManagerIf
Definition: DtEntityHATLineFacade.h:112
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
DtSceneObjectAgent * myHatTextObjectAgent
Definition: DtEntityHATLineFacade.h:119
DtElementID myElementId
Definition: DtEntityHATLineFacade.h:110
bool myHatLineVisible
Definition: DtEntityHATLineFacade.h:124
DtAttachableHatUpdaterAgent * myHatLineUpdaterAgent
Definition: DtEntityHATLineFacade.h:117
std::string myModelDefinition
Definition: DtEntityHATLineFacade.h:133
DtWidgetLabelAgent * myHatTextWidgetAgent
Definition: DtEntityHATLineFacade.h:121
std::string myTextFont
Definition: DtEntityHATLineFacade.h:129
Contains makVrv::DtUniqueID type.
DtUniqueID myEntityId
Definition: DtEntityHATLineFacade.h:111
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:33
DtProjectedWidgetModelAgent * myHatTextModelAgent
Definition: DtEntityHATLineFacade.h:120
Contains DLL export macros.

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)