]> git.mxchange.org Git - flightgear.git/commitdiff
Changes to track updates to SimGear.
authorcurt <curt>
Thu, 15 May 2003 21:35:51 +0000 (21:35 +0000)
committercurt <curt>
Thu, 15 May 2003 21:35:51 +0000 (21:35 +0000)
src/Main/globals.cxx
src/Main/globals.hxx
src/Main/main.cxx
src/MultiPlayer/mpplayer.cxx
src/Objects/userdata.cxx
src/Scenery/tilemgr.cxx

index 2b3c970c2648e8152f128e05af83b427df3aa0f1..fe526872e39dba1193c9c5dbd48d2e91758f5586 100644 (file)
@@ -69,7 +69,7 @@ FGGlobals::FGGlobals() :
     initial_state( NULL ),
     locale( NULL ),
     commands( new SGCommandMgr ),
-    model_loader( NULL ),
+    model_lib( NULL ),
     acmodel( NULL ),
     model_mgr( NULL ),
     channel_options_list( NULL ),
index 905752c6dfe092ab9662e0d70581ddbeb7e031a9..38fb0f4c55eeb2edc96c5c7cafc0885a21ec31d6 100644 (file)
@@ -53,7 +53,7 @@ class SGEphemeris;
 class SGCommandMgr;
 class SGMagVar;
 class SGMaterialLib;
-class SGModelLoader;
+class SGModelLib;
 class SGPropertyNode;
 class SGRoute;
 class SGTime;
@@ -163,7 +163,7 @@ private:
 
     SGCommandMgr *commands;
 
-    SGModelLoader * model_loader;
+    SGModelLib *model_lib;
 
     FGAircraftModel *acmodel;
 
@@ -282,10 +282,10 @@ public:
 
     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; }
index 24f294a6e19b7a108b1b6828c08725e46edeafdc..93e2f43dca7eb0b7b2b55157ee7c88fb51ba817d 100644 (file)
@@ -79,9 +79,9 @@ SG_USING_STD(endl);
 #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>
@@ -1698,7 +1698,7 @@ static bool fgMainInit( int argc, char **argv ) {
     // 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();
@@ -1934,7 +1934,7 @@ void fgLoadDCS(void) {
 
                 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 ) {
index a57103f2940c1fade755588fab0752596a6d3add..783ddce9e655b3a5d4106a8562d1c21b2db4226d 100644 (file)
@@ -52,7 +52,7 @@
 #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>
@@ -141,7 +141,7 @@ void MPPlayer::Close(void) {
 
         // 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.
@@ -247,10 +247,10 @@ void MPPlayer::LoadModel(void) {
     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
index a018c8cbe3b4dc394741916a5a0da0c8a9c62e01..781edb4797dbb6cd9fb9871a223132f64841e57c 100644 (file)
@@ -102,7 +102,7 @@ void TriUserData::add_object_to_triangle (SGMatModel * object)
 
     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() ) );
index 47e72427e9f74910529f97b39c4025791cb00d71..84f4152695929c3380814a18bab5b3ee89578d28 100644 (file)
@@ -34,7 +34,7 @@
 #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>
@@ -281,10 +281,10 @@ void FGTileMgr::update_queues()
         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 );
             }