org.stellarium.ui.fader
Class ParabolicFader
java.lang.Object
org.stellarium.ui.fader.Fader
org.stellarium.ui.fader.ParabolicFader
-
public class ParabolicFader
- extends Fader
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
Constructor Summary |
ParabolicFader()
|
ParabolicFader(int _duration,
float _min_value, float _max_value, boolean _state)
Create and initialise to default
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isTransiting
protected boolean isTransiting
duration
protected int duration
startValue
protected float startValue
targetValue
protected float targetValue
counter
protected int counter
interstate
protected float interstate
ParabolicFader
public ParabolicFader(int _duration,
float _min_value,
float _max_value,
boolean _state)
- Create and initialise to default
- Parameters:
_duration
-
_min_value
-
_max_value
-
_state
-
ParabolicFader
public ParabolicFader()
update
public void update(int delta_ticks)
- Increments the internal counter of delta_time ticks
-
- Specified by:
update
in class Fader
-
getInterstate
public float getInterstate()
- Get current switch state
-
- Specified by:
getInterstate
in
class Fader
-
getInterstatePercentage
public float getInterstatePercentage()
-
- Specified by:
getInterstatePercentage
in class Fader
-
set
public Fader set(boolean s)
- Faders can be used just as bools
-
- Specified by:
set
in class Fader
-
setDuration
public void setDuration(int _duration)
-
- Overrides:
setDuration
in
class Fader
-
getDuration
public int getDuration()
-
setMinValue
public void setMinValue(float _min)
-
- Overrides:
setMinValue
in
class Fader
-
setMaxValue
public void setMaxValue(float _max)
-
- Overrides:
setMaxValue
in
class Fader
-
hasInterstate
public boolean hasInterstate()
-