Meteor.hpp   Meteor.hpp 
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#ifndef _METEOR_HPP_ #ifndef _METEOR_HPP_
#define _METEOR_HPP_ #define _METEOR_HPP_
#include "Projector.hpp" #include "VecMath.hpp"
#include "Navigator.hpp" class StelCore;
#include "ToneReproducer.hpp" class StelPainter;
// all in km - altitudes make up meteor range // all in km - altitudes make up meteor range
#define EARTH_RADIUS 6369.f #define EARTH_RADIUS 6369.f
#define HIGH_ALTITUDE 115.f #define HIGH_ALTITUDE 115.f
#define LOW_ALTITUDE 70.f #define LOW_ALTITUDE 70.f
#define VISIBLE_RADIUS 457.8f #define VISIBLE_RADIUS 457.8f
//! @class Meteor //! @class Meteor
//! Models a single meteor. //! Models a single meteor.
//! Control of the meteor rate is performed in the MeteorMgr class. Once //! Control of the meteor rate is performed in the MeteorMgr class. Once
//! created, a meteor object only lasts for some amount of time, and then //! created, a meteor object only lasts for some amount of time, and then
//! "dies", after which, the update() member returns false. The live/dead //! "dies", after which, the update() member returns false. The live/dead
//! status of a meteor may also be determined using the isAlive member. //! status of a meteor may also be determined using the isAlive member.
class Meteor class Meteor
{ {
public: public:
//! Create a Meteor object. //! Create a Meteor object.
//! @param proj the Projector.
//! @param nav the Navigator.
//! @param eye the ToneProducer object.
//! @param v the velocity of the meteor in km/s. //! @param v the velocity of the meteor in km/s.
Meteor( Projector *proj, Navigator *nav, ToneReproducer* eye, double v); Meteor(const StelCore*, double v);
virtual ~Meteor(); virtual ~Meteor();
//! Updates the position of the meteor, and expires it if necessary. //! Updates the position of the meteor, and expires it if necessary.
//! @return true of the meteor is still alive, else false. //! @return true of the meteor is still alive, else false.
bool update(double deltaTime); bool update(double deltaTime);
//! Draws the meteor. //! Draws the meteor.
bool draw(Projector *proj, const Navigator* nav); bool draw(const StelCore* core, const StelPainter& sPainter);
//! Determine if a meteor is alive or has burned out. //! Determine if a meteor is alive or has burned out.
//! @return true if alive, else false. //! @return true if alive, else false.
bool isAlive(void); bool isAlive(void);
private: private:
Mat4d mmat; // tranformation matrix to align radiant with earth dire ction of travel Mat4d mmat; // tranformation matrix to align radiant with earth dire ction of travel
Vec3d obs; // observer position in meteor coord. system Vec3d obs; // observer position in meteor coord. system
Vec3d position; // equatorial coordinate position Vec3d position; // equatorial coordinate position
Vec3d posInternal; // middle of train Vec3d posInternal; // middle of train
 End of changes. 4 change blocks. 
8 lines changed or deleted 5 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/