Changeset 621
- Timestamp:
- 04/05/07 16:10:41
- Files:
-
- trunk/Make/help.sh (modified) (1 diff)
- trunk/Make/makedefs (modified) (1 diff)
- trunk/Make/makedirdefs (modified) (1 diff)
- trunk/VisualStudio (added)
- trunk/VisualStudio/MUST_READ_ME.txt (added)
- trunk/VisualStudio/VirtualPlanetBuilder.dsw (added)
- trunk/VisualStudio/applications (added)
- trunk/VisualStudio/applications/osgdem (added)
- trunk/VisualStudio/applications/osgdem/osgdem.dsp (added)
- trunk/VisualStudio/collect_mangled_names.bat (added)
- trunk/VisualStudio/collect_mangled_names.js (added)
- trunk/VisualStudio/create_static_workspace.js (added)
- trunk/VisualStudio/fixup-vc6-dsps.pl (added)
- trunk/VisualStudio/osgPlugins (added)
- trunk/VisualStudio/osgPlugins/gdal (added)
- trunk/VisualStudio/osgPlugins/gdal/gdal.dsp (added)
- trunk/VisualStudio/reset-64bit-outdirs.pl (added)
- trunk/VisualStudio/vpb (added)
- trunk/VisualStudio/vpb/vpb.dsp (added)
- trunk/applications/osgdem/GNUmakefile (modified) (1 diff)
- trunk/applications/osgdem/GNUmakefile.inst (modified) (1 diff)
- trunk/applications/osgdem/osgdem.cpp (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Make/help.sh
r220 r621 125 125 above 'make' usage. For example, 126 126 127 make INST_LOCATION=/usr/local/OpenSceneGraph \\ 128 INST_SHARE=/usr/share/OpenSceneGraph \\ 127 make INST_LOCATION=/usr/local/bin \\ 129 128 install 130 129 trunk/Make/makedefs
r617 r621 95 95 INST_INCLUDE = $(INST_LOCATION)/include 96 96 INST_SHARE = $(INST_LOCATION)/share 97 INST_EXAMPLES = $(INST_SHARE)/OpenSceneGraph/bin 98 INST_SRC = $(INST_SHARE)/OpenSceneGraph/src 99 INST_DOC = $(INST_SHARE)/OpenSceneGraph/doc 100 INST_DATA = $(INST_SHARE)/OpenSceneGraph/data 101 INST_EXAMPLE_SRC = $(INST_SRC)/examples 97 INST_EXAMPLES = $(INST_LOCATION)/bin 102 98 LINK = ln -sf 103 99 INSTBINCMD = install -m 755 trunk/Make/makedirdefs
r617 r621 10 10 # Directories traversed in the TOPDIR/src directory 11 11 SRC_DIRS = \ 12 vpb 12 vpb \ 13 osgPlugins 13 14 14 15 ################################################################ trunk/applications/osgdem/GNUmakefile
r600 r621 5 5 osgdem.cpp\ 6 6 7 LIBS += -losgViewer -l osgTerrain-losgFX -losgText -losgGA -losgDB -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)7 LIBS += -losgViewer -lvpb -losgFX -losgText -losgGA -losgDB -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) 8 8 9 9 INSTFILES = \ trunk/applications/osgdem/GNUmakefile.inst
r600 r621 6 6 7 7 8 LIBS += -losgViewer -l osgTerrain-losgFX -losgDB -losgText -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)8 LIBS += -losgViewer -lvpb -losgFX -losgDB -losgText -losgUtil -losg $(GDAL_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) 9 9 10 10 EXEC = osgdem trunk/applications/osgdem/osgdem.cpp
r600 r621 36 36 #include <osg/Switch> 37 37 38 #include < osgTerrain/DataSet>38 #include <vpb/DataSet> 39 39 40 40 #include <iostream> … … 112 112 113 113 void processFile(std::string filename, 114 osgTerrain::DataSet::Source::Type type, 114 vpb::DataSet::Source::Type type, 115 vpb::DataSet::SpatialProperties::DataType dataType, 115 116 std::string currentCS, 116 117 osg::Matrixd &geoTransform, … … 119 120 bool minmaxLevelSet, unsigned int min_level, unsigned int max_level, 120 121 unsigned int layerNum, 121 osg::ref_ptr< osgTerrain::DataSet> dataset) {122 osg::ref_ptr<vpb::DataSet> dataset) { 122 123 123 124 if(filename.empty()) return; … … 125 126 if(osgDB::fileType(filename) == osgDB::REGULAR_FILE) { 126 127 127 osgTerrain::DataSet::Source* source = new osgTerrain::DataSet::Source(type, filename);128 vpb::DataSet::Source* source = new vpb::DataSet::Source(type, filename); 128 129 if (source) 129 130 { 131 // set type of data 132 source->_dataType = dataType; 133 130 134 if (!currentCS.empty()) 131 135 { 132 136 std::cout<<"source->setCoordySystem "<<currentCS<<std::endl; 133 source->setCoordinateSystemPolicy( osgTerrain::DataSet::Source::PREFER_CONFIG_SETTINGS);137 source->setCoordinateSystemPolicy(vpb::DataSet::Source::PREFER_CONFIG_SETTINGS); 134 138 source->setCoordinateSystem(currentCS); 135 139 } … … 139 143 std::cout<<"source->setGeoTransform "<<geoTransform<<std::endl; 140 144 source->setGeoTransformPolicy(geoTransformScale ? 141 osgTerrain::DataSet::Source::PREFER_CONFIG_SETTINGS_BUT_SCALE_BY_FILE_RESOLUTION :142 osgTerrain::DataSet::Source::PREFER_CONFIG_SETTINGS);145 vpb::DataSet::Source::PREFER_CONFIG_SETTINGS_BUT_SCALE_BY_FILE_RESOLUTION : 146 vpb::DataSet::Source::PREFER_CONFIG_SETTINGS); 143 147 source->setGeoTransform(geoTransform); 144 148 } … … 164 168 if((*i != ".") && (*i != "..")) { 165 169 fullfilename = filename + '/' + *i; 166 processFile(fullfilename, type, currentCS,170 processFile(fullfilename, type, dataType, currentCS, 167 171 geoTransform, geoTransformSet, geoTransformScale, 168 172 minmaxLevelSet, min_level, max_level, … … 211 215 arguments.getApplicationUsage()->addCommandLineOption("--RGB-16","Use 16bit RGBA destination imagery"); 212 216 arguments.getApplicationUsage()->addCommandLineOption("--RGBA","Use 32bit RGBA destination imagery"); 217 arguments.getApplicationUsage()->addCommandLineOption("--vector","Interpret input as a vector data set"); 218 arguments.getApplicationUsage()->addCommandLineOption("--raster","Interpret input as a raster data set (default)"); 213 219 arguments.getApplicationUsage()->addCommandLineOption("--max-visible-distance-of-top-level","Set the maximum visible distance that the top most tile can be viewed at"); 214 220 arguments.getApplicationUsage()->addCommandLineOption("--no-terrain-simplification","Switch off terrain simplification."); … … 235 241 arguments.getApplicationUsage()->addCommandLineOption("-O","string option to pass to write plugins, use \" \" for multiple options"); 236 242 // create DataSet. 237 osg::ref_ptr< osgTerrain::DataSet> dataset = new osgTerrain::DataSet;243 osg::ref_ptr<vpb::DataSet> dataset = new vpb::DataSet; 238 244 239 245 … … 241 247 while (arguments.read("-e",x,y,w,h)) 242 248 { 243 dataset->setDestinationExtents( osgTerrain::GeospatialExtents(x,y,x+w,y+h,false)); // FIXME - need to check whether we a geographic extents of not249 dataset->setDestinationExtents(vpb::GeospatialExtents(x,y,x+w,y+h,false)); // FIXME - need to check whether we a geographic extents of not 244 250 } 245 251 246 252 while (arguments.read("--HEIGHT_FIELD")) 247 253 { 248 dataset->setGeometryType( osgTerrain::DataSet::HEIGHT_FIELD);254 dataset->setGeometryType(vpb::DataSet::HEIGHT_FIELD); 249 255 } 250 256 251 257 while (arguments.read("--POLYGONAL")) 252 258 { 253 dataset->setGeometryType( osgTerrain::DataSet::POLYGONAL);259 dataset->setGeometryType(vpb::DataSet::POLYGONAL); 254 260 } 255 261 256 262 while (arguments.read("--LOD")) 257 263 { 258 dataset->setDatabaseType( osgTerrain::DataSet::LOD_DATABASE);264 dataset->setDatabaseType(vpb::DataSet::LOD_DATABASE); 259 265 } 260 266 261 267 while (arguments.read("--PagedLOD")) 262 268 { 263 dataset->setDatabaseType( osgTerrain::DataSet::PagedLOD_DATABASE);264 } 265 266 while (arguments.read("--compressed")) { dataset->setTextureType( osgTerrain::DataSet::COMPRESSED_TEXTURE); }267 while (arguments.read("--RGBA-compressed")) { dataset->setTextureType( osgTerrain::DataSet::COMPRESSED_RGBA_TEXTURE); }268 while (arguments.read("--RGB_16") || arguments.read("--RGB-16") ) { dataset->setTextureType( osgTerrain::DataSet::RGB_16); }269 while (arguments.read("--RGBA_16") || arguments.read("--RGBA-16") ) { dataset->setTextureType( osgTerrain::DataSet::RGBA_16); }270 while (arguments.read("--RGB_24") || arguments.read("--RGB-24") ) { dataset->setTextureType( osgTerrain::DataSet::RGB_24); }271 while (arguments.read("--RGBA") || arguments.read("--RGBA") ) { dataset->setTextureType( osgTerrain::DataSet::RGBA); }272 273 while (arguments.read("--no_mip_mapping") || arguments.read("--no-mip-mapping")) { dataset->setMipMappingMode( osgTerrain::DataSet::NO_MIP_MAPPING); }274 while (arguments.read("--mip_mapping_hardware") || arguments.read("--mip-mapping-hardware")) { dataset->setMipMappingMode( osgTerrain::DataSet::MIP_MAPPING_HARDWARE); }275 while (arguments.read("--mip_mapping_imagery") || arguments.read("--mip-mapping-imagery")) { dataset->setMipMappingMode( osgTerrain::DataSet::MIP_MAPPING_IMAGERY); }269 dataset->setDatabaseType(vpb::DataSet::PagedLOD_DATABASE); 270 } 271 272 while (arguments.read("--compressed")) { dataset->setTextureType(vpb::DataSet::COMPRESSED_TEXTURE); } 273 while (arguments.read("--RGBA-compressed")) { dataset->setTextureType(vpb::DataSet::COMPRESSED_RGBA_TEXTURE); } 274 while (arguments.read("--RGB_16") || arguments.read("--RGB-16") ) { dataset->setTextureType(vpb::DataSet::RGB_16); } 275 while (arguments.read("--RGBA_16") || arguments.read("--RGBA-16") ) { dataset->setTextureType(vpb::DataSet::RGBA_16); } 276 while (arguments.read("--RGB_24") || arguments.read("--RGB-24") ) { dataset->setTextureType(vpb::DataSet::RGB_24); } 277 while (arguments.read("--RGBA") || arguments.read("--RGBA") ) { dataset->setTextureType(vpb::DataSet::RGBA); } 278 279 while (arguments.read("--no_mip_mapping") || arguments.read("--no-mip-mapping")) { dataset->setMipMappingMode(vpb::DataSet::NO_MIP_MAPPING); } 280 while (arguments.read("--mip_mapping_hardware") || arguments.read("--mip-mapping-hardware")) { dataset->setMipMappingMode(vpb::DataSet::MIP_MAPPING_HARDWARE); } 281 while (arguments.read("--mip_mapping_imagery") || arguments.read("--mip-mapping-imagery")) { dataset->setMipMappingMode(vpb::DataSet::MIP_MAPPING_IMAGERY); } 276 282 277 283 float maxAnisotropy; … … 392 398 unsigned int min_level=0, max_level=maximumPossibleLevel; 393 399 unsigned int currentLayerNum = 0; 400 vpb::DataSet::SpatialProperties::DataType dataType = vpb::DataSet::SpatialProperties::RASTER; 394 401 395 402 int pos = 1; … … 400 407 if (arguments.read(pos, "--cs",def)) 401 408 { 402 currentCS = !def.empty() ? osgTerrain::DataSet::coordinateSystemStringToWTK(def) : "";409 currentCS = !def.empty() ? vpb::DataSet::coordinateSystemStringToWTK(def) : ""; 403 410 std::cout<<"--cs \""<<def<<"\" converted to "<<currentCS<<std::endl; 404 411 } … … 431 438 else if (arguments.read(pos, "--bluemarble-east")) 432 439 { 433 currentCS = osgTerrain::DataSet::coordinateSystemStringToWTK("WGS84");440 currentCS = vpb::DataSet::coordinateSystemStringToWTK("WGS84"); 434 441 geoTransformSet = true; 435 442 geoTransformScale = true; … … 442 449 else if (arguments.read(pos, "--bluemarble-west")) 443 450 { 444 currentCS = osgTerrain::DataSet::coordinateSystemStringToWTK("WGS84");451 currentCS = vpb::DataSet::coordinateSystemStringToWTK("WGS84"); 445 452 geoTransformSet = true; 446 453 geoTransformScale = true; … … 453 460 else if (arguments.read(pos, "--whole-globe")) 454 461 { 455 currentCS = osgTerrain::DataSet::coordinateSystemStringToWTK("WGS84");462 currentCS = vpb::DataSet::coordinateSystemStringToWTK("WGS84"); 456 463 geoTransformSet = true; 457 464 geoTransformScale = true; … … 566 573 } 567 574 575 else if (arguments.read(pos, "--vector")) 576 { 577 dataType = vpb::DataSet::SpatialProperties::VECTOR; 578 std::cout<<"--vector input data"<<std::endl; 579 } 580 581 else if (arguments.read(pos, "--raster")) 582 { 583 dataType = vpb::DataSet::SpatialProperties::RASTER; 584 std::cout<<"--raster input data"<<std::endl; 585 } 586 568 587 else if (arguments.read(pos, "-d",filename)) 569 588 { 570 589 std::cout<<"-d "<<filename<<std::endl; 571 processFile(filename, osgTerrain::DataSet::Source::HEIGHT_FIELD, currentCS,590 processFile(filename, vpb::DataSet::Source::HEIGHT_FIELD, dataType, currentCS, 572 591 geoTransform, geoTransformSet, geoTransformScale, 573 592 minmaxLevelSet, min_level, max_level, … … 583 602 geoTransformScale = false; 584 603 geoTransform.makeIdentity(); 585 604 dataType = vpb::DataSet::SpatialProperties::RASTER; 586 605 } 587 606 else if (arguments.read(pos, "-t",filename)) 588 607 { 589 608 std::cout<<"-t "<<filename<<std::endl; 590 processFile(filename, osgTerrain::DataSet::Source::IMAGE, currentCS,609 processFile(filename, vpb::DataSet::Source::IMAGE, dataType, currentCS, 591 610 geoTransform, geoTransformSet, geoTransformScale, 592 611 minmaxLevelSet, min_level, max_level, … … 602 621 geoTransformScale = false; 603 622 geoTransform.makeIdentity(); 623 dataType = vpb::DataSet::SpatialProperties::RASTER; 604 624 } 605 625 /* … … 607 627 { 608 628 std::cout<<"-m "<<filename<<std::endl; 609 processFile(filename, osgTerrain::DataSet::Source::MODEL, currentCS,629 processFile(filename, vpb::DataSet::Source::MODEL, currentCS, 610 630 geoTransform, geoTransformSet, geoTransformScale, 611 631 minmaxLevelSet, min_level, max_level,
