VR-Forces 4.1.1 Class Documentation
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 <vrvOsg/vrvOsg.h>
13 #include <vrvCore/DtUniqueID.h>
14 
15 #include <osg/ref_ptr>
16 #include <osg/Switch>
17 #include <osg/MatrixTransform>
18 #include <vrvOsg/DtFastGroup.h>
19 #include <vrvOsg/DtOsgRenderer.h>
20 
21 class DtVector;
22 class DtTaitBryan;
23 
24 namespace makVrv
25 {
26 
27  class DtChannel;
28  class DtDe;
29  class DtOsgModelInstance;
30 
36  {
37  public:
38 
42 
45 
51  void addToScene( DtOsgModelInstance* osgModelInstance,
52  const DtUniqueID& sceneObjectId, int modelSet, int visualizerType);
53 
62  void addToScene( DtOsgModelInstance* osgModelInstance,
63  const DtUniqueID& sceneObjectId, int modelSet, DtChannel* channelRoot);
64 
68  void addToSceneAsProp( DtOsgModelInstance* osgModelInstance,
69  const DtUniqueID& sceneObjectId );
70 
73  void removeFromScene( DtOsgModelInstance* osgModelInstance );
74 
77  void setPosition( const DtVector& position );
78 
81  void setOrientation( const DtTaitBryan& orientation );
82 
89  void setVisible( bool visible );
90 
95  bool isVisible() const;
96 
104  void setConnectedWhileHidden( bool stayConnected );
105 
110  bool connectedWhileHidden() const;
111 
117  void setModelScalingEnabled( bool enabled );
118 
123  bool modelScalingEnabled() const;
124 
133  void setLocalModelScalingEnabled( bool enabled );
134 
139  bool localModelScalingEnabled() const;
140 
144  void setLocalModelScalingAmount( float amount );
145 
149  double localModelScalingAmount() const;
150 
155  DtOsgRenderer::SceneRoot findSceneParent();
156 
160  osg::MatrixTransform* transformRoot();
161 
165  osg::Group* groupRoot();
166 
172  void setSolidFlags( bool solid );
173 
174  private:
175 
180  void setTransformModelScalingState();
181 
189  void setToVisibleParent( bool visible = true, bool create = true );
190 
194  DtOsgRenderer* getRendererAndSceneParent(
195  DtOsgRenderer::SceneRoot& sceneParent );
196 
197  private:
201 
205 
208  DtOsgSceneConnector& operator=( const DtOsgSceneConnector& );
209 
210  private:
211 
212  osg::ref_ptr<DtFastMatrixTransform> myTransform;
213  osg::ref_ptr<DtFastGroup> myGroup;
214  osg::ref_ptr<osg::Switch> mySwitch;
215 
218 
219  bool myVisible;
221  bool myIsProp;
224 
227 
229 
231  };
232 
233 }

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)