VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgSceneConnector.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2012 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <osg/Switch>
13 #include <vrvOsg/DtFastGroup.h>
14 #include <matrix/vlVector.h>
15 #include <vrvCore/DtUniqueID.h>
16 
17 #include <vrvOsg/DtSceneRoot.h>
18 
19 class DtTaitBryan;
20 
21 namespace makVrv
22 {
23 
24  class DtChannel;
25  class DtDe;
26  class DtOsgModelInstance;
27  class DtOsgRenderer;
28 
34  {
35  public:
36 
40 
42  virtual ~DtOsgSceneConnector();
43 
49  void addToScene( DtOsgModelInstance* osgModelInstance,
50  const DtUniqueID& sceneObjectId, int modelSet, int visualizerType);
51 
60  void addToScene( DtOsgModelInstance* osgModelInstance,
61  const DtUniqueID& sceneObjectId, int modelSet, DtChannel* channelRoot);
62 
66  void addToSceneAsProp( DtOsgModelInstance* osgModelInstance,
67  const DtUniqueID& sceneObjectId );
68 
71  void removeFromScene( DtOsgModelInstance* osgModelInstance );
72 
75  void setPosition( const DtVector& position );
76 
79  void setOrientation( const DtTaitBryan& orientation );
80 
87  void setVisible( bool visible );
88 
93  bool isVisible() const;
94 
102  void setConnectedWhileHidden( bool stayConnected );
103 
108  bool connectedWhileHidden() const;
109 
115  void setModelScalingEnabled( bool enabled );
116 
121  bool modelScalingEnabled() const;
122 
131  void setLocalModelScalingEnabled( bool enabled );
132 
137  bool localModelScalingEnabled() const;
138 
142  void setLocalModelScalingAmount( float amount );
143 
147  double localModelScalingAmount() const;
148 
153  DtSceneRoot findSceneParent();
154 
158  osg::MatrixTransform* transformRoot();
159 
163  osg::Group* groupRoot();
164 
170  void setSupportFlags( bool support );
171 
176  virtual void setRendered(bool rendered);
177 
178  private:
179 
184  void setTransformModelScalingState();
185 
193  void setToVisibleParent( bool visible = true, bool create = true );
194 
198  DtOsgRenderer* getRendererAndSceneParent(
199  DtSceneRoot& sceneParent );
200 
201  private:
205 
209 
212  DtOsgSceneConnector& operator=( const DtOsgSceneConnector& );
213 
214  private:
215 
216  osg::ref_ptr<DtFastMatrixTransform> myTransform;
217  osg::ref_ptr<DtFastGroup> myGroup;
218  osg::ref_ptr<osg::Switch> mySwitch;
219 
222 
223  bool myVisible;
225  bool myIsProp;
228 
231 
233 
235  };
236 
237 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)