return;
}
}
+
+bool SGMaterialLib::find( ssgSimpleState *state, string & material ) const
+{
+ bool found = false;
+ ssgSimpleState *state_mat;
+
+ material = "";
+
+ for( const_material_map_iterator iter = begin(); iter != end(); iter++ )
+ {
+ int nb_tex = (*iter).second->get_num();
+
+ // many textures per material
+ for( int i = 0; i < nb_tex; i++ )
+ {
+ // material state
+ state_mat = (*iter).second->get_state( i );
+
+ if( state_mat == state )
+ {
+ material = (*iter).first.c_str();
+ found = true;
+ break;
+ }
+ }
+
+ if( found )
+ break;
+ }
+
+ return found;
+}
+
material_map_iterator end() { return matlib.end(); }
const_material_map_iterator end() const { return matlib.end(); }
+ bool find( ssgSimpleState*, string & material ) const;
+
// Destructor
~SGMaterialLib ( void );
};