fr.inria.insitu.glite.activities
Class AnimateColorsActivity

java.lang.Object
  extended by fr.inria.insitu.glite.activities.Activity
      extended by fr.inria.insitu.glite.activities.InterpolatingActivity
          extended by fr.inria.insitu.glite.activities.AnimateColorsActivity

public class AnimateColorsActivity
extends InterpolatingActivity

AnimateColorActivity animates the interpolation of colors of one or several Colored objects.

Version:
$Revision: 1.2 $
Author:
Jean-Daniel Fekete

Nested Class Summary
 
Nested classes/interfaces inherited from class fr.inria.insitu.glite.activities.Activity
Activity.ActivityDelegate
 
Field Summary
 
Fields inherited from class fr.inria.insitu.glite.activities.InterpolatingActivity
DESTINATION_TO_SOURCE, SOURCE_TO_DESTINATION, SOURCE_TO_DESTINATION_TO_SOURCE
 
Fields inherited from class fr.inria.insitu.glite.activities.Activity
DEFAULT_ACTIVITY_STEP_RATE, TERMINATE_AND_FINISH, TERMINATE_AND_FINISH_IF_STEPPING, TERMINATE_WITHOUT_FINISHING
 
Constructor Summary
AnimateColorsActivity(long duration)
          Constructor.
AnimateColorsActivity(long duration, long stepRate)
          Constructor.
 
Method Summary
 void add(Colored c, Color color)
          Adds a Colored and a target Color.
 Colored getColored(int i)
          Returns the bounded at the specified index.
 Color getTarget(int i)
          Returns the Color at the specified index.
 void setRelativeTargetValue(float t)
          Subclasses should override this method and set the value on their target (the object that they are modifying) accordingly.
 int size()
           
 
Methods inherited from class fr.inria.insitu.glite.activities.InterpolatingActivity
computeSlowInSlowOut, getFirstLoop, getLoopCount, getMode, getSlowInSlowOut, setDuration, setFirstLoop, setLoopCount, setMode, setSlowInSlowOut, terminate
 
Methods inherited from class fr.inria.insitu.glite.activities.Activity
getActivityScheduler, getDelegate, getDuration, getNextStepTime, getStartTime, getStepRate, getStopTime, isStepping, processStep, setActivityScheduler, setDelegate, setStartTime, setStepRate, start, startAfter, stop, terminate, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnimateColorsActivity

public AnimateColorsActivity(long duration,
                             long stepRate)
Constructor.

Parameters:
duration - a duration time
stepRate - the step rate

AnimateColorsActivity

public AnimateColorsActivity(long duration)
Constructor.

Parameters:
duration - a duration time
Method Detail

add

public void add(Colored c,
                Color color)
Adds a Colored and a target Color.

Parameters:
c - the colored
color - the target color

getColored

public Colored getColored(int i)
Returns the bounded at the specified index.

Parameters:
i - the index
Returns:
the bounded at the specified index

getTarget

public Color getTarget(int i)
Returns the Color at the specified index.

Parameters:
i - the index
Returns:
the Color at the specified index

size

public int size()
Returns:
the number of colored to interpolate

setRelativeTargetValue

public void setRelativeTargetValue(float t)
Subclasses should override this method and set the value on their target (the object that they are modifying) accordingly.

Overrides:
setRelativeTargetValue in class InterpolatingActivity
Parameters:
t - value varying from 0 to 1


Copyright © 2006 by Jean-Daniel Fekete and INRIA, France All rights reserved.