From: James Turner Date: Sun, 23 Feb 2014 00:24:47 +0000 (-0800) Subject: Make return type from loadPagedModel explicit. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=32a6bd78d8bf143f40922f1a0bc7a88ea7706a7d;p=simgear.git Make return type from loadPagedModel explicit. - explicitly return osg::PagedLOD instead of Node, so callers don't need to rely on documentation + cast to get the LOD settings on the result. --- diff --git a/simgear/scene/model/modellib.cxx b/simgear/scene/model/modellib.cxx index 8a551510..efbcd136 100644 --- a/simgear/scene/model/modellib.cxx +++ b/simgear/scene/model/modellib.cxx @@ -152,7 +152,7 @@ SGModelLib::loadDeferredModel(const string &path, SGPropertyNode *prop_root, return proxyNode; } -osg::Node* +osg::PagedLOD* SGModelLib::loadPagedModel(const string &path, SGPropertyNode *prop_root, SGModelData *data) { diff --git a/simgear/scene/model/modellib.hxx b/simgear/scene/model/modellib.hxx index 7e8a5a8e..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 @@ -68,7 +72,7 @@ public: // 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);