VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMilStdIconVisualizer.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 
13 #include <vrvUtil/DtUnicode.h>
14 
15 namespace makVrv
16 {
17 
18  class DtProjectedWidgetModelAgent;
19  class DtWidgetAgent;
20  class DtWidgetLabelAgent;
21  class DtWidgetInstanceSignaler;
22 
28  {
29  public:
30 
32  {
35  };
36 
37  public:
38 
41  DtStateListener& listener, int modelSet );
42 
44  virtual ~DtMilStdIconVisualizer();
45 
47  virtual void setVisualizerDefinition( const DtVisualizerDefinition& visDef );
48 
50  virtual void setModelDefinitionForAgents();
51 
53  virtual void setSelected( bool selected );
54 
56  void setDrawMethod( DrawMethod dt );
57  DrawMethod drawMethod() const;
58 
60  void setOutlineEnabled( bool enabled );
62  bool outlineEnabled() const;
63 
65  void setFillEnabled( bool enabled );
67  bool fillEnabled() const;
68 
70  void setDamageEnabled( bool enabled );
72  bool damageEnabled() const;
73 
75  void setIconEnabled( bool enabled );
77  bool iconEnabled() const;
78 
79  void setIconScale( float scale );
80 
82  void setColorByAffiliationEnabled( bool enabled );
84  bool colorByAffiliationEnabled() const;
85 
88  virtual void setForceId( int );
89 
90  int forceId() const
91  {
92  return myForceId;
93  }
94 
97  virtual void setDamaged( bool );
98  bool damaged() const
99  {
100  return myDamaged;
101  }
102 
104  virtual void setForceColor( float r, float g, float b, float a );
105  void getForceColor( double& r, double& g, double& b, double& a );
106 
111 
112  virtual unsigned short outlineCharacterForUnitSymbolFont(
113  unsigned short outlineBase, int force ) const;
114 
115  virtual unsigned short fillCharacterForUnitSymbolFont(
116  unsigned short outlineBase, int force ) const;
117 
119  virtual DtUnicode generateSymbolString( float fillColor[4],
120  float outlineColor[4], unsigned int fillGlyph,
121  unsigned int outlineGlyph, bool damaged ) const;
122 
124  unsigned short outlineGlyph() const;
125  unsigned short fillGlyph() const;
126  unsigned short damageGlyph() const;
127 
128  virtual void setPickable( bool b );
129 
131  virtual void rotateSymbolToHeading(double);
132 
133  protected:
134 
135  virtual bool fillCharacterByOutline( unsigned short outline,
136  unsigned short lower, unsigned short upper, unsigned short start,
137  bool equipment, unsigned short& fill ) const;
138 
139  virtual unsigned short forceOffset( int force ) const;
140 
141  virtual void setHasMouse( bool hasMouse );
142 
145  virtual void stateChanged();
146 
150  virtual void displayChanged();
151 
152  virtual void createModelAgents();
153  virtual void destroyModelAgents();
154 
155  virtual void update();
156  virtual void updateSymbol();
157  virtual void updateSelectedIcon();
158 
159  protected:
160 
163 
167 
171 
175 
178 
181 
182  DtProjectedWidgetModelAgent* myProjectIconPosition;
183  DtWidgetAgent* myIcon;
184  DtWidgetLabelAgent* myLabel;
186  DtWidgetAgent* mySelectedIcon;
189  float myScale;
190 
192  bool myDamaged;
194  unsigned int myGlyphCenterPolicy;
195  float myForceColor[4];
196 
197  };
198 
199 }

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)