Changeset 260


Ignore:
Timestamp:
Feb 23, 2011, 8:12:55 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
experimental/TerrainTest
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • experimental/TerrainTest/ModificationVisitor.cpp

    r258 r260  
    4949
    5050        // 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;
    5555
    5656        // Determine extend of the tile.
     
    6161
    6262        // Check if tile is fully or partially inside ROI:
    63         if(lat_max>dest_lat_min && lat_min<dest_lat_max                 // lat inside ROI
    64                 && lon_max>dest_lon_min && lon_min<dest_lon_max )       // lon inside ROI
     63        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
    6565        {
    6666                technique->modifyHeightfield(h, lat_min, lat_max, lon_min, lon_max);
  • experimental/TerrainTest/ellipsoidTechnique.cpp

    r258 r260  
    2323        int startX=0,startY=0,endX=cols,endY=rows;
    2424
     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
    2541
    2642        // 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       
    2851
    2952
Note: See TracChangeset for help on using the changeset viewer.