Added first stage of support for "--levels min max" in osgdem/osgTerrain where

this option controls which levels that an associated imager or DEM contributes
to the final model.
This commit is contained in:
Robert Osfield
2004-06-17 14:39:16 +00:00
parent 06aa06d686
commit 63aa9b857d
3 changed files with 68 additions and 13 deletions

View File

@@ -2416,12 +2416,18 @@ void DataSet::DestinationTile::readFrom(CompositeSource* sourceGraph)
for(CompositeSource::source_iterator itr(sourceGraph);itr.valid();++itr)
{
SourceData* data = (*itr)->getSourceData();
if (data)
Source* source = itr->get();
if (_level>=source->getMinLevel() && _level<=source->getMaxLevel())
{
std::cout<<"DataSet::DestinationTile::readFrom -> SourceData::read() "<<std::endl;
if (_imagery.valid()) data->read(*_imagery);
if (_terrain.valid()) data->read(*_terrain);
SourceData* data = (*itr)->getSourceData();
if (data)
{
std::cout<<"DataSet::DestinationTile::readFrom -> SourceData::read() "<<std::endl;
std::cout<<" destination._level="<<_level<<"\t"<<source->getMinLevel()<<"\t"<<source->getMaxLevel()<<std::endl;
if (_imagery.valid()) data->read(*_imagery);
if (_terrain.valid()) data->read(*_terrain);
}
}
}