New method for material manager

parent 4938f97c
......@@ -48,6 +48,9 @@ namespace ITAGeo
*/
virtual const ITAGeo::IAcousticMaterial* GetMaterial( const std::string& sMaterialIdentifier ) const = 0;
//! Checks if material can be found
virtual bool HasMaterial( const std::string& sMaterialIdentifier ) const;
//! Add a material copy, if not already existant
/**
* @return True, if possible, false if already existing or manager is read-only
......
......@@ -23,6 +23,11 @@ ITAGeo::CMaterialManager::~CMaterialManager()
}
bool ITAGeo::CMaterialManager::HasMaterial( const std::string& sMaterialIdentifier ) const
{
return ( GetMaterial( sMaterialIdentifier ) != nullptr );
}
// Material directory
struct CMATFileMaterial
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment