|
osgEarth 2.1.1
|
Collaboration diagram for BuildColorLayer:Public Member Functions | |
| void | init (const TileKey &key, ImageLayer *layer, const MapInfo &mapInfo, const OSGTerrainOptions &opt, TileBuilder::SourceRepo &repo) |
| void | execute () |
Public Attributes | |
| TileKey | _key |
| const MapInfo * | _mapInfo |
| ImageLayer * | _layer |
| const OSGTerrainOptions * | _opt |
| TileBuilder::SourceRepo * | _repo |
Definition at line 31 of file TileBuilder.cpp.
| void BuildColorLayer::execute | ( | ) | [inline] |
Definition at line 43 of file TileBuilder.cpp.
{
GeoImage geoImage;
bool isFallbackData = false;
// fetch the image from the layer, falling back on parent keys utils we are
// able to find one that works.
TileKey imageKey( _key );
while( !geoImage.valid() && imageKey.valid() && _layer->isKeyValid(imageKey) )
{
geoImage = _layer->createImage( imageKey, 0L ); // TODO: include a progress callback?
if ( !geoImage.valid() )
{
imageKey = imageKey.createParentKey();
isFallbackData = true;
}
}
GeoLocator* locator = 0L;
if ( !geoImage.valid() )
{
// no image found, so make an empty one (one pixel alpha).
geoImage = GeoImage( ImageUtils::createEmptyImage(), _key.getExtent() );
locator = GeoLocator::createForKey( _key, *_mapInfo );
isFallbackData = true;
}
else
{
locator = GeoLocator::createForExtent(geoImage.getExtent(), *_mapInfo);
}
// add the color layer to the repo.
_repo->add( CustomColorLayer(
_layer,
geoImage.getImage(),
locator,
_key.getLevelOfDetail(),
_key,
isFallbackData ) );
}
Here is the call graph for this function:
Here is the caller graph for this function:| void BuildColorLayer::init | ( | const TileKey & | key, |
| ImageLayer * | layer, | ||
| const MapInfo & | mapInfo, | ||
| const OSGTerrainOptions & | opt, | ||
| TileBuilder::SourceRepo & | repo | ||
| ) | [inline] |
Definition at line 84 of file TileBuilder.cpp.
Definition at line 86 of file TileBuilder.cpp.
| const MapInfo* BuildColorLayer::_mapInfo |
Definition at line 85 of file TileBuilder.cpp.
Definition at line 87 of file TileBuilder.cpp.
Definition at line 88 of file TileBuilder.cpp.
1.7.3