osgEarth 2.1.1

/home/cube/sources/osgearth/src/osgEarthDrivers/engine_seamless/Geographic

Go to the documentation of this file.
00001 /* -*-c++-*- */
00002 /* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
00003  * Copyright 2008-2009 Pelican Ventures, Inc.
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 #ifndef SEAMLESS_GEOGRAPHIC
00020 #define SEAMLESS_GEOGRAPHIC 1
00021 
00022 #include <vector>
00023 
00024 #include <osg/CoordinateSystemNode>
00025 #include <osg/MatrixTransform>
00026 #include <osg/Vec3d>
00027 
00028 #include <osgEarth/GeoData>
00029 #include <osgEarth/Map>
00030 #include <osgEarth/TaskService>
00031 #include <osgEarth/TileKey>
00032 
00033 #include "PatchSet"
00034 #include "Euler"
00035 
00036 namespace seamless
00037 {
00038 class Geographic : public PatchSet
00039 {
00040 public:
00041     Geographic(const osgEarth::Map* map,
00042                const osgEarth::Drivers::SeamlessOptions& options);
00043     Geographic(const Geographic& rhs,
00044                const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
00045     META_Object(seamless, PatchSet);
00046     virtual ~Geographic();
00047     virtual osg::Node* createPatchGroup(const std::string& filename,
00048                                         PatchOptions* poptions);
00049     virtual osg::Transform* createPatch(const std::string& filename,
00050                                         PatchOptions* poptions);
00051     virtual osg::Node* createPatchSetGraph(const std::string& filename);
00052     virtual osg::Node* createChild(const PatchOptions* parentOptions, int childNum);
00053     osgEarth::Profile* getProfile() const { return _profile.get(); }
00054     void setEllipsoidModel(osg::EllipsoidModel* eModel) { _eModel = eModel; }
00055     osg::EllipsoidModel* getEllipsoidModel() const { return _eModel.get(); }
00056     osg::Vec3d toModel(double cubeX, double cubeY, double elevation);
00057     // Updates to the terrain are mostly done in task requests.
00058     osgEarth::TaskService* getHeightFieldService() { return _hfService; }
00059     osgEarth::TaskService* getImageService() { return _imageService; }
00060 protected:
00061     osg::ref_ptr<EulerProfile> _profile;
00062     osg::ref_ptr<osg::EllipsoidModel> _eModel;
00063     osg::ref_ptr<osgEarth::TaskService> _hfService;
00064     osg::ref_ptr<osgEarth::TaskService> _imageService;
00065 };
00066 
00067 }
00068 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines