VR-Forces 4.1.1 Class Documentation
DtRangeRingVisualizer.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 
12 #include <vrfGuiCore/vrfGuiCore.h>
14 #include <vrvUtil/DtUnicode.h>
15 #include <vrfGuiCore/DtAttachableUpdaterWithLevelOrientationAgent.hpp>
17 
18 namespace makVrv
19 {
20  class DtOverlayEllipseArcModelAgent;
21  class DtWidgetLabelAgent;
22  class DtProjectedWidgetModelAgent;
23  class DtVisualizerDefinition;
24  class DtAttachableUpdaterAgent;
25  class DtOverlaySegmentedLineModelAgent;
26  class DtLineModelUpdaterAgent;
27 }
28 
29 namespace makVrf
30 {
31  class DtEntityStateListenerExtensions;
32  class DtAttachableUpdaterWithLevelOrientationAgent;
33 
37  {
38  protected:
39  struct RingStruct
40  {
41  //This struct has separate instances of scene objects and updater agents for
45  makVrv::DtOverlayEllipseArcModelAgent* myRangeRing;
46  makVrv::DtSceneObjectAgent* myRingSceneObjectAgent;
47  makVrv::DtSceneObjectAgent* myLineSceneObjectAgent;
48  DtAttachableUpdaterWithLevelOrientationAgent* myRingUpdaterAgent;
49  DtAttachableUpdaterWithLevelOrientationAgent* myLineUpdaterAgent;
50  makVrv::DtOverlaySegmentedLineModelAgent* myVerticalLine;
51 
52  //Label components
53  makVrv::DtSceneObjectAgent* myLabelSceneObjectAgent;
54  DtAttachableUpdaterWithLevelOrientationAgent* myLabelUpdaterAgent;
55  makVrv::DtProjectedWidgetModelAgent* myLabelProjectedWidgetModelAgent;
56  makVrv::DtWidgetLabelAgent* myLabel;
57  };
58 
59  public:
60 
63  makVrv::DtStateListener& listener, int modelSet );
64 
66  virtual ~DtRangeRingVisualizer();
67 
68  //connect method called in the creator class
69  virtual void connect();
70 
71  //connect method called in the destructor
72  virtual void disconnect();
73 
74  //initialize method called in the creator class
75  virtual void initialize_settings();
76 
78  virtual void setVisualizerDefinition( const makVrv::DtVisualizerDefinition& visDef );
79 
80  virtual void setModelDefinitionForAgents();
81 
83  virtual const makVrv::DtStateVisualizer::TypeInfo& typeInfo() const;
84 
86  static const makVrv::DtStateVisualizer::TypeInfo& theTypeInfo();
87 
89  static const makVrv::DtVisualizerSchema& theDtRangeRingSchema();
90 
91 
92 
93  protected:
94  virtual void createModelAgents();
95  virtual void destroyModelAgents();
96 
97  //Creates a new set of ring visualizers, populates a struct and adds it to myRangeRings
98  virtual void createRing();
99  virtual void destroyOuterRing();
100  virtual void tryToDraw();
101 
102  virtual void updateRangeRingsCount();
103  //override of parent method - destroys all subordinate visualizers if turned off
104  virtual bool setVisible(bool visible, int context);
106  virtual void setRangeRingsScale(float);
108  virtual void setRangeRingsFill(bool);
109  virtual void setRangeRingsGeometry();
110  virtual void setRangeRingsColors();
111  virtual void setRangeRingsLabels();
112  virtual void slot_entityRangeRingsEnabled(const std::string& markingText, int setting);
113  virtual void slot_displayUnitChanged(makVrv::DtUnitConverterCollection::DisplayUnitType, int, int);
114 
115  protected:
116  std::vector<RingStruct> myRangeRings;
118  std::string myFontFile;
120  float myScale;
121  bool myFill;
123  };
124  //The creator class is normally templated in visualizers, but I want to split out the
126 
128  {
129 public:
130 
133 
136 
137  virtual DtRangeRingVisualizerCreator* clone() const;
138 
140  virtual makVrv::DtStateVisualizer* create(makVrv::DtBaseConnection& simulation, makVrv::DtStateListener& listener, int modelSet) const;
141 
144 
145  virtual const std::string& tag();
146  };
147 
148 }

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)