Changeset 798
- Timestamp:
- 12/18/07 17:08:43
- Files:
-
- trunk/src/vpb/BuildOptions.cpp (modified) (1 diff)
- trunk/src/vpb/Commandline.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/vpb/BuildOptions.cpp
r785 r798 32 32 _defaultColor.set(0.5f,0.5f,1.0f,1.0f); 33 33 _destinationCoordinateSystemString = ""; 34 _destinationCoordinateSystem = new osg::CoordinateSystemNode; _destinationCoordinateSystem->setEllipsoidModel(new osg::EllipsoidModel); 34 _destinationCoordinateSystem = new osg::CoordinateSystemNode; 35 _destinationCoordinateSystem->setEllipsoidModel(new osg::EllipsoidModel); 35 36 _directory = ""; 36 37 _geometryType = POLYGONAL; trunk/src/vpb/Commandline.cpp
r794 r798 422 422 usage.addCommandLineOption("--bluemarble-west","Set the coordinates system for next texture or dem to represent the western hemisphere of the earth."); 423 423 usage.addCommandLineOption("--whole-globe","Set the coordinates system for next texture or dem to represent the whole hemisphere of the earth."); 424 usage.addCommandLineOption("--geocentric",""); 424 usage.addCommandLineOption("--geocentric","Build a database in geocentric (i.e. whole earth) database."); 425 usage.addCommandLineOption("--radius-polar","Set the polar radius of the ellipsoid model when building a geocentric database."); 426 usage.addCommandLineOption("--radius-equator","Set the polar radius of the ellipsoid model when building a geocentric database."); 427 usage.addCommandLineOption("--spherical","Set the polar and equator radius both to the average of the two."); 425 428 usage.addCommandLineOption("--range",""); 426 429 usage.addCommandLineOption("--xx",""); … … 617 620 } 618 621 622 while (arguments.read("--geocentric")) 623 { 624 buildOptions->setConvertFromGeographicToGeocentric(true); 625 fout<<"--geocentric "<<currentCS<<std::endl; 626 } 627 628 double radius; 629 while (arguments.read("--radius-polar", radius)) 630 { 631 osg::EllipsoidModel* ellipsoid = buildOptions->getEllipsoidModel(); 632 ellipsoid->setRadiusPolar(radius); 633 } 634 635 while (arguments.read("--radius-equator", radius)) 636 { 637 osg::EllipsoidModel* ellipsoid = buildOptions->getEllipsoidModel(); 638 ellipsoid->setRadiusEquator(radius); 639 } 640 641 while (arguments.read("--spherical")) 642 { 643 osg::EllipsoidModel* ellipsoid = buildOptions->getEllipsoidModel(); 644 double radius = (ellipsoid->getRadiusPolar() + ellipsoid->getRadiusEquator())*0.5; 645 ellipsoid->setRadiusPolar(radius); 646 ellipsoid->setRadiusEquator(radius); 647 fout<<"--spherical, new radius set to "<<radius<<std::endl; 648 } 649 650 619 651 std::string str; 620 652 while (arguments.read("--default-color",str) || … … 705 737 } 706 738 } 707 else if (arguments.read(pos, "--geocentric"))708 {709 buildOptions->setConvertFromGeographicToGeocentric(true);710 fout<<"--geocentric "<<currentCS<<std::endl;711 }712 713 739 else if (arguments.read(pos, "--bluemarble-east")) 714 740 {
