VR-Forces 4.1 Class Documentation
DtMilStdIconVisualizer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2011 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 
130  protected:
131 
132  virtual bool fillCharacterByOutline( unsigned short outline,
133  unsigned short lower, unsigned short upper, unsigned short start,
134  bool equipment, unsigned short& fill ) const;
135 
136  virtual unsigned short forceOffset( int force ) const;
137 
138  virtual void setHasMouse( bool hasMouse );
139 
142  virtual void stateChanged();
143 
147  virtual void displayChanged();
148 
149  virtual void createModelAgents();
150  virtual void destroyModelAgents();
151 
152  virtual void update();
153  virtual void updateSymbol();
154  virtual void updateSelectedIcon();
155 
156  protected:
157 
160 
164 
168 
172 
175 
178 
179  DtProjectedWidgetModelAgent* myProjectIconPosition;
180  DtWidgetAgent* myIcon;
181  DtWidgetLabelAgent* myLabel;
183  DtWidgetAgent* mySelectedIcon;
186  float myScale;
187 
189  bool myDamaged;
191  unsigned int myGlyphCenterPolicy;
192  float myForceColor[4];
193 
194  };
195 
196 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)