/* -*-c++-*- osgVisual - Copyright (C) 2009-2011 Torben Dannhauer * * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.org website. * * osgVisual requires for some proprietary modules a license from the correspondig manufacturer. * You have to aquire licenses for all used proprietary modules. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * OpenSceneGraph Public License for more details. */ #include "ellipsoidTechnique.h" ellipsoidTechnique::ellipsoidTechnique() { _height = 0.0; } ellipsoidTechnique::~ellipsoidTechnique() { } void ellipsoidTechnique::modifyHeightfield(region& modificationROI, osg::HeightField* h, region tileExtends) { //OSG_NOTIFY( osg::ALWAYS ) << "ellipsoidTechnique::modifyHeightfield()" << std::endl; //OSG_NOTIFY( osg::ALWAYS ) << "LAT: " << tileExtends._lat_min << " | " << tileExtends._lat_max << std::endl; //OSG_NOTIFY( osg::ALWAYS ) << "LON: " << tileExtends._lon_min << " | " << tileExtends._lon_max << std::endl; // calculate colum start/end and row start/end of affected vertices int startX=0, startY=0, endX=h->getNumColumns(), endY=h->getNumRows(); // Determine loop variables.. if(tileExtends._lat_mingetYInterval()); if(tileExtends._lat_max>modificationROI._lat_max) endY = round((modificationROI._lat_max - tileExtends._lat_min) / h->getYInterval()); if(tileExtends._lon_mingetXInterval()); if(tileExtends._lon_max>modificationROI._lon_max) endX = round((modificationROI._lon_max - tileExtends._lon_min) / h->getXInterval()); // Modify height value of affected vertices for(int x=startX;xsetHeight( x, y, _height); } } }