#pragma once #include #include #include /** * \brief This class defines the extends of a region. This region is a square and is defined by the latitude and longitude range * * @author Torben Dannhauer * @date Mrz 2011 */ class region : public osg::Referenced { public: region(); ~region(){}; region( double lat_min, double lat_max, double lon_min, double lon_max); bool isInside(region& outsider); bool isFullOrPartiallyInside(region& outsider); double delta_lat(){return(_lat_max-_lat_max);} double delta_lon(){return(_lon_max-_lon_max);} double _lat_min; double _lat_max; double _lon_min; double _lon_max; } ; /** * \brief This class is the interface definition class for modifying terrain data. Must be subclassed to implement own terrain modification techniques. * * @author Torben Dannhauer * @date Feb 2011 */ class terrainModificationTechnique : public osg::Referenced { public: terrainModificationTechnique(); virtual ~terrainModificationTechnique(); /** * \brief This function performs the terrain data modification. Must be subclassed. * * @param modificationROI This vector contains the extents of the region of interest which should be modified: lat_min, lat_max, long_min, long_max * @param h : Heightfield of the tile which should be modified * @param tileExtends : This vector contains the extents of the tile: lat_min, lat_max, long_min, long_max */ virtual void modifyHeightfield(region& modificationROI, osg::HeightField* h, region tileExtends)=0; protected: void clampValue(double& value, double min, double max){if(valuemax)value=max;} void clampValue(int& value, int min, int max){if(valuemax)value=max;} };