Stellarium 0.11.4
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

LinearFader Class Reference

Implementation of StelFader which implements a linear transition. More...

#include <StelFader.hpp>

List of all members.

Public Member Functions

 LinearFader (int _duration=1000, float minimumValue=0.f, float maximumValue=1.f, bool initialState=false)
void update (int deltaTicks)
float getInterstate () const
float getInterstatePercentage () const
StelFaderoperator= (bool s)
void setDuration (int _duration)
virtual float getDuration ()
void setMaxValue (float _max)

Protected Attributes

bool isTransiting
int duration
float startValue
float targetValue
int counter
float interstate

Detailed Description

Implementation of StelFader which implements a linear transition.

Please note that state is updated instantaneously, so if you need to draw something fading in and out, you need to check the interstate value (!=0) to know to draw when on AND during transitions.

Generated on Sat Aug 25 22:13:31 2012 for Stellarium by  doxygen 1.6.3