VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 
43  virtual void setUniqueID( DtUniqueID );
44 
46  // Set / Get the text color. Can use 0.0-1.0 or 0-255
47  virtual void setTextColor(float r, float g, float b, float a);
48  virtual void getTextColor(float& r, float& g, float& b, float& a) const;
50 
52  // Set / Get the size of the box the text is positioned in, in pixels.
53  virtual void setTextBoxSize( unsigned int textWidth, unsigned int textHeight );
54  virtual void getTextBoxSize( unsigned int& textWidth, unsigned int& textHeight ) const;
56 
58  // Set / Get a pixel offset from the top of the line for the text box.
59  virtual void setOriginOffset( int offsetX, int offsetY );
60  virtual void getOriginOffset( int& offsetX, int& offsetY ) const;
62 
63 
65  // Set / Get the horizontal alignment of the text within the text box.
66  // Values come from DtWidgetLabel
67  virtual void setHorizontalAlignment (unsigned int horizontalAlignment );
68  virtual unsigned int horizontalAlignment() const;
70 
72  // Set / Get the name of the font to use for the height text.
73  virtual void setTextFont( std::string textFont) ;
74  virtual std::string textFont() const;
76 
78  // Set / Get the point size of the font used for height text
79  virtual void setTextFontSize( unsigned int textFontSize );
80  virtual unsigned int textFontSize() const;
81 
83 
84  virtual void setHatLinePeriod( unsigned int frames );
85  virtual unsigned int hatLinePeriod() const;
87 
88  protected:
89 
91  virtual void createModelAgents();
92 
94  virtual void destroyModelAgents();
95 
98  virtual void setModelDefinitionForAgents();
99 
102  virtual void setVisualizerDefinition(const DtVisualizerDefinition& visDef);
103 
104  protected:
105 
106  Dt3DSegmentedLineModelAgent* myHatLineAgent;
107  DtSceneObjectAgent* myHatLineObjectAgent;
108  DtAttachableHatUpdaterAgent* myHatLineUpdaterAgent;
109 
110  DtSceneObjectAgent* myHatTextObjectAgent;
111  DtProjectedWidgetModelAgent* myHatTextModelAgent;
112  DtWidgetLabelAgent* myHatTextWidgetAgent;
113  DtAttachableHatTextUpdaterAgent* myHatTextUpdaterAgent;
114 
117  double myTextPosition; // proportion, 0. to 1., 0. at top
118  unsigned int myTextBoxSize[2]; // default is 150 x 25 pixels
119  unsigned int myTextHorizontalAlignment; // default is center
120  std::string myTextFont; // default is "FreeMono.otf"
121  unsigned int myTextFontSize; // default is 14
122  float myTextColor[4]; // default is 1., 1., 0., 1.
123  int myOriginOffset[2]; // default is 0, -30
124  unsigned int myHatLinePeriod;
125 
126  };
127 
128 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)