|
osgEarth 2.1.1
|
Static Public Member Functions | |
| static TerrainEngineNode * | create (Map *map, const TerrainOptions &options) |
Factory class for creating terrain engine instances.
Definition at line 153 of file TerrainEngineNode.
| TerrainEngineNode * TerrainEngineNodeFactory::create | ( | Map * | map, |
| const TerrainOptions & | options | ||
| ) | [static] |
Definition at line 394 of file TerrainEngineNode.cpp.
{
TerrainEngineNode* result = 0L;
std::string driver = options.getDriver();
if ( driver.empty() )
driver = "osgterrain";
std::string driverExt = std::string( ".osgearth_engine_" ) + driver;
result = dynamic_cast<TerrainEngineNode*>( osgDB::readObjectFile( driverExt ) );
if ( result )
{
TerrainOptions terrainOptions( options );
result->validateTerrainOptions( terrainOptions );
//result->initialize( map, terrainOptions );
}
else
{
OE_WARN << "WARNING: Failed to load terrain engine 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