]> git.mxchange.org Git - simgear.git/commitdiff
Make return type from loadPagedModel explicit.
authorJames Turner <zakalawe@mac.com>
Sun, 23 Feb 2014 00:24:47 +0000 (16:24 -0800)
committerJames Turner <zakalawe@mac.com>
Sun, 23 Feb 2014 00:24:47 +0000 (16:24 -0800)
- 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.

simgear/scene/model/modellib.cxx
simgear/scene/model/modellib.hxx

index 8a55151090905f6eab95996d73406eed93c3da69..efbcd1361b2fb7af5f32fb308cfb742c2a7b0349 100644 (file)
@@ -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)
 {
index 7e8a5a8ed56ba675ad3c8d6c0ad0fa6a4065d3d7..cdd6d820440a50f6c337d0c04f79f4b45b42b5fe 100644 (file)
 #include <simgear/props/props.hxx>
 #include <simgear/misc/sg_path.hxx>
 
+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);