osgEarth 2.1.1

/home/cube/sources/osgearth/src/osgEarthUtil/ImageOverlayEditor

Go to the documentation of this file.
00001 #ifndef OSGEARTH_UTIL_IMAGE_OVERLAY_EDITOR_H
00002 #define OSGEARTH_UTIL_IMAGE_OVERLAY_EDITOR_H
00003 
00004 #include <osgEarth/MapNode>
00005 #include <osgEarthUtil/Common>
00006 #include <osgEarthUtil/ImageOverlay>
00007 #include <osg/MatrixTransform>
00008 #include <osgGA/GUIEventHandler>
00009 #include <osgEarthUtil/Draggers>
00010 
00011 namespace osgEarth { namespace Util
00012 {
00013     class OSGEARTHUTIL_EXPORT ImageOverlayEditor : public osg::Group
00014     {
00015     public:
00016         typedef std::map< ImageOverlay::ControlPoint, osg::ref_ptr< osgManipulator::Dragger > >  ControlPointDraggerMap;
00017 
00018         ImageOverlayEditor(ImageOverlay* overlay, const osg::EllipsoidModel* ellipsoid, osg::Node* terrain);
00019 
00020         ControlPointDraggerMap& getDraggers() { return _draggers; }
00021 
00022         const osg::EllipsoidModel* getEllipsoid() const { return _ellipsoid.get();}
00023         void setEllipsoid( const osg::EllipsoidModel* ellipsoid) { _ellipsoid = ellipsoid; };
00024 
00025         osg::Node* getTerrain() const { return _terrain.get(); }
00026         void setTerrain( osg::Node* terrain) { _terrain = terrain;}
00027 
00028         ImageOverlay* getOverlay() { return _overlay.get();}
00029 
00030         void updateDraggers();
00031 
00032     protected:
00033 
00034         ~ImageOverlayEditor();
00035         void addDragger( ImageOverlay::ControlPoint controlPoint );
00036 
00037         osg::ref_ptr< ImageOverlay > _overlay;
00038         osg::ref_ptr< const osg::EllipsoidModel > _ellipsoid;
00039         osg::ref_ptr< osg::Node > _terrain;
00040         osg::ref_ptr< osgEarth::Util::ImageOverlay::ImageOverlayCallback > _overlayCallback;
00041         ControlPointDraggerMap _draggers;
00042     };
00043 
00044 } } // namespace osgEarth::Util
00045 
00046 #endif // OSGEARTH_UTIL_IMAGE_OVERLAY_EDITOR_H
00047 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines