Stellarium 0.15.2
List of all members | Public Types | Public Member Functions
Meteor Class Reference

Models a single meteor. More...

#include <Meteor.hpp>

+ Inheritance diagram for Meteor:

Public Types

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

Public Member Functions

 Meteor (const StelCore *core, const StelTextureSP &bolideTexture)
 Create a Meteor object. More...
 
void init (const float &radiantAlpha, const float &radiantDelta, const float &speed, const QList< ColorPair > colors)
 Initialize meteor. More...
 
virtual bool update (double deltaTime)
 Updates the position of the meteor, and expires it if necessary. More...
 
virtual void draw (const StelCore *core, StelPainter &sPainter)
 Draws the meteor. More...
 
bool isAlive ()
 Indicate if the meteor still visible. More...
 
void setAbsMag (float mag)
 Set meteor absolute magnitude. More...
 
float absMag ()
 Get meteor absolute magnitude. More...
 

Detailed Description

Models a single meteor.

Once created, a meteor object only lasts for some amount of time, and then "dies", after which, the update() member returns false.

Author
Marcos Cardinot mcard.nosp@m.inot.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition at line 42 of file Meteor.hpp.

Member Typedef Documentation

typedef QPair<QString, int> Meteor::ColorPair

<colorName, intensity>

Definition at line 46 of file Meteor.hpp.

Constructor & Destructor Documentation

Meteor::Meteor ( const StelCore core,
const StelTextureSP bolideTexture 
)

Create a Meteor object.

Member Function Documentation

float Meteor::absMag ( )
inline

Get meteor absolute magnitude.

Definition at line 69 of file Meteor.hpp.

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

Draws the meteor.

void Meteor::init ( const float &  radiantAlpha,
const float &  radiantDelta,
const float &  speed,
const QList< ColorPair colors 
)

Initialize meteor.

bool Meteor::isAlive ( )
inline

Indicate if the meteor still visible.

Definition at line 65 of file Meteor.hpp.

void Meteor::setAbsMag ( float  mag)
inline

Set meteor absolute magnitude.

Definition at line 67 of file Meteor.hpp.

virtual bool Meteor::update ( double  deltaTime)
virtual

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

Parameters
deltaTimethe time increment in seconds since the last call.
Returns
true of the meteor is still alive, else false.

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