VR-Forces 4.1 Class Documentation
DtSceneDriver.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtSceneDriver.h,v $ $Revision: 1.65 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 #include <vrvCore/vrvCore.h>
15 #include <vrvCore/DtDriver.h>
17 
18 #include <boost/signal.hpp>
19 #include <boost/shared_ptr.hpp>
20 
21 #include <string>
22 #include <map>
23 #include <list>
24 #include <vector>
25 
26 class DtVector;
27 class DtTaitBryan;
28 
29 namespace makVrv
30 {
31 
32  class DtChannelConfiguration;
33  class DtDe;
34  class DtDeRecord;
35  class DtFeature;
36  class DtProp;
37  class DtScene;
38 
42  {
43  public:
44 
46  friend class DtSceneDriverCreator;
47 
49  virtual ~DtSceneDriver();
50 
52  virtual bool onStart();
53 
55  virtual bool onStop();
56 
58  virtual bool onTick();
59 
61  virtual const std::string& className() const;
62 
67  bool saveScene( const std::string& filePath, bool saveAs = true );
68 
70  bool loadScene( const std::string& filePath );
71 
74  const std::string& sceneFileName() const;
75 
78  DtScene* findScene();
79 
82  DtScene& scene();
83 
86  virtual void clearScene();
87 
88  protected:
89 
91  DtSceneDriver(DtDe& de);
92 
94  void reportPropCreated(const DtProp& prop);
95 
97  void reportPropDestroyed(const DtProp& prop);
98 
100  void reportTerrainPatchCreated(const DtTerrainPatch& patch);
101 
103  void reportTerrainPatchDestroyed(const DtTerrainPatch& patch);
104 
106  void reportFeatureCreated(const DtFeature& feature);
107 
109  void reportFeatureDestroyed(const DtFeature& feature);
110 
113  virtual void slot_displayEngineAdded(const DtDeRecord& igRecord);
114 
115  virtual void slot_elementAttributeChangeRequested(DtUniqueID id, DtUniqueID parentId,
116  DtBoost::shared_ptr<const DtElementAttribute> atr);
117 
118  void handlePropElementChanged(DtProp& prop, const DtElementAttribute* attr);
119 
120  protected:
121 
122  std::string myClassName;
124 
126  std::string mySceneFileName;
127 
128  };
129 
134  {
135  public:
136 
138  static DtSceneDriverCreator& instance(DtDe& de);
139 
141  static void registerInstance(DtDe& de,DtSceneDriverCreator* inst);
142 
144  virtual ~DtSceneDriverCreator();
145 
148  virtual DtSceneDriver* create(DtDe& de);
149 
150  protected:
151 
153  };
154 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)