artofillusion.animation
Class IKTrack

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

public class IKTrack
extends Track

This is a Track which modifies the shape of an object using inverse kinematics.


Constructor Summary
IKTrack(ObjectInfo info)
           
 
Method Summary
 void apply(double time)
          Modify the position 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 deleteDependencies(ObjectInfo obj)
          Delete all references to the specified object from this track.
 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.
 ObjectInfo[] getDependencies()
          Get an array of any objects which this track depends on (and which therefore must be updated before this track is applied).
 double[] getKeyTimes()
          Get a list of all keyframe times for this track.
 java.lang.Object getParent()
          Get the parent object of this track.
 Track[] getSubtracks()
          This has a single child track.
 boolean getUseGestures()
          Get whether to reshape the mesh based on its gestures.
 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 targets.
 int moveKeyframe(int which, double time)
          Move a keyframe to a new time, and return its new position in the list.
 void setParent(java.lang.Object obj)
          Set the parent object of this track.
 void setUseGestures(boolean use)
          Set whether to reshape the mesh based on its gestures.
 void updateObjectReferences(java.util.Map<ObjectInfo,ObjectInfo> objectMap)
          Update any references to objects this track depends on.
 void writeToStream(java.io.DataOutputStream out, Scene scene)
          Write a serialized representation of this track to a stream.
 
Methods inherited from class artofillusion.animation.Track
editKeyframe, getDefaultGraphValues, getGraphValues, getName, getSmoothingMethod, getTimecourse, getValueNames, getValueRange, isEnabled, isQuantized, setEnabled, setKeyframe, setKeyframe, setKeyframeIfModified, setName, setQuantized
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IKTrack

public IKTrack(ObjectInfo info)
Method Detail

getUseGestures

public boolean getUseGestures()
Get whether to reshape the mesh based on its gestures.


setUseGestures

public void setUseGestures(boolean use)
Set whether to reshape the mesh based on its gestures.


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

apply

public void apply(double time)
Modify the position 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

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 targets.

Specified by:
isNullTrack in class Track

getSubtracks

public Track[] getSubtracks()
This has a single child track.

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

getDependencies

public ObjectInfo[] getDependencies()
Get an array of any objects which this track depends on (and which therefore must be updated before this track is applied).

Overrides:
getDependencies in class Track

deleteDependencies

public void deleteDependencies(ObjectInfo obj)
Delete all references to the specified object from this track. This is used when an object is deleted from the scene.

Overrides:
deleteDependencies in class Track

updateObjectReferences

public void updateObjectReferences(java.util.Map<ObjectInfo,ObjectInfo> objectMap)
Description copied from class: Track
Update any references to objects this track depends on. Any reference to an object found as a key in the map should be replaced with the corresponding object. This is used, for example, when copying and pasting objects between scenes.

Overrides:
updateObjectReferences in class Track

writeToStream

public void writeToStream(java.io.DataOutputStream out,
                          Scene scene)
                   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


Copyright © 1999-2011 by Peter Eastman.