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.
This commit is contained in:
@@ -152,7 +152,7 @@ SGModelLib::loadDeferredModel(const string &path, SGPropertyNode *prop_root,
|
|||||||
return proxyNode;
|
return proxyNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Node*
|
osg::PagedLOD*
|
||||||
SGModelLib::loadPagedModel(const string &path, SGPropertyNode *prop_root,
|
SGModelLib::loadPagedModel(const string &path, SGPropertyNode *prop_root,
|
||||||
SGModelData *data)
|
SGModelData *data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,10 @@
|
|||||||
#include <simgear/props/props.hxx>
|
#include <simgear/props/props.hxx>
|
||||||
#include <simgear/misc/sg_path.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
|
namespace osg {
|
||||||
|
class PagedLOD;
|
||||||
|
}
|
||||||
|
|
||||||
namespace simgear {
|
namespace simgear {
|
||||||
|
|
||||||
class SGModelData; // defined below
|
class SGModelData; // defined below
|
||||||
@@ -68,7 +72,7 @@ public:
|
|||||||
// the model file. Once the viewer steps onto that node the
|
// the model file. Once the viewer steps onto that node the
|
||||||
// model will be loaded. When the viewer does no longer reference this
|
// model will be loaded. When the viewer does no longer reference this
|
||||||
// node for a long time the node is unloaded again.
|
// 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,
|
SGPropertyNode *prop_root = NULL,
|
||||||
SGModelData *data=0);
|
SGModelData *data=0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user