initial_state( NULL ),
locale( NULL ),
commands( new SGCommandMgr ),
- model_loader( NULL ),
+ model_lib( NULL ),
acmodel( NULL ),
model_mgr( NULL ),
channel_options_list( NULL ),
class SGCommandMgr;
class SGMagVar;
class SGMaterialLib;
-class SGModelLoader;
+class SGModelLib;
class SGPropertyNode;
class SGRoute;
class SGTime;
SGCommandMgr *commands;
- SGModelLoader * model_loader;
+ SGModelLib *model_lib;
FGAircraftModel *acmodel;
inline SGCommandMgr *get_commands () { return commands; }
- inline SGModelLoader * get_model_loader () { return model_loader; }
+ inline SGModelLib * get_model_lib () { return model_lib; }
- inline void set_model_loader (SGModelLoader * loader) {
- model_loader = loader;
+ inline void set_model_lib (SGModelLib *m) {
+ model_lib = m;
}
inline FGAircraftModel *get_aircraft_model () { return acmodel; }
#include <simgear/misc/sg_path.hxx>
#include <simgear/scene/material/matlib.hxx>
#include <simgear/scene/model/animation.hxx>
-#include <simgear/scene/model/loader.hxx>
#include <simgear/scene/model/location.hxx>
#include <simgear/scene/model/model.hxx>
+#include <simgear/scene/model/modellib.hxx>
#ifdef FG_USE_CLOUDS_3D
# include <simgear/sky/clouds3d/SkySceneLoader.hpp>
# include <simgear/sky/clouds3d/SkyUtil.hpp>
// Initialize the general model subsystem.
////////////////////////////////////////////////////////////////////
- globals->set_model_loader(new SGModelLoader);
+ globals->set_model_lib(new SGModelLib);
globals->set_model_mgr(new FGModelMgr);
globals->get_model_mgr()->init();
globals->get_model_mgr()->bind();
if ( strcmp(obj_filename,"repeat") != 0) {
ship_obj =
- globals->get_model_loader()->load_model( globals->get_fg_root(), obj_filename, globals->get_props(), globals->get_sim_time_sec() );
+ globals->get_model_lib()->load_model( globals->get_fg_root(), obj_filename, globals->get_props(), globals->get_sim_time_sec() );
}
if ( ship_obj != NULL ) {
#include <plib/netSocket.h>
#include <plib/sg.h>
-#include <simgear/scene/model/loader.hxx>
+#include <simgear/scene/model/modellib.hxx>
#include <Main/globals.hxx>
#include <Scenery/scenery.hxx>
// Flush the model loader so that it erases the model from its list of
// models.
- globals->get_model_loader()->flush();
+ globals->get_model_lib()->flush1();
// Assume that plib/ssg deletes the model and transform as their
// refcounts should be zero.
m_ModelTrans = new ssgTransform;
// Load the model
- m_Model = globals->get_model_loader()->load_model( globals->get_fg_root(),
- m_sModelName,
- globals->get_props(),
- globals->get_sim_time_sec() );
+ m_Model = globals->get_model_lib()->load_model( globals->get_fg_root(),
+ m_sModelName,
+ globals->get_props(),
+ globals->get_sim_time_sec() );
m_Model->clrTraversalMaskBits( SSGTRAV_HOT );
// Add model to transform
ssgTransform * pos = new ssgTransform;
pos->setTransform(mat);
- pos->addKid( object->get_random_model( globals->get_model_loader(),
+ pos->addKid( object->get_random_model( globals->get_model_lib(),
globals->get_fg_root(),
globals->get_props(),
globals->get_sim_time_sec() ) );
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/math/vector.hxx>
#include <simgear/misc/exception.hxx>
-#include <simgear/scene/model/loader.hxx>
+#include <simgear/scene/model/modellib.hxx>
#include <Main/globals.hxx>
#include <Main/fg_props.hxx>
try
{
ssgEntity *obj_model =
- globals->get_model_loader()->load_model( globals->get_fg_root(),
- dm->get_model_path(),
- globals->get_props(),
- globals->get_sim_time_sec() );
+ globals->get_model_lib()->load_model( globals->get_fg_root(),
+ dm->get_model_path(),
+ globals->get_props(),
+ globals->get_sim_time_sec() );
if ( obj_model != NULL ) {
dm->get_obj_trans()->addKid( obj_model );
}