VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 <vrvOsg/DtOsgRenderer.h>
15 
16 class DtTaitBryan;
17 
18 namespace makVrv
19 {
20 
21  class DtChannel;
22  class DtDe;
23  class DtOsgModelInstance;
24 
30  {
31  public:
32 
36 
38  virtual ~DtOsgSceneConnector();
39 
45  void addToScene( DtOsgModelInstance* osgModelInstance,
46  const DtUniqueID& sceneObjectId, int modelSet, int visualizerType);
47 
56  void addToScene( DtOsgModelInstance* osgModelInstance,
57  const DtUniqueID& sceneObjectId, int modelSet, DtChannel* channelRoot);
58 
62  void addToSceneAsProp( DtOsgModelInstance* osgModelInstance,
63  const DtUniqueID& sceneObjectId );
64 
67  void removeFromScene( DtOsgModelInstance* osgModelInstance );
68 
71  void setPosition( const DtVector& position );
72 
75  void setOrientation( const DtTaitBryan& orientation );
76 
83  void setVisible( bool visible );
84 
89  bool isVisible() const;
90 
98  void setConnectedWhileHidden( bool stayConnected );
99 
104  bool connectedWhileHidden() const;
105 
111  void setModelScalingEnabled( bool enabled );
112 
117  bool modelScalingEnabled() const;
118 
127  void setLocalModelScalingEnabled( bool enabled );
128 
133  bool localModelScalingEnabled() const;
134 
138  void setLocalModelScalingAmount( float amount );
139 
143  double localModelScalingAmount() const;
144 
149  DtOsgRenderer::SceneRoot findSceneParent();
150 
154  osg::MatrixTransform* transformRoot();
155 
159  osg::Group* groupRoot();
160 
166  void setSupportFlags( bool support );
167 
172  virtual void setRendered(bool rendered);
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 Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)