VR-Forces 4.1 Class Documentation
DtRangeSphereVisualizer.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 
16 namespace makVrv
17 {
18  class DtEllipsoidArcModelAgent;
19  class DtOverlaySegmentedLineModelAgent;
20  class DtAttachableUpdaterAgent;
21  class DtWidgetLabelAgent;
22  class DtProjectedWidgetModelAgent;
23 }
24 
25 namespace makVrf
26 {
27  class DtEntityStateListenerExtensions;
28 
32  {
33  protected:
34  struct SphereStruct
35  {
36  int myType;
37  makVrv::DtEllipsoidArcModelAgent* myRangeSphere;
38  makVrv::DtSceneObjectAgent* mySceneObjectAgent;
39  makVrv::DtAttachableUpdaterAgent* myUpdater;
40  makVrv::DtSceneObjectAgent* mySphereSceneObjectAgent;
41  makVrv::DtAttachableUpdaterAgent* mySphereUpdater;
42  makVrv::DtOverlaySegmentedLineModelAgent* myHeightLine;
43  };
44 
45  public:
46 
49  makVrv::DtStateListener& listener, int modelSet );
50 
52  virtual ~DtRangeSphereVisualizer();
53 
54  //connect method called in the creator class
55  virtual void connect();
56 
57  //connect method called in the destructor
58  virtual void disconnect();
59 
60  //initialize method called in the creator class
61  virtual void initialize_settings();
62 
64  virtual void setVisualizerDefinition( const makVrv::DtVisualizerDefinition& visDef );
65 
66  virtual void setModelDefinitionForAgents();
67 
69  virtual const makVrv::DtStateVisualizer::TypeInfo& typeInfo() const;
70 
72  static const makVrv::DtStateVisualizer::TypeInfo& theTypeInfo();
73 
75  static const makVrv::DtVisualizerSchema& theDtRangeSphereSchema();
76 
77  virtual bool setVisible( bool onOff, int contextInt );//Override of parent class to ensure agreement between entity scene object and range ring
78  virtual void setShowRangeSphere(bool); //reflects whether "Draw 3d Rings" checkbox is active
79  virtual void setScale(float); //Scale is used solely to determine the width of the height line
80 
81  protected:
82 
83  virtual void tryToDraw();//checks whether the appropriate flags are set and then creates or destroys model agents as appropriate
84  virtual void createModelAgents(); //overrides the base class method and tries to draw spheres contingent on settings
85  virtual void destroyModelAgents();
86 
87  virtual SphereStruct addNewRangeSphere();
88  virtual void destroyLastRangeSphere();
89 
90  virtual void setRangeSphereColors();
91  virtual void slot_entityRangeRingsEnabled(const std::string& markingText, int setting);
92  virtual void setRangeSphereGeometry();
93  virtual void setRangeSphereCount( int );
94 
95  protected:
96  std::vector<SphereStruct> myRangeSpheres;
100  float myScale;
101  };
102  //The creator class is normally templated in visualizers, but I want to split out the
105  {
106  public:
107 
110 
113 
114  virtual DtRangeSphereVisualizerCreator* clone() const;
115 
117  virtual makVrv::DtStateVisualizer* create(makVrv::DtBaseConnection& simulation, makVrv::DtStateListener& listener, int modelSet) const;
118 
121 
122  virtual const std::string& tag();
123  };
124 }

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)