Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure

core/StelViewportDistorter.hpp

00001 /*
00002  * Stellarium
00003  * Copyright (C) Fabien Chereau
00004  * Author 2006 Johannes Gajdosik
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (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 General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019  */
00020 
00021 #ifndef _STELVIEWPORTDISTORTER_HPP_
00022 #define _STELVIEWPORTDISTORTER_HPP_
00023 
00024 #include "StelProjectorType.hpp"
00025 class QString;
00026 
00027 class StelViewportDistorter
00028 {
00029 public:
00030     static StelViewportDistorter *create(const QString &type,
00031                                      int width,int height,
00032                                      StelProjectorP prj);
00033     // StelCore is needed for getProjectionType and setMaxFov
00034     virtual ~StelViewportDistorter(void) {}
00035     virtual QString getType(void) const = 0;
00036     virtual void prepare(void) const = 0;
00037     virtual void distort(void) const = 0;
00038     virtual bool distortXY(int &x,int &y) const = 0;
00039 
00040 protected:
00041     StelViewportDistorter(void) {}
00042 
00043 private:
00044     // no copying:
00045     StelViewportDistorter(const StelViewportDistorter&);
00046     const StelViewportDistorter &operator=(const StelViewportDistorter&);
00047 
00048 };
00049 
00050 #endif // _STELVIEWPORTDISTORTER_HPP_
00051 

Generated on Mon Mar 9 16:16:16 2009 for Stellarium by  doxygen 1.5.5