osgEarth 2.1.1

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

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 #ifndef OSGEARTH_ENGINE_SEAMLESS_ENGINE_NODE_H
00020 #define OSGEARTH_ENGINE_SEAMLESS_ENGINE_NODE_H 1
00021 
00022 #include <osgEarth/TerrainEngineNode>
00023 #include <osgEarth/TextureCompositor>
00024 
00025 #include "SeamlessOptions"
00026 #include "PatchSet"
00027 
00028 namespace seamless
00029 {
00030 class SeamlessEngineNode : public osgEarth::TerrainEngineNode
00031 {
00032 public:
00033     SeamlessEngineNode();
00034     SeamlessEngineNode(const SeamlessEngineNode& rhs,
00035                        const osg::CopyOp& op = osg::CopyOp::DEEP_COPY_ALL);
00036     META_Node(osgEarth,SeamlessEngineNode);
00037     ~SeamlessEngineNode();
00038     // TerrainEngineNode overrides
00039     virtual void preInitialize(const osgEarth::Map* map,
00040                             const osgEarth::TerrainOptions& options);
00041     virtual void validateTerrainOptions(osgEarth::TerrainOptions& options);
00042     virtual const osgEarth::TerrainOptions& getTerrainOptions() const
00043     {
00044         return _terrainOptions;
00045     }
00046     // virtual osg::BoundingSphere computeBound() const;
00047     // MapCallback adapter functions
00048     void onMapProfileEstablished(const osgEarth::Profile* profile);
00049     void onImageLayerAdded(osgEarth::ImageLayer*, unsigned int index);
00050     void onImageLayerRemoved(osgEarth::ImageLayer* layer, unsigned int index);
00051     void onImageLayerMoved(osgEarth::ImageLayer* layer, unsigned int oldIndex,
00052                            unsigned int newIndex);
00053     void onElevationLayerAdded(osgEarth::ElevationLayer*, unsigned int index);
00054     void onElevationLayerRemoved(osgEarth::ElevationLayer* layer,
00055                                  unsigned int index);
00056     void onElevationLayerMoved(osgEarth::ElevationLayer* layer,
00057                                unsigned int oldIndex, unsigned int newIndex);
00058     
00059 private:
00060     osg::ref_ptr<PatchSet> _patchSet;
00061     osgEarth::Drivers::SeamlessOptions _terrainOptions;
00062     osgEarth::MapFrame* _mapf;
00063 };
00064 }
00065 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines