Changeset 260 for experimental/TerrainTest
- Timestamp:
- Feb 23, 2011, 8:12:55 PM (14 years ago)
- Location:
- experimental/TerrainTest
- Files:
-
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/TerrainTest/ModificationVisitor.cpp
r258 r260 49 49 50 50 // ROI to flatten 51 double dest_lat_min = 48.336808;52 double dest_lat_max = 48.370467;53 double dest_lon_min = 11.736750;54 double dest_lon_max = 11.835322;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; 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> dest_lat_min && lat_min<dest_lat_max // lat inside ROI64 && lon_max> dest_lon_min && lon_min<dest_lon_max ) // lon inside ROI63 if(lat_max>roi_lat_min && lat_min<roi_lat_max // lat inside ROI 64 && lon_max>roi_lon_min && lon_min<roi_lon_max ) // lon inside ROI 65 65 { 66 66 technique->modifyHeightfield(h, lat_min, lat_max, lon_min, lon_max); -
experimental/TerrainTest/ellipsoidTechnique.cpp
r258 r260 23 23 int startX=0,startY=0,endX=cols,endY=rows; 24 24 25 double roi_lat_min = 48.336808; 26 double roi_lat_max = 48.370467; 27 double roi_lon_min = 11.736750; 28 double roi_lon_max = 11.835322; 29 30 // dertermining loop variables 31 if(lat_min<roi_lat_min) 32 startY = (roi_lat_min - lat_min) / h->getYInterval(); 33 if(lat_max>roi_lat_max) 34 endY = (roi_lat_max - lat_min) / h->getYInterval(); 35 36 if(lon_min<roi_lon_min) 37 startX = (roi_lon_min - lon_min) / h->getXInterval(); 38 if(lon_max>roi_lon_max) 39 endX = (roi_lon_max - lon_min) / h->getXInterval(); 40 25 41 26 42 // modify height value of affected vertices 27 h->setHeight( 0,0, 600); 43 for(int x=startX;x<endX;x++) 44 { 45 for(int y=startY;y<endY;y++) 46 { 47 h->setHeight( x, y, 550); 48 } 49 } 50 28 51 29 52
Note: See TracChangeset
for help on using the changeset viewer.