|
osgEarth 2.1.1
|
Static Public Member Functions | |
| static MaskSource * | create (const MaskSourceOptions &options) |
Definition at line 98 of file MaskSource.
| MaskSource * MaskSourceFactory::create | ( | const MaskSourceOptions & | options | ) | [static] |
Definition at line 64 of file MaskSource.cpp.
{
MaskSource* source = 0L;
if ( !options.getDriver().empty() )
{
std::string driverExt = std::string(".osgearth_mask_") + options.getDriver();
osg::ref_ptr<osgDB::ReaderWriter::Options> rwopts = new osgDB::ReaderWriter::Options();
rwopts->setPluginData( MASK_SOURCE_OPTIONS_TAG, (void*)&options );
source = dynamic_cast<MaskSource*>( osgDB::readObjectFile( driverExt, rwopts.get() ) );
if ( source )
{
OE_INFO << "Loaded MaskSource driver \"" << options.getDriver() << "\" OK" << std::endl;
}
else
{
OE_WARN << "FAIL, unable to load MaskSource driver for \"" << options.getDriver() << "\"" << std::endl;
}
}
else
{
OE_WARN << LC << "FAIL, illegal null driver specification" << std::endl;
}
return source;
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.3