VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rangeRingVisualizer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2013 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
10 
11 #pragma once
12 
13 #include <vrfGuiCore/vrfGuiCore.h>
15 #include <vrvUtil/DtUnicode.h>
16 #include <vrfGuiCore/DtAttachableUpdaterWithLevelOrientationAgent.hpp>
18 #include <matrix/vlVector.h>
20 
21 namespace makVrf
22 {
23  #define DtRangeRingKey(name, index)( DtString(name) + DtString("_") + DtString(index))
24 
25  class DtEntityStateListenerExtensions;
26 
30  {
31  protected:
32  enum ShowFlags
33  {
34  ShowNone = 0,
35  ShowAll = 0x00000001,
36  ShowPhysicalFootprintOnly = 0x00000002
37  };
38 
40  {
42  virtual ~RingStructDrawingData() {};
43  };
44 
45  struct RingStruct
46  {
47  RingStruct() : myExtensionIndex(0), myVisible(true), myRange(0.), myDrawingData(0)
48  {
49  myColor[0] = myColor[1] = myColor[2] = myColor[3] = 0.;
50  };
51 
52  virtual ~RingStruct() {};
53 
54  int myExtensionIndex;
55  bool myVisible;
56  std::vector<double> myWedgeSizes;
57  float myColor[4];
58  double myRange;
61  std::string myKey;
62 
64  };
65 
66  public:
67 
70  makVrv::DtStateListener& listener, int modelSet );
71 
73  virtual ~DtRangeRingVisualizer();
74 
75  //connect method called in the creator class
76  virtual void connect();
77 
78  //connect method called in the destructor
79  virtual void disconnect();
80 
81  //initialize method called in the creator class
82  virtual void initialize_settings();
83 
84  virtual void setModelDefinitionForAgents();
85 
86  //override of parent method - destroys all subordinate visualizers if turned off
87  virtual bool setVisible(bool visible, int context);
88 
89  protected:
90  virtual void createModelAgents();
91 
92  virtual void tryToDraw();
93 
94  virtual void updateRangeRingsCount(ShowFlags flags = ShowAll);
95 
97  virtual void setRangeRingsScale(float);
98 
100  virtual void updateRangeRingInformation(RingStruct&);
101  virtual void updateRangeRingsInformation();
102 
103  virtual void setRangeRingsGeometry();
104  virtual void setRangeRingsColors();
105 
106  virtual void slot_entityRangeRingsEnabled(const std::string& markingText, int setting);
107 
109  virtual void setSelected(bool);
110 
111  protected:
113 
115  virtual void updateScaleOfRings() = 0;
116 
117  //Creates a new set of ring visualizers, populates a struct and adds it to myRangeRings
118  virtual void createRing(const DtRangeItem&, int extensionIndex) = 0;
119 
120  //After a ring is created, update the ring with options specific to this visualizer
121  virtual void updateRingOptions(RingStruct&) = 0;
122 
124  virtual void destroyOuterRing(RingStruct&) = 0;
125 
127  virtual void setRangeRingGeometry(RingStruct&) = 0;
128 
130  virtual void setRangeRingColors(RingStruct&) = 0;
131 
132  protected:
133  typedef std::map<std::string, RingStruct> RangeRings;
135 
137  float myScale;
138 
140 
141  typedef std::map<double, std::set<std::string> > RangeRingRanges;
143 
144  typedef std::map<int, makVrv::DtUnicode> LabelText;
146 
148  };
149 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)