osgEarth 2.1.1
Public Member Functions | Public Attributes

BuildElevLayer Struct Reference

Collaboration diagram for BuildElevLayer:

List of all members.

Public Member Functions

void init (const TileKey &key, const MapFrame &mapf, const OSGTerrainOptions &opt, TileBuilder::SourceRepo &repo)
void execute ()

Public Attributes

TileKey _key
const MapFrame * _mapf
const OSGTerrainOptions * _opt
TileBuilder::SourceRepo * _repo

Detailed Description

Definition at line 93 of file TileBuilder.cpp.


Member Function Documentation

void BuildElevLayer::execute ( ) [inline]

Definition at line 103 of file TileBuilder.cpp.

    {
        const MapInfo& mapInfo = _mapf->getMapInfo();

        // Request a heightfield from the map, falling back on lower resolution tiles
        // if necessary (fallback=true)
        osg::ref_ptr<osg::HeightField> hf;
        bool isFallback = false;

        if ( _mapf->getHeightField( _key, true, hf, &isFallback, *_opt->elevationInterpolation() ) )
        {
            // Treat Plate Carre specially by scaling the height values. (There is no need
            // to do this with an empty heightfield)
            if ( mapInfo.isPlateCarre() )
            {
                HeightFieldUtils::scaleHeightFieldToDegrees( hf.get() );
            }

            // Put it in the repo
            osgTerrain::HeightFieldLayer* hfLayer = new osgTerrain::HeightFieldLayer( hf.get() );

            // Generate a locator.
            hfLayer->setLocator( GeoLocator::createForKey( _key, mapInfo ) );

            _repo->set( CustomElevLayer(hfLayer, isFallback) );
        }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void BuildElevLayer::init ( const TileKey &  key,
const MapFrame &  mapf,
const OSGTerrainOptions &  opt,
TileBuilder::SourceRepo &  repo 
) [inline]

Definition at line 95 of file TileBuilder.cpp.

    {
        _key  = key;
        _mapf = &mapf;
        _opt  = &opt;
        _repo = &repo;
    }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 131 of file TileBuilder.cpp.

Definition at line 132 of file TileBuilder.cpp.

Definition at line 133 of file TileBuilder.cpp.

Definition at line 134 of file TileBuilder.cpp.


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