Blow away unused SGMaterialLib::add_item functions

This commit is contained in:
timoore
2009-07-15 23:08:42 +00:00
committed by Tim Moore
parent d14755abb8
commit 0793c2cb8c
2 changed files with 0 additions and 48 deletions

View File

@@ -115,48 +115,6 @@ bool SGMaterialLib::load( const string &fg_root, const string& mpath,
return true;
}
// Load a library of material properties
bool SGMaterialLib::add_item ( const string &tex_path )
{
string material_name = tex_path;
int pos = tex_path.rfind( "/" );
material_name = material_name.substr( pos + 1 );
return add_item( material_name, tex_path );
}
// Load a library of material properties
bool SGMaterialLib::add_item ( const string &mat_name, const string &full_path )
{
int pos = full_path.rfind( "/" );
string tex_name = full_path.substr( pos + 1 );
string tex_path = full_path.substr( 0, pos );
SG_LOG( SG_TERRAIN, SG_INFO, " Loading material "
<< mat_name << " (" << full_path << ")");
matlib[mat_name] = new SGMaterial( full_path );
matlib[mat_name]->add_name(mat_name);
return true;
}
// Load a library of material properties
bool SGMaterialLib::add_item ( const string &mat_name, osg::StateSet *state )
{
matlib[mat_name] = new SGMaterial( state );
matlib[mat_name]->add_name(mat_name);
SG_LOG( SG_TERRAIN, SG_INFO, " Loading material given a premade "
<< "osg::StateSet = " << mat_name );
return true;
}
// find a material record by material name
SGMaterial *SGMaterialLib::find( const string& material ) {
SGMaterial *result = NULL;

View File

@@ -68,12 +68,6 @@ public:
// Load a library of material properties
bool load( const string &fg_root, const string& mpath,
SGPropertyNode *prop_root );
// 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 );
// find a material record by material name
SGMaterial *find( const string& material );