Added support for --tile-image-size <size>, --tile-terrain-size <size> and --comment <string>

command line options into osgTerrain::DataSet + osgdem.
This commit is contained in:
Robert Osfield
2004-07-19 09:03:50 +00:00
parent 9885d15ff6
commit 0fb5733f13
3 changed files with 62 additions and 24 deletions

View File

@@ -2896,6 +2896,9 @@ DataSet::DataSet()
{
init();
_maximumTileImageSize = 256;
_maximumTileTerrainSize = 64;
_maximumVisiableDistanceOfTopLevel = 1e10;
_radiusToMaxVisibleDistanceRatio = 7.0f;
@@ -3266,15 +3269,11 @@ void DataSet::computeDestinationGraphFromSources(unsigned int numLevels)
osg::notify(osg::INFO)<<" yMin()"<<extents.yMin()<<" "<<extents.yMax()<<std::endl;
// then create the destinate graph accordingly.
unsigned int imageSize = 256;
unsigned int terrainSize = 64;
_destinationGraph = createDestinationGraph(0,
_intermediateCoordinateSystem.get(),
extents,
imageSize,
terrainSize,
_maximumTileImageSize,
_maximumTileTerrainSize,
0,
0,
0,
@@ -3534,6 +3533,12 @@ void DataSet::_writeRow(Row& row)
node = decorateWithCoordinateSystemNode(node.get());
}
if (!_comment.empty())
{
node->addDescription(_comment);
}
//std::string filename = cd->_name + _tileExtension;
std::string filename = _tileBasename+_tileExtension;
@@ -3599,6 +3604,11 @@ void DataSet::writeDestination()
_rootNode = decorateWithCoordinateSystemNode(_rootNode.get());
}
if (!_comment.empty())
{
_rootNode->addDescription(_comment);
}
osgDB::writeNodeFile(*_rootNode,filename);
}
else // _databaseType==PagedLOD_DATABASE