VR-Forces 4.6 Class Documentation
 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) 2013 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 
95  protected:
96 
98  void createModelAgents();
99 
101  virtual void destroyModelAgents();
102 
103  protected:
104 
108 
109  Dt3DSegmentedLineModelAgent* myHatLineAgent;
110  DtSceneObjectAgent* myHatLineObjectAgent;
111  DtAttachableHatUpdaterAgent* myHatLineUpdaterAgent;
112 
113  DtSceneObjectAgent* myHatTextObjectAgent;
114  DtProjectedWidgetModelAgent* myHatTextModelAgent;
115  DtWidgetLabelAgent* myHatTextWidgetAgent;
116  DtAttachableHatTextUpdaterAgent* myHatTextUpdaterAgent;
117 
118  bool myHatLineVisible; // default is true
119  bool myUseHighestTerrainLod; // default is true; applies only to osgEarth terrains
120  double myTextPosition; // proportion, 0. to 1., 0. at top
121  unsigned int myTextBoxSize[2]; // default is 150 x 25 pixels
122  unsigned int myTextHorizontalAlignment; // default is center
123  std::string myTextFont; // default is "FreeMono.otf"
124  unsigned int myTextFontSize; // default is 14
125  float myTextColor[4]; // default is 1., 1., 0., 1.
126  int myOriginOffset[2]; // default is 0, -30
127  std::string myModelDefinition; // default is "HeightAboveTerrainLine"
128 
129  };
130 
131 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)