]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/material/matmodel.cxx
Merge branch 'zan/stencil'
[simgear.git] / simgear / scene / material / matmodel.cxx
index 1b3204da5dd94c976b3c01c1559a1f729e399c49..bdad512eef0add5bf58e2d728169a8c15b20f7ef 100644 (file)
@@ -28,7 +28,7 @@
 #include <simgear/compiler.h>
 
 #include <map>
-SG_USING_STD(map);
+using std::map;
 
 #include <osg/AlphaFunc>
 #include <osg/Group>
@@ -37,6 +37,7 @@ SG_USING_STD(map);
 #include <osg/Transform>
 
 #include <simgear/debug/logstream.hxx>
+#include <simgear/math/SGMath.hxx>
 #include <simgear/math/sg_random.h>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/misc/sgstream.hxx>
@@ -46,28 +47,6 @@ SG_USING_STD(map);
 
 using namespace simgear;
 
-\f
-////////////////////////////////////////////////////////////////////////
-// Local static functions.
-////////////////////////////////////////////////////////////////////////
-
-/**
- * Internal method to test whether a file exists.
- *
- * TODO: this should be moved to a SimGear library of local file
- * functions.
- */
-static inline bool
-local_file_exists( const string& path ) {
-    sg_gzifstream in( path );
-    if ( ! in.is_open() ) {
-       return false;
-    } else {
-       return true;
-    }
-}
-
-
 \f
 ////////////////////////////////////////////////////////////////////////
 // Implementation of SGMatModel.
@@ -155,14 +134,6 @@ SGMatModel::load_models( SGPropertyNode *prop_root )
   _models_loaded = true;
 }
 
-osg::Node*
-SGMatModel::get_model( int index,
-                       SGPropertyNode *prop_root )
-{
-  load_models( prop_root ); // comment this out if preloading models
-  return _models[index].get();
-}
-
 osg::Node*
 SGMatModel::get_random_model( SGPropertyNode *prop_root )
 {