X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Fmodel%2Fmodellib.hxx;h=cdd6d820440a50f6c337d0c04f79f4b45b42b5fe;hb=32a6bd78d8bf143f40922f1a0bc7a88ea7706a7d;hp=cdcbd7dd8fade0c9bce8ede869273b28d70326ff;hpb=40fc2907a153093f830994519fc6ada40e21ae49;p=simgear.git diff --git a/simgear/scene/model/modellib.hxx b/simgear/scene/model/modellib.hxx index cdcbd7dd..cdd6d820 100644 --- a/simgear/scene/model/modellib.hxx +++ b/simgear/scene/model/modellib.hxx @@ -32,6 +32,10 @@ #include #include +namespace osg { + class PagedLOD; +} + namespace simgear { class SGModelData; // defined below @@ -46,6 +50,8 @@ public: static void init(const std::string &root_dir, SGPropertyNode* root); + static void resetPropertyRoot(); + static void setPanelFunc(panel_func pf); // Load a 3D model (any format) @@ -58,20 +64,20 @@ public: // This function initially just returns a proxy node that refers to // the model file. Once the viewer steps onto that node the // model will be loaded. - static osg::Node* loadDeferedModel(const std::string &path, - SGPropertyNode *prop_root = NULL, - SGModelData *data=0); + static osg::Node* loadDeferredModel(const std::string &path, + SGPropertyNode *prop_root = NULL, + SGModelData *data=0); // Load a 3D model (any format) through the DatabasePager. // This function initially just returns a PagedLOD node that refers to // the model file. Once the viewer steps onto that node the // model will be loaded. When the viewer does no longer reference this // node for a long time the node is unloaded again. - static osg::Node* loadPagedModel(const std::string &path, + static osg::PagedLOD* loadPagedModel(const std::string &path, SGPropertyNode *prop_root = NULL, SGModelData *data=0); static std::string findDataFile(const std::string& file, - const osgDB::ReaderWriter::Options* opts = NULL, + const osgDB::Options* opts = NULL, SGPath currentDir = SGPath()); protected: SGModelLib(); @@ -93,6 +99,7 @@ public: virtual ~SGModelData() {} virtual void modelLoaded(const std::string& path, SGPropertyNode *prop, osg::Node* branch) = 0; + virtual SGModelData* clone() const = 0; }; }