VR-Forces 4.5 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 #include <vrfutil/rwUUID.h>
21 
22 namespace makVrf
23 {
24  #define DtRangeRingKey(name, index)( DtString(name) + DtString("_") + DtString(index))
25 
26  class DtEntityStateListenerExtensions;
27 
31  {
32  protected:
33  enum ShowFlags
34  {
35  ShowNone = 0,
36  ShowAll = 0x00000001,
37  ShowPhysicalFootprintOnly = 0x00000002
38  };
39 
41  {
43  virtual ~RingStructDrawingData() {};
44  };
45 
46  struct RingStruct
47  {
48  RingStruct() : myExtensionIndex(0), myVisible(true), myRange(0.), myDrawingData(0)
49  {
50  myColor[0] = myColor[1] = myColor[2] = myColor[3] = 0.;
51  };
52 
53  virtual ~RingStruct() {};
54 
55  int myExtensionIndex;
56  bool myVisible;
57  std::vector<double> myWedgeSizes;
58  float myColor[4];
59  double myRange;
62  std::string myKey;
63 
65  };
66 
67  public:
68 
71  makVrv::DtStateListener& listener, int modelSet );
72 
74  virtual ~DtRangeRingVisualizer();
75 
76  //connect method called in the creator class
77  virtual void connect();
78 
79  //connect method called in the destructor
80  virtual void disconnect();
81 
82  //initialize method called in the creator class
83  virtual void initialize_settings();
84 
85  virtual void setModelDefinitionForAgents();
86 
87  //override of parent method - destroys all subordinate visualizers if turned off
88  virtual bool setVisible(bool visible, int context);
89 
90  protected:
91  virtual void createModelAgents();
92 
93  virtual void tryToDraw();
94 
95  virtual void updateRangeRingsCount(ShowFlags flags = ShowAll);
96 
98  virtual void setRangeRingsScale(float);
99 
101  virtual void updateRangeRingInformation(RingStruct&);
102  virtual void updateRangeRingsInformation();
103 
104  virtual void setRangeRingsGeometry();
105  virtual void setRangeRingsColors();
106 
107  virtual void slot_entityRangeRingsEnabled(const DtUUID&, int setting);
108 
110  virtual void setSelected(bool);
111 
112  protected:
114 
116  virtual void updateScaleOfRings() = 0;
117 
118  //Creates a new set of ring visualizers, populates a struct and adds it to myRangeRings
119  virtual void createRing(const DtRangeItem&, int extensionIndex) = 0;
120 
121  //After a ring is created, update the ring with options specific to this visualizer
122  virtual void updateRingOptions(RingStruct&) = 0;
123 
125  virtual void destroyOuterRing(RingStruct&) = 0;
126 
128  virtual void setRangeRingGeometry(RingStruct&) = 0;
129 
131  virtual void setRangeRingColors(RingStruct&) = 0;
132 
133  protected:
134  typedef std::map<std::string, RingStruct> RangeRings;
136 
138  float myScale;
139 
141 
142  typedef std::map<double, std::set<std::string> > RangeRingRanges;
144 
145  typedef std::map<int, makVrv::DtUnicode> LabelText;
147 
149  };
150 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)