|
osgEarth 2.1.1
|
Collaboration diagram for BuildElevLayer: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 |
Definition at line 93 of file TileBuilder.cpp.
| 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 131 of file TileBuilder.cpp.
| const MapFrame* BuildElevLayer::_mapf |
Definition at line 132 of file TileBuilder.cpp.
Definition at line 133 of file TileBuilder.cpp.
Definition at line 134 of file TileBuilder.cpp.
1.7.3