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., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _METEOR_HPP_ #ifndef _METEOR_HPP_
#define _METEOR_HPP_ #define _METEOR_HPP_
#include "renderer/StelVertexAttribute.hpp"
#include "renderer/StelVertexBuffer.hpp"
#include "StelProjector.hpp"
#include "VecMath.hpp" #include "VecMath.hpp"
class StelCore; class StelCore;
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
skipping to change at line 52 skipping to change at line 54
//! Create a Meteor object. //! Create a Meteor object.
//! @param v the velocity of the meteor in km/s. //! @param v the velocity of the meteor in km/s.
Meteor(const StelCore*, 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.
void draw(const StelCore* core, StelPainter& sPainter); void draw(const StelCore* core, StelProjectorP projector, class Stel Renderer* renderer);
//! 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:
//! Vertex with a 3D position and a color.
struct Vertex
{
Vec3f position;
Vec4f color;
Vertex(const Vec3d& pos, const Vec4f& color)
: position(Vec3f(pos[0], pos[1], pos[2])), color(col
or) {}
VERTEX_ATTRIBUTES(Vec3f Position, Vec4f Color);
};
//! Vertex buffer used for drawing.
StelVertexBuffer<Vertex>* vertexBuffer;
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
Vec3d posTrain; // end of train Vec3d posTrain; // end of train
bool train; // point or train visible? bool train; // point or train visible?
double startH; // start height above center of earth double startH; // start height above center of earth
double endH; // end height double endH; // end height
double velocity; // km/s double velocity; // km/s
bool alive; // is it still visible? bool alive; // is it still visible?
float mag; // Apparent magnitude at head, 0-1 float mag; // Apparent magnitude at head, 0-1
float maxMag; // 0-1 float maxMag; // 0-1
float absMag; // absolute magnitude float absMag; // absolute magnitude
float visMag; // visual magnitude at observer float visMag; // visual magnitude at observer
double xydistance; // distance in XY plane (orthogonal to meteor pat h) from observer to meteor double xydistance; // distance in XY plane (orthogonal to meteor pat h) from observer to meteor
double initDist; // initial distance from observer double initDist; // initial distance from observer
double minDist; // nearest point to observer along path double minDist; // nearest point to observer along path
double distMultiplier; // scale magnitude due to changes in distanc e double distMultiplier; // scale magnitude due to changes in distanc e
}; };
#endif // _METEOR_HPP_ #endif // _METEOR_HPP_
 End of changes. 5 change blocks. 
3 lines changed or deleted 18 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/