|
osgEarth 2.1.1
|
Static Public Member Functions | |
| static TileSource * | create (const TileSourceOptions &options) |
Creates TileSource instances and chains them together to create tile source "pipelines" for data access and processing.
Definition at line 404 of file TileSource.
| TileSource * TileSourceFactory::create | ( | const TileSourceOptions & | options | ) | [static] |
Definition at line 392 of file TileSource.cpp.
{
TileSource* result = 0L;
std::string driver = options.getDriver();
if ( driver.empty() )
{
OE_WARN << "ILLEGAL- no driver set for tile source" << std::endl;
return 0L;
}
osg::ref_ptr<osgDB::ReaderWriter::Options> rwopt = new osgDB::ReaderWriter::Options();
rwopt->setPluginData( TILESOURCEOPTIONS_TAG, (void*)&options );
std::string driverExt = std::string( ".osgearth_" ) + driver;
result = dynamic_cast<TileSource*>( osgDB::readObjectFile( driverExt, rwopt.get() ) );
if ( !result )
{
OE_WARN << "WARNING: Failed to load TileSource driver for \"" << driver << "\"" << std::endl;
}
return result;
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.3