VR-Forces 4.1.1 Class Documentation
DtOsgGlStudioCockpit.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtOsgGlStudioCockpit.h,v $ $Revision: 1.15 $ $State: Exp $
7 ******************************************************************************/
8 
12 #pragma once
13 
15 #include <vrvCore/DtUniqueID.h>
16 
17 #include <vlpi/oldSmoother.h>
18 #include <vlutil/vlTime.h>
19 
20 #include <string>
21 #include <map>
22 
23 namespace osg
24 {
25  class Switch;
26  class Group;
27 }
28 
29 namespace makVrv
30 {
31  class DtDe;
32  class DtGlStudioDrawable;
33  class DtChannelSpecificGroup;
34  class DtGlStudioEventProcessor;
35  class DtMouseEvent;
36  class DtChannelManager;
37  class DtChannel;
38  class DtChannelConfiguration;
39  class DtWindowConfiguration;
40  class DtGlStudioAttributeUpdater;
41  class DtObserverObject;
42 
48  {
49  public:
50  enum DtPerspective {Dt2D, Dt3D};
51  typedef std::map<std::string, DtGlStudioAttributeUpdater*> DtAttributeUpdateMap;
52 
54  virtual ~DtOsgGlStudioCockpit();
55 
56  //@name Distributed Interface
58 
61  virtual void createCockpit(const std::string& filename, const std::string& rsoName, DtPerspective p);
62 
63  virtual void removeCockpit();
64 
66  virtual void setProperty(const std::string& prop, const std::string& val);
67 
69  virtual void setChannelKeyword(const std::string& channelKeyword);
70 
72  virtual void setPerspective(const double& width, const double& height);
73 
75  virtual void setOffset(const double& x, const double& y, const double& z);
76 
78  virtual void setVisible(bool vis);
79 
81  virtual void addUpdater(const std::string& name, const std::string& type);
82 
85  virtual void updateTSPI(const DtVector& loc, const DtVector& vel,
86  const DtVector& accel, const DtTaitBryan& orient,
87  const DtVector& rotVel, int algorithm);
88 
90  virtual void setObserverName(const std::string& obsName);
91 
93 
94  //@name Local Interface
96 
99  virtual std::string className() const;
100 
102  DtUniqueID uniqueID() const;
103 
105  virtual bool handleMouseInput(const DtMouseEvent& ea);
106 
108  virtual double update();
109 
111 
112  protected:
113  //attributes of the current entity
115 
117  virtual void initGlStudio();
118 
120  virtual osg::Group* createOverlayObjects();
121 
124  virtual osg::Group* createChannelNode();
125 
127  virtual void deepRemoveChildren(osg::Group* g);
128 
130  virtual void slot_channelAdded(DtChannelManager* mgr, DtChannel* channel);
131 
133  virtual void slot_channelDestroyed(DtChannelManager* mgr, DtChannel* channel);
134 
136  virtual void slot_channelModified(const std::string& deName, const std::string& windowName,
137  const std::string& channelName, const DtChannelConfiguration& config);
138 
140  virtual void slot_smoothingEnabled(bool smooth);
142  virtual void slot_smoothingPeriod(const double& period);
143 
144  virtual void slot_projectionChanged( DtObserverObject*, bool is2D );
145 
148  std::string myRsoName;
149  std::string myFilename;
150  double myWidth;
151  double myHeight;
153  std::string myChannelKeyword;
154  double myOffsetX;
155  double myOffsetY;
156  double myOffsetZ;
157  std::string myObserverName;
160 
161  osg::Group* myGlStudioGroup;
162  osg::Switch* myViewSwitchNode;
166 
168  DtOldSmoother mySmoother;
169  DtClock myClock;
172  };
173 }

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)