From 32a6bd78d8bf143f40922f1a0bc7a88ea7706a7d Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 22 Feb 2014 16:24:47 -0800 Subject: [PATCH] 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. --- simgear/scene/model/modellib.cxx | 2 +- simgear/scene/model/modellib.hxx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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); -- 2.39.5