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

core/SphericMirrorCalculator.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 _SPHERICMIRRORCALCULATOR_HPP_
00022 #define _SPHERICMIRRORCALCULATOR_HPP_
00023 
00024 #include "VecMath.hpp"
00025 
00026 class QSettings;
00027 
00028 class SphericMirrorCalculator {
00029 public:
00030   SphericMirrorCalculator(const QSettings& conf);
00031   float getHorzZoomFactor() const {return horzZoomFactor;}
00032   float getVertZoomFactor() const {return vertZoomFactor;}
00033   bool transform(const Vec3f &v,float &x,float &y) const;
00034   bool retransform(float x,float y,Vec3f &v) const;
00035     // for calculating partial derivatives:
00036   bool retransform(float x,float y, Vec3f& v, Vec3f& vX, Vec3f& vY) const;
00037 private:
00038   void initRotMatrix(float alpha,float delta,float phi);
00039 private:
00040   Vec3f P;          // projector
00041   Vec3f DomeCenter;
00042   float DomeRadius;
00043   float PP;
00044   float lP;
00045   Vec3f p;
00046   float horzZoomFactor;
00047   float vertZoomFactor;
00048   float alphaDeltaPhi[9];
00049 };
00050 
00051 #endif // _SPHERICMIRRORCALCULATOR_HPP_

Generated on Wed Jun 2 13:11:13 2010 for Stellarium by  doxygen 1.5.5