Changeset 262 for experimental/TerrainTest/ModificationVisitor.cpp
- Timestamp:
- Feb 25, 2011, 11:01:49 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/TerrainTest/ModificationVisitor.cpp
r260 r262 6 6 { 7 7 setTraversalMode( osg::NodeVisitor::TRAVERSE_ALL_CHILDREN ); 8 technique = new ellipsoidTechnique(); 8 _technique = new ellipsoidTechnique(); 9 10 // Set ROI to flatten and estimated height after correction 11 _technique->setModifiedHeight(450); 9 12 } 10 13 … … 49 52 50 53 // ROI to flatten 51 double roi_lat_min = 48.336808; 52 double roi_lat_max = 48.370467; 53 double roi_lon_min = 11.736750; 54 double roi_lon_max = 11.835322; 54 osg::Vec4d modificationROI = osg::Vec4d( 48.336808, 48.370467, 11.736750, 11.835322 ); // roi_lat_min, roi_lat_max, roi_lon_min, roi_lon_max 55 55 56 56 // Determine extend of the tile. … … 61 61 62 62 // Check if tile is fully or partially inside ROI: 63 if(lat_max> roi_lat_min && lat_min<roi_lat_max // lat inside ROI64 && lon_max> roi_lon_min && lon_min<roi_lon_max ) // lon inside ROI63 if(lat_max>modificationROI[0] && lat_min<modificationROI[1] // lat inside ROI? 64 && lon_max>modificationROI[2] && lon_min<modificationROI[3] ) // lon inside ROI? 65 65 { 66 technique->modifyHeightfield(h, lat_min, lat_max, lon_min, lon_max);66 _technique->modifyHeightfield( modificationROI, h, osg::Vec4d(lat_min, lat_max, lon_min, lon_max) ); 67 67 } 68 68 }
Note: See TracChangeset
for help on using the changeset viewer.