Stellarium 0.12.2
List of all members | Public Member Functions | Protected Attributes
LinearFader Class Reference

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

#include <StelFader.hpp>

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)
 
- Public Member Functions inherited from StelFader
 StelFader (bool initialState, float minimumValue=0.f, float maximumValue=1.f)
 
bool operator== (bool s) const
 
 operator bool () const
 
virtual void setMinValue (float _min)
 
float getMinValue ()
 
float getMaxValue ()
 

Protected Attributes

bool isTransiting
 
int duration
 
float startValue
 
float targetValue
 
int counter
 
float interstate
 
- Protected Attributes inherited from StelFader
bool state
 
float minValue
 
float maxValue
 

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.

Definition at line 77 of file StelFader.hpp.


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