sub_arctic.anim
Class transition

java.lang.Object
  |
  +--sub_arctic.anim.transition
Direct Known Subclasses:
continuous_transition, simple_transition, timer_transition

public class transition
extends java.lang.Object

Class that implements the transitions, just like in the paper (Hudson & Stasko, UIST '93) and in artkit.


Field Summary
protected  boolean _finished
          This lets the world know that we have seen a time that is larger than our end.
protected  time_interval _interval
          Time interval we are going on.
protected  double _last_time
          Store the last time seen.
protected  animatable _target
          Interactor we are operating on.
protected  trajectory _traj
          The trajectory we are using.
 
Constructor Summary
transition(animatable i, time_interval t, trajectory j)
          Build a transition, given a target animatable, a time interval, and a trajectory.
 
Method Summary
 void end(event e, java.lang.Object user_info)
          Send the end message to the interactor.
 boolean finished()
          Are we done? (Has time passed us by...).
 time_interval interval()
          Retrieve the time interval over which we are operating.
 double last_time()
          What was the last time seen? This function is usually used by code trying to figure out what time interval is "next".
 void set_interval(time_interval t)
          This function sets the time interval for this transition.
 void start(event e, java.lang.Object user_info)
          Start a transition.
 void step(event e, java.lang.Object user_info, long current_time)
          Perform a step...
 animatable target()
          Retrieve the interactor we are operating on.
 trajectory traj()
          Retrieve the trajectory for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_target

protected animatable _target
Interactor we are operating on.

_interval

protected time_interval _interval
Time interval we are going on.

_traj

protected trajectory _traj
The trajectory we are using.

_finished

protected boolean _finished
This lets the world know that we have seen a time that is larger than our end.

_last_time

protected double _last_time
Store the last time seen.
Constructor Detail

transition

public transition(animatable i,
                  time_interval t,
                  trajectory j)
Build a transition, given a target animatable, a time interval, and a trajectory.

Parameters:
animatable - i the target of the animation or transition
time_interval - t the time interval over which this transition occurs
trajectory - t the trajectory over which this transition is mapped
Method Detail

target

public animatable target()
Retrieve the interactor we are operating on.
Returns:
animatable the target object for this animation.

interval

public time_interval interval()
Retrieve the time interval over which we are operating.
Returns:
time_interval the time interval for this transition

set_interval

public void set_interval(time_interval t)
This function sets the time interval for this transition. In general, it is an extremely bad idea for user level code to be manipulating the transitions timing information after the transition has been created. It is quite likely that unless you understand exactly how the animation system's scheduling works, you will hose yourself if you try to manipulate this while the transition is running.

This function has been made protected so subclasses of transition can use it, but in general user level code cannot.

Parameters:
time_interval - t the new time interval to use for this transition

traj

public trajectory traj()
Retrieve the trajectory for this object.
Returns:
trajectory the trajectory over which the animation happens

finished

public boolean finished()
Are we done? (Has time passed us by...).
Returns:
boolean returns true if this transition has been completed

last_time

public double last_time()
What was the last time seen? This function is usually used by code trying to figure out what time interval is "next".
Returns:
double the last time (in milliseconds) that we have dealt with

start

public void start(event e,
                  java.lang.Object user_info)
Start a transition. This is where the work gets done of calling the start_transition function on the interactor.

Parameters:
event - e the animation event that caused things to get going
Object - user_info the object passed to the animation agent when the animatable joined its focus set

step

public void step(event e,
                 java.lang.Object user_info,
                 long current_time)
Perform a step... this sends the transition_step message to the interactor.

Parameters:
event - e the animation event for this step
Object - user_info the object passed to the animation agent when the animatable joined its focus set
long - current_time the time it is "now" for this time step

end

public void end(event e,
                java.lang.Object user_info)
Send the end message to the interactor.

Parameters:
event - e the animation event for this step
Object - user_info the object passed to the animation agent when the animatable joined its focus set