]> git.mxchange.org Git - simgear.git/commitdiff
I missed committing t hese changes yesterday.
authorcurt <curt>
Fri, 16 May 2003 11:40:07 +0000 (11:40 +0000)
committercurt <curt>
Fri, 16 May 2003 11:40:07 +0000 (11:40 +0000)
simgear/scene/material/mat.cxx
simgear/scene/material/mat.hxx
simgear/scene/material/matmodel.cxx
simgear/scene/material/matmodel.hxx

index 2c45c322b26fbccf13321a93a6511d4edaa5e74a..480c7f7e8abf144c7367b045dfc6c2c3319d3f0e 100644 (file)
@@ -40,7 +40,6 @@ SG_USING_STD(map);
 #include <simgear/math/sg_random.h>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/misc/sgstream.hxx>
-#include <simgear/scene/model/modellib.hxx>
 
 #include "mat.hxx"
 
index fea29c55807634c892f2dd0eb598f903f6965edd..c98da2df5091be51a9ba96a830a95448ef2f5097 100644 (file)
@@ -38,7 +38,6 @@
 #include <plib/ssg.h>
 
 #include <simgear/props/props.hxx>
-#include <simgear/scene/model/modellib.hxx>
 
 #include "matmodel.hxx"
 
index 6bc8f6b45e34709e58eab0e6f2265e42bfa88b41..db47a66b04f7dea31c91bfcab1b394a9eebbc03b 100644 (file)
@@ -1,6 +1,6 @@
 // matmodel.cxx -- class to handle models tied to a material property
 //
-// Written by Curtis Olson, started May 1998.
+// Written by David Megginson, started May 1998.
 //
 // Copyright (C) 1998 - 2003  Curtis L. Olson  - curt@flightgear.org
 //
@@ -117,26 +117,26 @@ SGMatModel::~SGMatModel ()
 }
 
 int
-SGMatModel::get_model_count( SGModelLib *loader,
-                                   const string &fg_root,
-                                   SGPropertyNode *prop_root,
-                                   double sim_time_sec )
+SGMatModel::get_model_count( SGModelLib *modellib,
+                             const string &fg_root,
+                             SGPropertyNode *prop_root,
+                             double sim_time_sec )
 {
-  load_models( loader, fg_root, prop_root, sim_time_sec );
+  load_models( modellib, fg_root, prop_root, sim_time_sec );
   return _models.size();
 }
 
 inline void
-SGMatModel::load_models ( SGModelLib *loader,
-                                const string &fg_root,
-                                SGPropertyNode *prop_root,
-                                double sim_time_sec )
+SGMatModel::load_models ( SGModelLib *modellib,
+                          const string &fg_root,
+                          SGPropertyNode *prop_root,
+                          double sim_time_sec )
 {
                                // Load model only on demand
   if (!_models_loaded) {
     for (unsigned int i = 0; i < _paths.size(); i++) {
-      ssgEntity *entity = loader->load_model( fg_root, _paths[i],
-                                              prop_root, sim_time_sec );
+      ssgEntity *entity = modellib->load_model( fg_root, _paths[i],
+                                                prop_root, sim_time_sec );
       if (entity != 0) {
                                 // FIXME: this stuff can be handled
                                 // in the XML wrapper as well (at least,
@@ -164,22 +164,22 @@ SGMatModel::load_models ( SGModelLib *loader,
 
 ssgEntity *
 SGMatModel::get_model( int index,
-                               SGModelLib *loader,
-                               const string &fg_root,
-                               SGPropertyNode *prop_root,
-                               double sim_time_sec )
+                       SGModelLib *modellib,
+                       const string &fg_root,
+                       SGPropertyNode *prop_root,
+                       double sim_time_sec )
 {
-  load_models( loader, fg_root, prop_root, sim_time_sec ); // comment this out if preloading models
+  load_models( modellib, fg_root, prop_root, sim_time_sec ); // comment this out if preloading models
   return _models[index];
 }
 
 ssgEntity *
-SGMatModel::get_random_model( SGModelLib *loader,
-                                      const string &fg_root,
-                                      SGPropertyNode *prop_root,
-                                      double sim_time_sec )
+SGMatModel::get_random_model( SGModelLib *modellib,
+                              const string &fg_root,
+                              SGPropertyNode *prop_root,
+                              double sim_time_sec )
 {
-  load_models( loader, fg_root, prop_root, sim_time_sec ); // comment this out if preloading models
+  load_models( modellib, fg_root, prop_root, sim_time_sec ); // comment this out if preloading models
   int nModels = _models.size();
   int index = int(sg_random() * nModels);
   if (index >= nModels)
index a192259687147a2ce45693f63d02a4f11e8d3479..a0fba3ada66ef7b365fa7fccad327e6e4d9001f7 100644 (file)
 #include <plib/ssg.h>
 
 #include <simgear/props/props.hxx>
-#include <simgear/scene/model/modellib.hxx>
 
 SG_USING_STD(string);
 
 
 class SGMatModelGroup;
+class SGModelLib;
 
 
 /**
@@ -71,7 +71,7 @@ public:
      *
      * @return The number of variant models.
      */
-    int get_model_count( SGModelLib *loader,
+    int get_model_count( SGModelLib *modellib,
                          const string &fg_root,
                          SGPropertyNode *prop_root,
                          double sim_time_sec );
@@ -84,7 +84,7 @@ public:
      * @return The model.
      */
     ssgEntity *get_model( int index,
-                          SGModelLib *loader,
+                          SGModelLib *modellib,
                           const string &fg_root,
                           SGPropertyNode *prop_root,
                           double sim_time_sec );
@@ -95,7 +95,7 @@ public:
      *
      * @return A randomly select model from the variants.
      */
-    ssgEntity *get_random_model( SGModelLib *loader,
+    ssgEntity *get_random_model( SGModelLib *modellib,
                                  const string &fg_root,
                                  SGPropertyNode *prop_root,
                                  double sim_time_sec );
@@ -132,7 +132,7 @@ private:
      * This class uses lazy loading so that models won't be held
      * in memory for materials that are never referenced.
      */
-    void load_models( SGModelLib *loader,
+    void load_models( SGModelLib *modellib,
                       const string &fg_root,
                       SGPropertyNode *prop_root,
                       double sim_time_sec );