- virtual ssgEntity *load_model( const string &fg_root,
- const string &path,
- SGPropertyNode *prop_root,
- double sim_time_sec );
+ // Load a 3D model (any format) through the DatabasePager.
+ // 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* 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::PagedLOD* loadPagedModel(const std::string &path,
+ SGPropertyNode *prop_root = NULL,
+ SGModelData *data=0);
+
+ static std::string findDataFile(const std::string& file,
+ const osgDB::Options* opts = NULL,
+ SGPath currentDir = SGPath());