VR-Forces 4.3 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 <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 
178  virtual void setRendered(bool rendered);
179 
180  private:
181 
186  void setTransformModelScalingState();
187 
195  void setToVisibleParent( bool visible = true, bool create = true );
196 
200  DtOsgRenderer* getRendererAndSceneParent(
201  DtOsgRenderer::SceneRoot& sceneParent );
202 
203  private:
207 
211 
214  DtOsgSceneConnector& operator=( const DtOsgSceneConnector& );
215 
216  private:
217 
218  osg::ref_ptr<DtFastMatrixTransform> myTransform;
219  osg::ref_ptr<DtFastGroup> myGroup;
220  osg::ref_ptr<osg::Switch> mySwitch;
221 
224 
225  bool myVisible;
227  bool myIsProp;
230 
233 
235 
237  };
238 
239 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)