source: experimental/TerrainTest/region.h

Last change on this file was 272, checked in by Torben Dannhauer, 13 years ago
File size: 1.8 KB
Line 
1#pragma once
2/* -*-c++-*- osgVisual - Copyright (C) 2009-2011 Torben Dannhauer
3 *
4 * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version.  The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
10 * You have to aquire licenses for all used proprietary modules.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * OpenSceneGraph Public License for more details.
16*/
17
18#include <osgTerrain/TerrainTile>
19
20/**
21 * \brief This class defines the extends of a region. This region is a square and is defined by the latitude and longitude range
22 *
23 * @author Torben Dannhauer
24 * @date  Mrz 2011
25 */ 
26class region : public osg::Referenced
27{
28public:
29        //! Constructor: Plain constructor, you have to set the extend manually.
30        region() : _lat_min(0.0), _lat_max(0.0), _lon_min(0.0), _lon_max(0.0) {};
31
32        //! Destructor: Empty
33        ~region(){};
34
35        //! Constructor: Constructed with the specified extend
36        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) {};
37        region( osg::HeightField& h );
38        bool isInside(region& outsider);
39        bool isFullOrPartiallyInside(region& outsider);
40        double delta_lat(){return(_lat_max-_lat_min);}
41        double delta_lon(){return(_lon_max-_lon_min);}
42        double _lat_min;
43        double _lat_max;
44        double _lon_min;
45        double _lon_max;
46} ;
Note: See TracBrowser for help on using the repository browser.