#include "ellipsoidTechnique.h" #include ellipsoidTechnique::ellipsoidTechnique() { } ellipsoidTechnique::~ellipsoidTechnique() { } void ellipsoidTechnique::modifyHeightfield(osg::HeightField* h, double lat_min, double lat_max, double lon_min, double lon_max) { OSG_NOTIFY( osg::ALWAYS ) << "ellipsoidTechnique::modifyHeightfield()" << std::endl; OSG_NOTIFY( osg::ALWAYS ) << "LAT: " << lat_min << " | " << lat_max << std::endl; OSG_NOTIFY( osg::ALWAYS ) << "LON: " << lon_min << " | " << lon_max << std::endl; int rows = h->getNumRows(); int cols = h->getNumColumns(); // calculate colum start/end and row start/end of affected vertices int startX=0,startY=0,endX=cols,endY=rows; double roi_lat_min = 48.336808; double roi_lat_max = 48.370467; double roi_lon_min = 11.736750; double roi_lon_max = 11.835322; // dertermining loop variables if(lat_mingetYInterval(); if(lat_max>roi_lat_max) endY = (roi_lat_max - lat_min) / h->getYInterval(); if(lon_mingetXInterval(); if(lon_max>roi_lon_max) endX = (roi_lon_max - lon_min) / h->getXInterval(); // modify height value of affected vertices for(int x=startX;xsetHeight( x, y, 550); } } //OSG_NOTIFY( osg::ALWAYS ) << "Origin: " << h->getOrigin()[0] << " | " << h->getOrigin()[1] << std::endl; //OSG_NOTIFY( osg::ALWAYS ) << "X-Intervall: " << h->getXInterval() << std::endl; //OSG_NOTIFY( osg::ALWAYS ) << "Y-Intervall: " << h->getYInterval() << std::endl; //if(dest_lat_min<=lat_min && lat_max<=dest_lat_max && dest_lon_min<=lon_min && lon_max<=dest_lon_max) //{ // OSG_NOTIFY( osg::ALWAYS ) << "ModificationVisitor::modifyTile() :: affected Tile" << std::endl; // OSG_NOTIFY( osg::ALWAYS ) << "LAT: " << lat_min << " | " << lat_max << std::endl; // OSG_NOTIFY( osg::ALWAYS ) << "LON: " << lon_min << " | " << lon_max << std::endl; // h->setHeight( 0,0, 1000); //} //OpenThreads::Thread::microSleep( 50000 ); }