org.xith3d.schedops.properties
Class ValueInterpolator

java.lang.Object
  extended by org.xith3d.loop.opscheduler.Interval
      extended by org.xith3d.schedops.properties.ValueInterpolator
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject
Direct Known Subclasses:
BrightnessFadeOutManager, HUDFadeOutHandler

public abstract class ValueInterpolator
extends Interval

This Interval interpolates a value over a period of time.


Constructor Summary
ValueInterpolator(long totalTime)
           
ValueInterpolator(long totalTime, float startVal, float endVal)
           
ValueInterpolator(long totalTime, long resolution)
           
ValueInterpolator(long totalTime, long resolution, float startVal, float endVal)
           
 
Method Summary
protected  void applyNormValue(float normValue)
          This method is invoked each time slice.
protected abstract  void applyValue(float value)
          This method is invoked each time slice.
 float getDeltaValue()
           
 float getEndValue()
           
 long getStartTime()
           
 float getStartValue()
           
 long getTotalTime()
           
protected  void onInterpolationFinished()
          This method is invoked, when the interpolation has reached its final value.
protected  void onIntervalHit(long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          This even is fired internally, when the Interval was hit.
protected  void onIntervalStarted(long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          This even is fired internally, when the Interval is started.
 
Methods inherited from class org.xith3d.loop.opscheduler.Interval
check, getInterval, getName, isAlive, kill, revive, setInterval, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueInterpolator

public ValueInterpolator(long totalTime,
                         long resolution,
                         float startVal,
                         float endVal)

ValueInterpolator

public ValueInterpolator(long totalTime,
                         float startVal,
                         float endVal)

ValueInterpolator

public ValueInterpolator(long totalTime,
                         long resolution)

ValueInterpolator

public ValueInterpolator(long totalTime)
Method Detail

getStartTime

public final long getStartTime()

getTotalTime

public final long getTotalTime()

getStartValue

public final float getStartValue()

getEndValue

public final float getEndValue()

getDeltaValue

public final float getDeltaValue()

onIntervalStarted

protected void onIntervalStarted(long gameTime,
                                 long frameTime,
                                 UpdatingThread.TimingMode timingMode)
This even is fired internally, when the Interval is started.

Overrides:
onIntervalStarted in class Interval

applyValue

protected abstract void applyValue(float value)
This method is invoked each time slice. Override it to do someting useful with the normalized value.

Parameters:
value -

applyNormValue

protected void applyNormValue(float normValue)
This method is invoked each time slice. Override it to do someting useful with the normalized value.

Parameters:
normValue - the interpolation factor (0.0 .. 1.0)

onInterpolationFinished

protected void onInterpolationFinished()
This method is invoked, when the interpolation has reached its final value.


onIntervalHit

protected void onIntervalHit(long gameTime,
                             long frameTime,
                             UpdatingThread.TimingMode timingMode)
This even is fired internally, when the Interval was hit.

Overrides:
onIntervalHit in class Interval