#pragma once /* -*-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 /** * \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: //! Constructor: Plain constructor, you have to set the extend manually. region() : _lat_min(0.0), _lat_max(0.0), _lon_min(0.0), _lon_max(0.0) {}; //! Destructor: Empty ~region(){}; //! Constructor: Constructed with the specified extend region( double lat_min, double lat_max, double lon_min, double lon_max) : _lat_min(lat_min), _lat_max(lat_max), _lon_min(lon_min), _lon_max(lon_max) {}; region( osg::HeightField& h ); bool isInside(region& outsider); bool isFullOrPartiallyInside(region& outsider); double delta_lat(){return(_lat_max-_lat_min);} double delta_lon(){return(_lon_max-_lon_min);} double _lat_min; double _lat_max; double _lon_min; double _lon_max; } ;