osgEarth 2.1.1
Static Public Member Functions

osgEarth::TerrainEngineNodeFactory Class Reference

List of all members.

Static Public Member Functions

static TerrainEngineNodecreate (Map *map, const TerrainOptions &options)

Detailed Description

Factory class for creating terrain engine instances.

Definition at line 153 of file TerrainEngineNode.


Member Function Documentation

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:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines