Stellarium 0.13.3
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
Meteor Class Reference

Models a single meteor. More...

#include <Meteor.hpp>

Classes

struct  MeteorModel
 

Public Types

typedef QPair< QString, int > colorPair
 <colorName, intensity> More...
 

Public Member Functions

 Meteor (const StelCore *, float v)
 Create a Meteor object. More...
 
bool update (double deltaTime)
 Updates the position of the meteor, and expires it if necessary. More...
 
void draw (const StelCore *core, StelPainter &sPainter)
 Draws the meteor. More...
 

Static Public Member Functions

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) More...
 
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) More...
 
static void calculateThickness (const StelCore *core, float &thickness, float &bolideSize)
 Calculates the train thickness and bolide size. More...
 
static bool updateMeteorModel (double deltaTime, double speed, MeteorModel &mm)
 Updates parameters of meteor model. More...
 
static bool initMeteorModel (const StelCore *core, const int segments, const Mat4d viewMatrix, MeteorModel &mm)
 Builds Meteor Model. More...
 
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. More...
 

Static Public Attributes

static StelTextureSP bolideTexture
 

Detailed Description

Models a single meteor.

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 "dies", after which, the update() member returns false.

Definition at line 44 of file Meteor.hpp.

Member Typedef Documentation

typedef QPair<QString, int> Meteor::colorPair

<colorName, intensity>

Definition at line 85 of file Meteor.hpp.

Constructor & Destructor Documentation

Meteor::Meteor ( const StelCore ,
float  v 
)

Create a Meteor object.

Parameters
vthe velocity of the meteor in km/s.

Member Function Documentation

static void Meteor::buildColorArrays ( const int  segments,
const QList< colorPair colors,
QList< Vec4f > &  lineColorArray,
QList< Vec4f > &  trainColorArray 
)
static

Determine color arrays of line and prism used to draw meteor train.

static void Meteor::calculateThickness ( const StelCore core,
float &  thickness,
float &  bolideSize 
)
static

Calculates the train thickness and bolide size.

void Meteor::draw ( const StelCore core,
StelPainter sPainter 
)

Draws the meteor.

static void Meteor::drawBolide ( const StelCore core,
StelPainter sPainter,
const MeteorModel mm,
const Mat4d viewMatrix,
const float  bolideSize 
)
static

Draws the meteor bolide. (useful to be reused in MeteorShowers plugin)

static void Meteor::drawTrain ( const StelCore core,
StelPainter sPainter,
const MeteorModel mm,
const Mat4d viewMatrix,
const float  thickness,
const int  segments,
QList< Vec4f lineColorArray,
QList< Vec4f trainColorArray 
)
static

Draws the meteor train. (useful to be reused in MeteorShowers plugin)

static bool Meteor::initMeteorModel ( const StelCore core,
const int  segments,
const Mat4d  viewMatrix,
MeteorModel mm 
)
static

Builds Meteor Model.

Returns
true if alive, else false.
bool Meteor::update ( double  deltaTime)

Updates the position of the meteor, and expires it if necessary.

Returns
true of the meteor is still alive, else false.
static bool Meteor::updateMeteorModel ( double  deltaTime,
double  speed,
MeteorModel mm 
)
static

Updates parameters of meteor model.

(useful to be reused in MeteorShowers plugin)

Returns
true of the meteor is still alive, else false.

The documentation for this class was generated from the following file: