VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgGlStudioCockpit.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 #pragma once
10 
12 #include <vrvCore/DtUniqueID.h>
13 #include <vrvCore/DtTickable.h>
14 #include <vlpi/exponentialSmoother.h>
15 
16 #include <osg/ref_ptr>
17 #include <osg/MatrixTransform>
18 
19 #include <string>
20 #include <map>
21 
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  class DtSceneObject;
43 
49  {
50  public:
51  enum DtPerspective {Dt2D, Dt3D};
52  typedef std::map<std::string, DtGlStudioAttributeUpdater*> DtAttributeUpdateMap;
53 
55  virtual ~DtOsgGlStudioCockpit();
56 
57  //@name Distributed Interface
59 
64  virtual void createCockpit(const std::string& filename,
65  const std::string& rsoName, DtPerspective p,
66  DtUniqueID attachedEntityElementId = 0);
67 
68  virtual void removeCockpit();
69 
71  virtual void setProperty(const std::string& prop, const std::string& val);
72 
74  virtual void setChannelKeyword(const std::string& channelKeyword);
75 
77  virtual void setPerspective(const double& width, const double& height);
78 
80  virtual void setOffset(const double& x, const double& y, const double& z);
81 
83  virtual void setDynamicScale(const double& x, const double& y,
84  const double& z);
85 
87  virtual void setDynamicRotate(const double& x, const double& y,
88  const double& z);
89 
91  virtual void setVisible(bool vis);
92 
94  virtual void addUpdater(const std::string& name, const std::string& type);
95 
98  virtual void updateTSPI(const DtVector& loc, const DtVector& vel,
99  const DtVector& accel, const DtTaitBryan& orient,
100  const DtVector& rotVel, int algorithm);
101 
103  virtual void setObserverName(const std::string& obsName);
104 
108  virtual void setRenderCockpitOnly(bool cockpitOnly);
109  virtual bool renderCockpitOnly();
110 
114  virtual void setRenderAsOverlay(bool renderAsOverlay);
115  virtual bool renderAsOverlay();
116 
118  //
119 
120 
121 
122 
123  //@name Local Interface
125 
128  virtual std::string className() const;
129 
131  DtUniqueID uniqueID() const;
132 
135  virtual void updateMatrixTransform();
136 
138  virtual bool handleMouseInput(const DtMouseEvent& ea);
139 
141  virtual double update();
142 
144 
146  virtual bool needsUpdate( DtTime tNow );
147 
149  virtual void update( DtTime tNow );
150 
152  virtual DtPerspective perspective(void) const;
153 
154  protected:
155  //attributes of the current entity
157 
159  virtual void initGlStudio();
160 
162  virtual osg::Group* createOverlayObjects();
163 
166  virtual osg::Group* createChannelNode();
167 
169  virtual void deepRemoveChildren(osg::Group* g);
170 
172  virtual void slot_channelAdded(DtChannelManager* mgr, DtChannel* channel);
173 
175  virtual void slot_channelDestroyed(DtChannelManager* mgr, DtChannel* channel);
176 
178  virtual void slot_channelModified(const std::string& deName, const std::string& windowName,
179  const std::string& channelName, const DtChannelConfiguration& config);
180 
182  virtual void slot_smoothingEnabled(bool smooth);
184  virtual void slot_smoothingPeriod(const double& period);
185 
186  virtual void slot_projectionChanged( DtObserverObject*, bool is2D );
187 
190  std::string myRsoName;
191  std::string myFilename;
192  double myWidth;
193  double myHeight;
196  std::string myChannelKeyword;
197  double myOffsetX;
198  double myOffsetY;
199  double myOffsetZ;
206  std::string myObserverName;
210 
215 
221 
223  DtExponentialSmoother mySmoother;
227  };
228 }
std::string myObserverName
Definition: DtOsgGlStudioCockpit.h:206
double myWidth
Definition: DtOsgGlStudioCockpit.h:192
bool myHasSmootherValues
Definition: DtOsgGlStudioCockpit.h:222
Processor to handle events for the osgWidget overlay on a channel.
Definition: DtGlStudioEventProcessor.h:22
double myHeight
Definition: DtOsgGlStudioCockpit.h:193
double myDynamicRotateY
Definition: DtOsgGlStudioCockpit.h:204
double myOffsetZ
Definition: DtOsgGlStudioCockpit.h:199
DtAttributeUpdateMap myAttributeUpdaters
Definition: DtOsgGlStudioCockpit.h:156
DtPerspective
Definition: DtOsgGlStudioCockpit.h:51
double myDynamicRotateZ
Definition: DtOsgGlStudioCockpit.h:205
std::string myChannelKeyword
Definition: DtOsgGlStudioCockpit.h:196
osg::ref_ptr< osg::MatrixTransform > myMatrixTransform
Definition: DtOsgGlStudioCockpit.h:216
DtPerspective myPerspective
Definition: DtOsgGlStudioCockpit.h:194
An abstract base class for objects that require updates.
Definition: DtTickable.h:26
double myCurrentTime
Definition: DtOsgGlStudioCockpit.h:226
DtGlStudioDrawable * myGlStudioComponent
Definition: DtOsgGlStudioCockpit.h:218
double myDynamicScaleZ
Definition: DtOsgGlStudioCockpit.h:202
This class encapsulates a mouse button event.
Definition: DtMouseEvent.h:19
DtExponentialSmoother mySmoother
Definition: DtOsgGlStudioCockpit.h:223
std::string myFilename
Definition: DtOsgGlStudioCockpit.h:191
The abstract Channel Class.
Definition: DtChannel.h:30
double myOffsetY
Definition: DtOsgGlStudioCockpit.h:198
DtGlStudioEventProcessor * myEventProcessor
Definition: DtOsgGlStudioCockpit.h:219
bool myIsVisible
Definition: DtOsgGlStudioCockpit.h:207
bool myRenderCockpitOnly
Definition: DtOsgGlStudioCockpit.h:209
A group node that culls it&#39;s group members based on channels.
Definition: DtChannelSpecificGroup.h:30
The OSG Drawable that contains a GL Studio HUD.
Definition: DtGlStudioDrawable.h:49
DtOsgGlStudioCockpit is the implementation of the distributed object of the same name (and under our ...
Definition: DtOsgGlStudioCockpit.h:48
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:29
bool myObserverIs2D
Definition: DtOsgGlStudioCockpit.h:208
double myDynamicRotateX
Definition: DtOsgGlStudioCockpit.h:203
double myOffsetX
Definition: DtOsgGlStudioCockpit.h:197
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
double myDynamicScaleY
Definition: DtOsgGlStudioCockpit.h:201
std::map< std::string, DtGlStudioAttributeUpdater * > DtAttributeUpdateMap
Definition: DtOsgGlStudioCockpit.h:52
Base class for handling DtChannels.
Definition: DtChannelManager.h:32
DtClock myClock
Definition: DtOsgGlStudioCockpit.h:224
osg::ref_ptr< osg::Group > myGlStudioGroup
Definition: DtOsgGlStudioCockpit.h:211
#define DT_DLL_VRVGLSTUDIOSHARED
Definition: DtGlStudioShared.h:22
Contains the declaration for makVrv::DtTickable.
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition: DtChannelConfiguration.h:26
std::string myRsoName
Definition: DtOsgGlStudioCockpit.h:190
bool myRenderAsOverlay
Definition: DtOsgGlStudioCockpit.h:195
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:41
Contains makVrv::DtUniqueID type.
DtUniqueID myId
Definition: DtOsgGlStudioCockpit.h:189
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtDe & myDe
Definition: DtOsgGlStudioCockpit.h:188
osg::ref_ptr< osg::Switch > myViewSwitchNode
Definition: DtOsgGlStudioCockpit.h:214
double myDynamicScaleX
Definition: DtOsgGlStudioCockpit.h:200
DtSceneObject * myHostSceneObject
Definition: DtOsgGlStudioCockpit.h:220
osg::ref_ptr< osg::Group > myGlStudio3DGroup
Definition: DtOsgGlStudioCockpit.h:213
double myPreviousTime
Definition: DtOsgGlStudioCockpit.h:225
osg::ref_ptr< osg::Group > myGlStudioPost2DGroup
Definition: DtOsgGlStudioCockpit.h:212
DtChannelSpecificGroup * myChannelNode
Definition: DtOsgGlStudioCockpit.h:217

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)