Stellarium  23.4
Public Types | Public Member Functions
Meteor Class Reference

Models a single meteor. More...

#include <Meteor.hpp>

Public Types

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

Public Member Functions

 Meteor (const StelCore *core, const StelTextureSP &bolideTexture)
 Create a Meteor object.
 
void init (const float &radiantAlpha, const float &radiantDelta, const float &speed, const QList< ColorPair > colors)
 Initialize meteor.
 
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.
 
bool isAlive () const
 Indicate if the meteor still visible.
 
void setAbsMag (float mag)
 Set meteor absolute magnitude.
 
float absMag () const
 Get meteor absolute magnitude.
 

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

Member Function Documentation

◆ update()

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.