artofillusion.animation
Class FilterParameterTrack

java.lang.Object
  extended by artofillusion.animation.Track
      extended by artofillusion.animation.FilterParameterTrack

public class FilterParameterTrack
extends Track

This is a Track which allows the parameters of an ImageFilter to be keyframed.


Constructor Summary
FilterParameterTrack(java.lang.Object parent, ImageFilter filter)
          Create a new FilterParameterTrack.
 
Method Summary
 void apply(double time)
          Modify the pose of the object.
 boolean canAcceptAsParent(java.lang.Object obj)
          Determine whether this track can be added as a child of an object.
 void copy(Track tr)
          Make this track identical to another one.
 void deleteKeyframe(int which)
          Delete the specified keyframe.
 Track duplicate(java.lang.Object obj)
          Create a duplicate of this track.
 void edit(LayoutWindow win)
          This method presents a window in which the user can edit the track.
 void editKeyframe(LayoutWindow win, int which)
          Present a window in which the user can edit the specified keyframe.
 double[] getDefaultGraphValues()
          Get the default list of graphable values (for a track which has no keyframes).
 ImageFilter getFilter()
          Get the filter corresponding to this track.
 double[] getKeyTimes()
          Get a list of all keyframe times for this track.
 java.lang.Object getParent()
          Get the parent object of this track.
 int getSmoothingMethod()
          Get the smoothing method for this track.
 Track[] getSubtracks()
          This has no child tracks.
 Timecourse getTimecourse()
          Get the timecourse describing this track.
 java.lang.String[] getValueNames()
          Get the names of all graphable values for this track.
 double[][] getValueRange()
          Get the allowed range for graphable values.
 void initFromStream(java.io.DataInputStream in, Scene scene)
          Initialize this tracked based on its serialized representation as written by writeToStream().
 boolean isNullTrack()
          This track is null if it has no keyframes.
 int moveKeyframe(int which, double time)
          Move a keyframe to a new time, and return its new position in the list.
 void setKeyframe(double time, Keyframe k, Smoothness s)
          Set a keyframe at the specified time.
 Keyframe setKeyframe(double time, Scene sc)
          Set a keyframe at the specified time, based on the current state of the Scene.
 Keyframe setKeyframeIfModified(double time, Scene sc)
          Set a keyframe at the specified time, based on the current state of the Scene, if and only if the Scene does not match the current state of the track.
 void setParent(java.lang.Object obj)
          Set the parent object of this track.
 void setSmoothingMethod(int method)
          Set the smoothing method for this track.
 void writeToStream(java.io.DataOutputStream out, Scene sc)
          Write a serialized representation of this track to a stream.
 
Methods inherited from class artofillusion.animation.Track
deleteDependencies, getDependencies, getGraphValues, getName, isEnabled, isQuantized, setEnabled, setName, setQuantized, updateObjectReferences
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterParameterTrack

public FilterParameterTrack(java.lang.Object parent,
                            ImageFilter filter)
Create a new FilterParameterTrack.

Method Detail

getFilter

public ImageFilter getFilter()
Get the filter corresponding to this track.


apply

public void apply(double time)
Modify the pose of the object.

Specified by:
apply in class Track

duplicate

public Track duplicate(java.lang.Object obj)
Create a duplicate of this track.

Specified by:
duplicate in class Track

copy

public void copy(Track tr)
Make this track identical to another one.

Specified by:
copy in class Track

getKeyTimes

public double[] getKeyTimes()
Get a list of all keyframe times for this track.

Specified by:
getKeyTimes in class Track

getTimecourse

public Timecourse getTimecourse()
Get the timecourse describing this track.

Overrides:
getTimecourse in class Track

setKeyframe

public void setKeyframe(double time,
                        Keyframe k,
                        Smoothness s)
Set a keyframe at the specified time.

Overrides:
setKeyframe in class Track

setKeyframe

public Keyframe setKeyframe(double time,
                            Scene sc)
Set a keyframe at the specified time, based on the current state of the Scene.

Overrides:
setKeyframe in class Track

setKeyframeIfModified

public Keyframe setKeyframeIfModified(double time,
                                      Scene sc)
Set a keyframe at the specified time, based on the current state of the Scene, if and only if the Scene does not match the current state of the track. Return the new Keyframe, or null if none was set.

Overrides:
setKeyframeIfModified in class Track

moveKeyframe

public int moveKeyframe(int which,
                        double time)
Move a keyframe to a new time, and return its new position in the list.

Specified by:
moveKeyframe in class Track

deleteKeyframe

public void deleteKeyframe(int which)
Delete the specified keyframe.

Specified by:
deleteKeyframe in class Track

isNullTrack

public boolean isNullTrack()
This track is null if it has no keyframes.

Specified by:
isNullTrack in class Track

getSubtracks

public Track[] getSubtracks()
This has no child tracks.

Overrides:
getSubtracks in class Track

canAcceptAsParent

public boolean canAcceptAsParent(java.lang.Object obj)
Determine whether this track can be added as a child of an object.

Overrides:
canAcceptAsParent in class Track

getParent

public java.lang.Object getParent()
Get the parent object of this track.

Overrides:
getParent in class Track

setParent

public void setParent(java.lang.Object obj)
Set the parent object of this track.

Overrides:
setParent in class Track

getSmoothingMethod

public int getSmoothingMethod()
Get the smoothing method for this track.

Overrides:
getSmoothingMethod in class Track

setSmoothingMethod

public void setSmoothingMethod(int method)
Set the smoothing method for this track.


getValueNames

public java.lang.String[] getValueNames()
Get the names of all graphable values for this track.

Overrides:
getValueNames in class Track

getDefaultGraphValues

public double[] getDefaultGraphValues()
Get the default list of graphable values (for a track which has no keyframes).

Overrides:
getDefaultGraphValues in class Track

getValueRange

public double[][] getValueRange()
Get the allowed range for graphable values. This returns a 2D array, where elements [n][0] and [n][1] are the minimum and maximum allowed values, respectively, for the nth graphable value.

Overrides:
getValueRange in class Track

writeToStream

public void writeToStream(java.io.DataOutputStream out,
                          Scene sc)
                   throws java.io.IOException
Write a serialized representation of this track to a stream.

Specified by:
writeToStream in class Track
Throws:
java.io.IOException

initFromStream

public void initFromStream(java.io.DataInputStream in,
                           Scene scene)
                    throws java.io.IOException,
                           java.io.InvalidObjectException
Initialize this tracked based on its serialized representation as written by writeToStream().

Specified by:
initFromStream in class Track
Throws:
java.io.IOException
java.io.InvalidObjectException

editKeyframe

public void editKeyframe(LayoutWindow win,
                         int which)
Present a window in which the user can edit the specified keyframe.

Overrides:
editKeyframe in class Track

edit

public void edit(LayoutWindow win)
This method presents a window in which the user can edit the track.

Specified by:
edit in class Track


Copyright © 1999-2011 by Peter Eastman.