osgEarth 2.1.1

/home/cube/sources/osgearth/src/osgEarthDrivers/arcgis/Extent.h

Go to the documentation of this file.
00001 /* -*-c++-*- */
00002 /* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
00003  * Copyright 2008-2010 Pelican Mapping
00004  * http://osgearth.org
00005  *
00006  * osgEarth is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU Lesser General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public License
00017  * along with this program.  If not, see <http://www.gnu.org/licenses/>
00018  */
00019 
00020 #ifndef OSGEARTH_ARCGIS_EXTENT_H
00021 #define OSGEARTH_ARCGIS_EXTENT_H 1
00022 
00023 class Extent 
00024 {
00025 public:
00026     Extent() :
00027       is_valid(false) { }
00028 
00029       Extent( double _xmin, double _ymin, double _xmax, double _ymax, const std::string& _srs ) :
00030       xmin(_xmin), ymin(_ymin), xmax(_xmax), ymax(_ymax), srs_str(_srs), is_valid(true) { }
00031 
00032       Extent( const Extent& rhs ) :
00033       xmin(rhs.xmin), ymin(rhs.ymin), xmax(rhs.xmax), ymax(rhs.ymax), srs_str(rhs.srs_str), is_valid(rhs.is_valid) { }
00034 
00035       double xMin() const { return xmin; }
00036       double yMin() const { return ymin; }
00037       double xMax() const { return xmax; }
00038       double yMax() const { return ymax; }
00039 
00040       const std::string& srs() { return srs_str; }
00041 
00042       bool isValid() const { return is_valid; }
00043 
00044 private:
00045     double xmin, ymin, xmax, ymax;
00046     std::string srs_str;
00047     bool is_valid;
00048 };
00049 
00050 #endif // OSGEARTH_ARCGIS_EXTENT_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines