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

core/modules/Meteor.hpp

00001 /*
00002  * Stellarium
00003  * This file Copyright (C) 2004 Robert Spearman
00004  * 
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  * 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335, USA.
00018  */
00019 
00020 #ifndef _METEOR_HPP_
00021 #define _METEOR_HPP_
00022 
00023 #include "VecMath.hpp"
00024 class StelCore;
00025 class StelPainter;
00026 
00027 // all in km - altitudes make up meteor range
00028 #define EARTH_RADIUS 6369.f
00029 #define HIGH_ALTITUDE 115.f
00030 #define LOW_ALTITUDE 70.f
00031 #define VISIBLE_RADIUS 457.8f
00032 
00039 class Meteor
00040 {
00041 public:
00044     Meteor(const StelCore*, double v);
00045     virtual ~Meteor();
00046     
00049     bool update(double deltaTime);
00050     
00052     void draw(const StelCore* core, StelPainter& sPainter);
00053     
00056     bool isAlive(void);
00057     
00058 private:
00059     Mat4d mmat; // tranformation matrix to align radiant with earth direction of travel
00060     Vec3d obs;  // observer position in meteor coord. system
00061     Vec3d position;  // equatorial coordinate position
00062     Vec3d posInternal;  // middle of train
00063     Vec3d posTrain;  // end of train
00064     bool train;      // point or train visible?
00065     double startH;  // start height above center of earth
00066     double endH;    // end height
00067     double velocity; // km/s
00068     bool alive;      // is it still visible?
00069     float mag;     // Apparent magnitude at head, 0-1
00070     float maxMag;  // 0-1
00071     float absMag;  // absolute magnitude
00072     float visMag;  // visual magnitude at observer
00073     double xydistance; // distance in XY plane (orthogonal to meteor path) from observer to meteor
00074     double initDist;  // initial distance from observer
00075     double minDist;  // nearest point to observer along path
00076     double distMultiplier;  // scale magnitude due to changes in distance 
00077     
00078 };
00079 
00080 
00081 #endif // _METEOR_HPP_
Generated on Sat Aug 25 22:13:29 2012 for Stellarium by  doxygen 1.6.3