25 #include "VecMath.hpp"
34 #define EARTH_RADIUS 6369.f
35 #define HIGH_ALTITUDE 115.f
36 #define LOW_ALTITUDE 70.f
37 #define VISIBLE_RADIUS 457.8f
67 bool update(
double deltaTime);
74 const Mat4d& viewMatrix,
const float thickness,
const int segments,
75 QList<Vec4f> lineColorArray, QList<Vec4f> trainColorArray);
79 const Mat4d& viewMatrix,
const float bolideSize);
98 const QList<colorPair> colors,
99 QList<Vec4f> &lineColorArray,
100 QList<Vec4f> &trainColorArray);
105 static void insertVertex(
const StelCore* core,
const Mat4d& viewMatrix,
106 QVector<Vec3d> &vertexArray,
Vec3d vertex);
107 static Vec4f getColorFromName(QString colorName);
108 QList<colorPair> getRandColor();
115 double m_distMultiplier;
117 QList<Vec4f> m_trainColorArray;
118 QList<Vec4f> m_lineColorArray;
119 const int m_segments;
123 #endif // _METEOR_HPP_
Meteor(const StelCore *, float v)
Create a Meteor object.
static void buildColorArrays(const int segments, const QList< colorPair > colors, QList< Vec4f > &lineColorArray, QList< Vec4f > &trainColorArray)
Determine color arrays of line and prism used to draw meteor train.
Define the StelTextureSP type.
Main class for Stellarium core processing.
int firstBrightSegment
Apparent magnitude at head, 0-1.
static void drawTrain(const StelCore *core, StelPainter &sPainter, const MeteorModel &mm, const Mat4d &viewMatrix, const float thickness, const int segments, QList< Vec4f > lineColorArray, QList< Vec4f > trainColorArray)
Draws the meteor train. (useful to be reused in MeteorShowers plugin)
void draw(const StelCore *core, StelPainter &sPainter)
Draws the meteor.
float startH
Nearest point to observer along path.
QPair< QString, int > colorPair
Vec3d position
observer position
Provides functions for performing openGL drawing operations.
bool update(double deltaTime)
Updates the position of the meteor, and expires it if necessary.
static void calculateThickness(const StelCore *core, float &thickness, float &bolideSize)
Calculates the train thickness and bolide size.
static bool initMeteorModel(const StelCore *core, const int segments, const Mat4d viewMatrix, MeteorModel &mm)
Builds Meteor Model.
float xydistance
end of train
static void drawBolide(const StelCore *core, StelPainter &sPainter, const MeteorModel &mm, const Mat4d &viewMatrix, const float bolideSize)
Draws the meteor bolide. (useful to be reused in MeteorShowers plugin)
QSharedPointer< StelTexture > StelTextureSP
Use shared pointer to simplify memory managment.
Vec3d posTrain
equatorial coordinate position
float endH
Start height above center of earth.
float minDist
Distance in XY plane (orthogonal to meteor path) from observer to meteor.
static bool updateMeteorModel(double deltaTime, double speed, MeteorModel &mm)
Updates parameters of meteor model.