artofillusion.animation
Class Timecourse

java.lang.Object
  extended by artofillusion.animation.Timecourse

public class Timecourse
extends java.lang.Object

This class represents a quantity which changes as a function of time. It is defined by a series of timepoints, with a value at each one. There is also a smoothness value for each timepoint, which affects how it is interpolated.


Field Summary
static int APPROXIMATING
           
static int DISCONTINUOUS
           
static int INTERPOLATING
           
static int LINEAR
           
 
Constructor Summary
Timecourse(Keyframe[] value, double[] time, Smoothness[] smoothness)
           
 
Method Summary
 int addTimepoint(Keyframe v, double t, Smoothness s)
          Add a new timepoint to the Timecourse, and return its index in the list.
 Timecourse duplicate(java.lang.Object owner)
          Create a duplicate of this Timecourse for a (possibly different) object.
 Keyframe evaluate(double t, int method)
          Evaluate the Timecourse for a particular time, using a particular interpolation method.
 Smoothness[] getSmoothness()
          Get the smoothness values for this Timecourse.
 boolean getSubdivideAdaptively()
          Get whether this timecourse should be evaluated by adaptive subdivision (to minimize the amount of calculation that needs to be done) or always subdivided a fixed number of times.
 double[] getTimes()
          Get the time values for this Timecourse.
 Keyframe[] getValues()
          Get the values for this Timecourse.
 int moveTimepoint(int which, double t)
          Move a timepoint to a different time, and return its new index in the list.
 void removeAllTimepoints()
          Delete all timepoints from this timecourse.
 void removeTimepoint(double t)
          Delete the timepoint at the specified time from the Timecourse.
 void removeTimepoint(int which)
          Delete a timepoint from the Timecourse.
 void setSubdivideAdaptively(boolean adaptive)
          Set whether this timecourse should be evaluated by adaptive subdivision (to minimize the amount of calculation that needs to be done) or always subdivided a fixed number of times.
 void setTimepoints(Keyframe[] value, double[] time, Smoothness[] smoothness)
          Set the timepoints defining this Timecourse.
 Timecourse subdivide(int method)
          Return a subdivided version of this Timecourse.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISCONTINUOUS

public static final int DISCONTINUOUS
See Also:
Constant Field Values

LINEAR

public static final int LINEAR
See Also:
Constant Field Values

INTERPOLATING

public static final int INTERPOLATING
See Also:
Constant Field Values

APPROXIMATING

public static final int APPROXIMATING
See Also:
Constant Field Values
Constructor Detail

Timecourse

public Timecourse(Keyframe[] value,
                  double[] time,
                  Smoothness[] smoothness)
Method Detail

setTimepoints

public void setTimepoints(Keyframe[] value,
                          double[] time,
                          Smoothness[] smoothness)
Set the timepoints defining this Timecourse.


addTimepoint

public int addTimepoint(Keyframe v,
                        double t,
                        Smoothness s)
Add a new timepoint to the Timecourse, and return its index in the list.


removeTimepoint

public void removeTimepoint(double t)
Delete the timepoint at the specified time from the Timecourse.


removeTimepoint

public void removeTimepoint(int which)
Delete a timepoint from the Timecourse.


removeAllTimepoints

public void removeAllTimepoints()
Delete all timepoints from this timecourse.


moveTimepoint

public int moveTimepoint(int which,
                         double t)
Move a timepoint to a different time, and return its new index in the list.


getTimes

public double[] getTimes()
Get the time values for this Timecourse.


getValues

public Keyframe[] getValues()
Get the values for this Timecourse.


getSmoothness

public Smoothness[] getSmoothness()
Get the smoothness values for this Timecourse.


getSubdivideAdaptively

public boolean getSubdivideAdaptively()
Get whether this timecourse should be evaluated by adaptive subdivision (to minimize the amount of calculation that needs to be done) or always subdivided a fixed number of times.


setSubdivideAdaptively

public void setSubdivideAdaptively(boolean adaptive)
Set whether this timecourse should be evaluated by adaptive subdivision (to minimize the amount of calculation that needs to be done) or always subdivided a fixed number of times.


duplicate

public Timecourse duplicate(java.lang.Object owner)
Create a duplicate of this Timecourse for a (possibly different) object.


subdivide

public Timecourse subdivide(int method)
Return a subdivided version of this Timecourse.


evaluate

public Keyframe evaluate(double t,
                         int method)
Evaluate the Timecourse for a particular time, using a particular interpolation method.



Copyright © 1999-2011 by Peter Eastman.