Changeset 913

Show
Ignore:
Timestamp:
05/27/08 19:16:39
Author:
robert
Message:

From John Vidar Larring, "With this fix the options --radius-equator and --radius-polar are no longer ignored when passed to VBP (osgdem), and it is possible to create the world in many different shapes.

Edited on VPB svn revision 911.

Files:
src/vpb/BuildOptions.cpp - Actual fix
src/vpb/Commandline.cpp - Display default values for radii when printing usage."

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vpb/BuildOptions.cpp

    r890 r913  
    197197void BuildOptions::setDestinationCoordinateSystemNode(osg::CoordinateSystemNode* cs) 
    198198{ 
     199    // Keep any settings from the already configured ellipsoid model 
     200    osg::ref_ptr<osg::EllipsoidModel> configuredEllipsoid = _destinationCoordinateSystem->getEllipsoidModel(); 
     201 
    199202    _destinationCoordinateSystem = cs; 
    200203     
     
    203206        if (_destinationCoordinateSystem->getEllipsoidModel()==0) 
    204207        { 
    205             _destinationCoordinateSystem->setEllipsoidModel(new osg::EllipsoidModel); 
     208            _destinationCoordinateSystem->setEllipsoidModel( configuredEllipsoid.get() ? configuredEllipsoid.get() : new osg::EllipsoidModel); 
    206209        } 
    207210         
  • trunk/src/vpb/Commandline.cpp

    r909 r913  
    460460    usage.addCommandLineOption("--whole-globe","Set the coordinates system for next texture or dem to represent the whole hemisphere of the earth."); 
    461461    usage.addCommandLineOption("--geocentric","Build a database in geocentric (i.e. whole earth) database."); 
    462     usage.addCommandLineOption("--radius-polar","Set the polar radius of the ellipsoid model when building a geocentric database."); 
    463     usage.addCommandLineOption("--radius-equator","Set the polar radius of the ellipsoid model when building a geocentric database."); 
     462    usage.addCommandLineOption("--radius-polar","Set the polar radius of the ellipsoid model when building a geocentric database.", "6356752.3142"); 
     463    usage.addCommandLineOption("--radius-equator","Set the polar radius of the ellipsoid model when building a geocentric database.", "6378137"); 
    464464    usage.addCommandLineOption("--spherical","Set the polar and equator radius both to the average of the two."); 
    465465    usage.addCommandLineOption("--range","");