![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2010 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtSceneDriver.h,v $ $Revision: 1.65 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 #include <vrvCore/vrvCore.h> 00015 #include <vrvCore/DtDriver.h> 00016 #include <vrvCore/DtOverlaySettings.h> 00017 00018 #include <boost/signal.hpp> 00019 #include <boost/shared_ptr.hpp> 00020 00021 #include <string> 00022 #include <map> 00023 #include <list> 00024 #include <vector> 00025 00026 class DtVector; 00027 class DtTaitBryan; 00028 00029 namespace makVrv 00030 { 00031 00032 class DtChannelConfiguration; 00033 class DtDe; 00034 class DtDeRecord; 00035 class DtFeature; 00036 class DtProp; 00037 class DtScene; 00038 00041 class DT_DLL_VRVCORE DtSceneDriver : public makVrv::DtDriver 00042 { 00043 public: 00044 00046 friend class DtSceneDriverCreator; 00047 00049 virtual ~DtSceneDriver(); 00050 00052 virtual bool onStart(); 00053 00055 virtual bool onStop(); 00056 00058 virtual bool onTick(); 00059 00061 virtual const std::string& className() const; 00062 00067 bool saveScene( const std::string& filePath, bool saveAs = true ); 00068 00070 bool loadScene( const std::string& filePath ); 00071 00074 const std::string& sceneFileName() const; 00075 00078 DtScene* findScene(); 00079 00082 DtScene& scene(); 00083 00086 virtual void clearScene(); 00087 00088 protected: 00089 00091 DtSceneDriver(DtDe& de); 00092 00094 void reportPropCreated(const DtProp& prop); 00095 00097 void reportPropDestroyed(const DtProp& prop); 00098 00100 void reportTerrainPatchCreated(const DtTerrainPatch& patch); 00101 00103 void reportTerrainPatchDestroyed(const DtTerrainPatch& patch); 00104 00106 void reportFeatureCreated(const DtFeature& feature); 00107 00109 void reportFeatureDestroyed(const DtFeature& feature); 00110 00113 virtual void slot_displayEngineAdded(const DtDeRecord& igRecord); 00114 00115 virtual void slot_elementAttributeChangeRequested(DtUniqueID id, DtUniqueID parentId, 00116 DtBoost::shared_ptr<const DtElementAttribute> atr); 00117 00118 void handlePropElementChanged(DtProp& prop, const DtElementAttribute* attr); 00119 00120 protected: 00121 00122 std::string myClassName; 00123 DtDe& myDe; 00124 00125 DtScene* myScene; 00126 std::string mySceneFileName; 00127 00128 }; 00129 00133 class DT_DLL_VRVCORE DtSceneDriverCreator : public DtVirtualBaseClass 00134 { 00135 public: 00136 00138 static DtSceneDriverCreator& instance(DtDe& de); 00139 00141 static void registerInstance(DtDe& de,DtSceneDriverCreator* inst); 00142 00144 virtual ~DtSceneDriverCreator(); 00145 00148 virtual DtSceneDriver* create(DtDe& de); 00149 00150 protected: 00151 00152 DtSceneDriverCreator(); 00153 }; 00154 }