VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtOsgGlStudioCockpit.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 #pragma once
10 
12 #include <vrvCore/DtUniqueID.h>
13 #include <vrvCore/DtTickable.h>
15 
16 #include <vlpi/oldSmoother.h>
17 #include <vlutil/vlTime.h>
18 
19 #include <osg/ref_ptr>
20 #include <osg/MatrixTransform>
21 
22 #include <string>
23 #include <map>
24 
25 
26 namespace osg
27 {
28  class Switch;
29  class Group;
30 }
31 
32 namespace makVrv
33 {
34  class DtDe;
35  class DtGlStudioDrawable;
36  class DtChannelSpecificGroup;
37  class DtGlStudioEventProcessor;
38  class DtMouseEvent;
39  class DtChannelManager;
40  class DtChannel;
41  class DtChannelConfiguration;
42  class DtWindowConfiguration;
43  class DtGlStudioAttributeUpdater;
44  class DtObserverObject;
45  class DtSceneObject;
46 
52  {
53  public:
54  enum DtPerspective {Dt2D, Dt3D};
55  typedef std::map<std::string, DtGlStudioAttributeUpdater*> DtAttributeUpdateMap;
56 
58  virtual ~DtOsgGlStudioCockpit();
59 
60  //@name Distributed Interface
62 
67  virtual void createCockpit(const std::string& filename,
68  const std::string& rsoName, DtPerspective p,
69  DtUniqueID attachedEntityElementId = 0);
70 
71  virtual void removeCockpit();
72 
74  virtual void setProperty(const std::string& prop, const std::string& val);
75 
77  virtual void setChannelKeyword(const std::string& channelKeyword);
78 
80  virtual void setPerspective(const double& width, const double& height);
81 
83  virtual void setOffset(const double& x, const double& y, const double& z);
84 
86  virtual void setDynamicScale(const double& x, const double& y,
87  const double& z);
88 
90  virtual void setDynamicRotate(const double& x, const double& y,
91  const double& z);
92 
94  virtual void setVisible(bool vis);
95 
97  virtual void addUpdater(const std::string& name, const std::string& type);
98 
101  virtual void updateTSPI(const DtVector& loc, const DtVector& vel,
102  const DtVector& accel, const DtTaitBryan& orient,
103  const DtVector& rotVel, int algorithm);
104 
106  virtual void setObserverName(const std::string& obsName);
107 
111  virtual void setRenderCockpitOnly(bool cockpitOnly);
112 
114 
115  //@name Local Interface
117 
120  virtual std::string className() const;
121 
123  DtUniqueID uniqueID() const;
124 
127  virtual void updateMatrixTransform();
128 
130  virtual bool handleMouseInput(const DtMouseEvent& ea);
131 
133  virtual double update();
134 
136 
138  virtual bool needsUpdate( DtTime tNow );
139 
141  virtual void update( DtTime tNow );
142 
143  protected:
144  //attributes of the current entity
146 
148  virtual void initGlStudio();
149 
151  virtual osg::Group* createOverlayObjects();
152 
155  virtual osg::Group* createChannelNode();
156 
158  virtual void deepRemoveChildren(osg::Group* g);
159 
161  virtual void slot_channelAdded(DtChannelManager* mgr, DtChannel* channel);
162 
164  virtual void slot_channelDestroyed(DtChannelManager* mgr, DtChannel* channel);
165 
167  virtual void slot_channelModified(const std::string& deName, const std::string& windowName,
168  const std::string& channelName, const DtChannelConfiguration& config);
169 
171  virtual void slot_smoothingEnabled(bool smooth);
173  virtual void slot_smoothingPeriod(const double& period);
174 
175  virtual void slot_projectionChanged( DtObserverObject*, bool is2D );
176 
179  std::string myRsoName;
180  std::string myFilename;
181  double myWidth;
182  double myHeight;
184  std::string myChannelKeyword;
185  double myOffsetX;
186  double myOffsetY;
187  double myOffsetZ;
194  std::string myObserverName;
198 
199  osg::Group* myGlStudioGroup;
200  osg::Group* myGlStudio3DGroup;
201  osg::Switch* myViewSwitchNode;
202  osg::ref_ptr<osg::MatrixTransform> myMatrixTransform;
207 
213  };
214 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)