VR-Forces 4.10 Class Documentation
 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) 2015 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 namespace makVrv
15 {
16 
17  class Dt3DSegmentedLineModelAgent;
18  class DtWidgetLabelAgent;
19  class DtSceneObjectAgent;
20  class DtAttachableHatUpdaterAgent;
21  class DtProjectedWidgetModelAgent;
22  class DtAttachableHatTextUpdaterAgent;
23 
28  {
29  public:
30 
33  DtStateListener& listener, int modelSet );
34 
36  virtual ~DtHATLineVisualizer();
37 
39  virtual void setHatLineVisible( bool );
40  virtual void setVisualDefinitionEnabled( bool );
41 
44  virtual void setUniqueID( DtUniqueID );
45 
47  // Set / Get the text color. Can use 0.0-1.0 or 0-255
48  virtual void setTextColor(float r, float g, float b, float a);
49  virtual void getTextColor(float& r, float& g, float& b, float& a) const;
51 
53  // Set / Get the size of the box the text is positioned in, in pixels.
54  virtual void setTextBoxSize( unsigned int textWidth, unsigned int textHeight );
55  virtual void getTextBoxSize( unsigned int& textWidth, unsigned int& textHeight ) const;
57 
59  // Set / Get a pixel offset from the top of the line for the text box.
60  virtual void setOriginOffset( int offsetX, int offsetY );
61  virtual void getOriginOffset( int& offsetX, int& offsetY ) const;
63 
64 
66  // Set / Get the horizontal alignment of the text within the text box.
67  // Values come from DtWidgetLabel
68  virtual void setHorizontalAlignment (unsigned int horizontalAlignment );
69  virtual unsigned int horizontalAlignment() const;
71 
73  // Set / Get the name of the font to use for the height text.
74  virtual void setTextFont( const std::string& textFont) ;
75  virtual std::string textFont() const;
77 
79  // Set / Get the point size of the font used for height text
80  virtual void setTextFontSize( unsigned int textFontSize );
81  virtual unsigned int textFontSize() const;
82 
84  virtual void setHatLinePeriod( unsigned int frames );
86  virtual unsigned int hatLinePeriod() const;
88 
90  virtual void setUseHighestTerrainLod( bool trueOrFalse );
93  virtual bool useHighestTerrainLod() const;
95 
96  protected:
97 
99  virtual void createModelAgents();
100 
102  virtual void destroyModelAgents();
103 
106  virtual void setModelDefinitionForAgents();
107 
110  virtual void setVisualizerDefinition(const DtVisualizerDefinition& visDef);
111 
112  protected:
113 
114  Dt3DSegmentedLineModelAgent* myHatLineAgent;
115  DtSceneObjectAgent* myHatLineObjectAgent;
116  DtAttachableHatUpdaterAgent* myHatLineUpdaterAgent;
117 
118  DtSceneObjectAgent* myHatTextObjectAgent;
119  DtProjectedWidgetModelAgent* myHatTextModelAgent;
120  DtWidgetLabelAgent* myHatTextWidgetAgent;
121  DtAttachableHatTextUpdaterAgent* myHatTextUpdaterAgent;
122 
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  unsigned int myHatLinePeriod;
134 
135  };
136 
137 }
bool myVisualDefinitionEnabled
Definition: DtHATLineVisualizer.h:124
bool myUseHighestTerrainLod
Definition: DtHATLineVisualizer.h:125
DtAttachableHatTextUpdaterAgent * myHatTextUpdaterAgent
Definition: DtHATLineVisualizer.h:121
std::string myTextFont
Definition: DtHATLineVisualizer.h:129
unsigned int myTextFontSize
Definition: DtHATLineVisualizer.h:130
Base class for height above terrain line visualizers to show height above terrain line and label...
Definition: DtHATLineVisualizer.h:27
The DtBaseConnection is an abstract class.
Definition: DtBaseConnection.h:34
DtSceneObjectAgent * myHatLineObjectAgent
Definition: DtHATLineVisualizer.h:115
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Contains makVrv:DtStateVisualizer class.
DtProjectedWidgetModelAgent * myHatTextModelAgent
Definition: DtHATLineVisualizer.h:119
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
The DtStateVisualizer is an abstract class.
Definition: DtStateVisualizer.h:32
double myTextPosition
Definition: DtHATLineVisualizer.h:126
A definition of a visualizer.
Definition: DtVisualizerDefinition.h:22
unsigned int myHatLinePeriod
Definition: DtHATLineVisualizer.h:133
The DtStateListener is an abstract class.
Definition: DtStateListener.h:21
Dt3DSegmentedLineModelAgent * myHatLineAgent
Definition: DtHATLineVisualizer.h:114
DtAttachableHatUpdaterAgent * myHatLineUpdaterAgent
Definition: DtHATLineVisualizer.h:116
bool myHatLineEnabled
Definition: DtHATLineVisualizer.h:123
unsigned int myTextHorizontalAlignment
Definition: DtHATLineVisualizer.h:128
DtSceneObjectAgent * myHatTextObjectAgent
Definition: DtHATLineVisualizer.h:118
DtWidgetLabelAgent * myHatTextWidgetAgent
Definition: DtHATLineVisualizer.h:120

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)