#pragma once #include "terrainModificationTechnique.h" terrainModificationTechnique::terrainModificationTechnique() { } terrainModificationTechnique::~terrainModificationTechnique() { } region::region(osg::HeightField& h) { _lat_min = h.getOrigin()[1]; _lat_max = _lat_min + h.getNumRows() * h.getYInterval(); _lon_min = h.getOrigin()[0]; _lon_max = _lon_min + h.getNumColumns() * h.getXInterval(); } bool region::isInside(region& outsider) { if( outsider._lat_min <= _lat_min && _lat_max <= outsider._lat_max && outsider._lon_min <= _lon_min && _lon_max <= outsider._lon_max ) return true; else return false; } bool region::isFullOrPartiallyInside(region& outsider) { if( outsider._lat_min < _lat_max && _lat_min < outsider._lat_max && outsider._lon_min < _lon_max && _lon_min < outsider._lon_max ) return true; else return false; }