]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/material/matlib.hxx
Merge branch 'next' of git.gitorious.org:fg/simgear into next
[simgear.git] / simgear / scene / material / matlib.hxx
index 1407e44f5b3680a6745564b9cdc39435c0ea3dec..b3e8c9005427f3419f1ebb3eb24772f7edb24531 100644 (file)
 
 #include <simgear/structure/SGSharedPtr.hxx>
 
-#include STL_STRING            // Standard C++ string library
+#include <string>              // Standard C++ string library
 #include <map>                 // STL associative "array"
 #include <vector>              // STL "array"
 
-#include <osg/Node>
-#include <osg/StateSet>
+#include <osg/Geode>
 
 class SGMaterial;
+class SGPropertyNode;
 
-SG_USING_STD(string);
-SG_USING_STD(map);
-SG_USING_STD(vector);
-SG_USING_STD(less);
+using std::string;
+using std::map;
+using std::vector;
+using std::less;
+
+namespace simgear
+{
+class Effect;
+}
 
 // Material management class
 class SGMaterialLib {
@@ -65,13 +70,8 @@ public:
     SGMaterialLib ( void );
 
     // Load a library of material properties
-    bool load( const string &fg_root, const string& mpath, const char *season );
-
-    // Add the named texture with default properties
-    bool add_item( const string &tex_path );
-    bool add_item( const string &mat_name, const string &tex_path );
-    bool add_item( const string &mat_name, osg::StateSet *state );
-
+    bool load( const string &fg_root, const string& mpath,
+            SGPropertyNode *prop_root );
     // find a material record by material name
     SGMaterial *find( const string& material );
 
@@ -81,7 +81,7 @@ public:
     material_map_iterator end() { return matlib.end(); }
     const_material_map_iterator end() const { return matlib.end(); }
 
-    const SGMaterial* findMaterial(const osg::StateSet* stateSet) const;
+    static const SGMaterial* findMaterial(const osg::Geode* geode);
 
     // Destructor
     ~SGMaterialLib ( void );