Changeset 256 for experimental
- Timestamp:
- Feb 21, 2011, 9:36:05 PM (14 years ago)
- Location:
- experimental/TerrainTest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/TerrainTest/ModificationVisitor.cpp
r255 r256 1 1 #include "ModificationVisitor.h" 2 3 using namespace osgTerrain; 2 4 3 5 ModificationVisitor::ModificationVisitor(std::string extensionToSet) : _extensionToSet(extensionToSet) … … 12 14 if(std::string(node.className())=="TerrainTile") 13 15 { 14 OSG_NOTIFY( osg::ALWAYS ) << "ModVisitor: Tile found" << std::endl; 15 modifyTile(node); 16 //OSG_NOTIFY( osg::ALWAYS ) << "ModVisitor: Tile found" << std::endl; 17 osgTerrain::TerrainTile* tile = dynamic_cast<osgTerrain::TerrainTile*>(&node); 18 if(tile) 19 modifyTile(tile); 16 20 } 17 21 … … 37 41 } 38 42 39 void ModificationVisitor::modifyTile(osg ::Node& node)43 void ModificationVisitor::modifyTile(osgTerrain::TerrainTile* tile) 40 44 { 41 OSG_NOTIFY( osg::ALWAYS ) << "ModificationVisitor::modifyTerrain()" << std::endl; 45 OSG_NOTIFY( osg::ALWAYS ) << "ModificationVisitor::modifyTile()" << std::endl; 46 OpenThreads::Thread::microSleep( 500000 ); 42 47 43 48 HeightFieldLayer* hfl = dynamic_cast<HeightFieldLayer*>(tile->getElevationLayer()); 49 osg::HeightField* h = hfl->getHeightField(); 50 OSG_NOTIFY( osg::ALWAYS ) << "Origin: " << h->getOrigin()[0] <<" | "<<h->getOrigin()[1]<<" | "<<h->getOrigin()[2] << std::endl; 51 OSG_NOTIFY( osg::ALWAYS ) << "X-Intervall: " << h->getXInterval() << std::endl; 52 OSG_NOTIFY( osg::ALWAYS ) << "Y-Intervall: " << h->getYInterval() << std::endl; 44 53 45 54 55 // Determine if tile touches ROI 46 56 47 OpenThreads::Thread::microSleep( 500000 ); 57 // calculate colum start/end and row start/end of affected vertices 58 59 // modify height value of affected vertices 48 60 } -
experimental/TerrainTest/ModificationVisitor.h
r255 r256 5 5 #include <osg/PagedLOD> 6 6 #include <osgTerrain/TerrainTile> 7 #include <osgTerrain/Layer> 7 8 8 9 … … 15 16 16 17 private: 17 void modifyTile(osg ::Node& node);18 void modifyTile(osgTerrain::TerrainTile* tile); 18 19 std::string _extensionToSet; 19 20 }; -
experimental/TerrainTest/Plugins terrainmod/Plugins terrainmod.vcproj
r253 r256 62 62 Name="VCLinkerTool" 63 63 LinkLibraryDependencies="false" 64 AdditionalDependencies="osg DBd.lib osgd.lib OpenThreadsd.lib"64 AdditionalDependencies="osgTerraind.lib osgDBd.lib osgd.lib OpenThreadsd.lib" 65 65 OutputFile="$(OSG_ROOT)\bin\osgPlugins-2.9.11\osgdb_terrainmodd.dll" 66 66 Version="0.0" … … 138 138 Name="VCLinkerTool" 139 139 LinkLibraryDependencies="false" 140 AdditionalDependencies="osg DB.lib osg.lib OpenThreads.lib"140 AdditionalDependencies="osgTerrain.lib osgDB.lib osg.lib OpenThreads.lib" 141 141 OutputFile="$(OSG_ROOT)\bin\osgPlugins-2.9.11\osgdb_terrainmod.dll" 142 142 Version="0.0"
Note: See TracChangeset
for help on using the changeset viewer.