artofillusion.object
Class Tube.TubeKeyframe

java.lang.Object
  extended by artofillusion.animation.MeshGesture
      extended by artofillusion.object.Tube.TubeKeyframe
All Implemented Interfaces:
Gesture, Keyframe
Enclosing class:
Tube

public static class Tube.TubeKeyframe
extends MeshGesture

This class represents a pose of a Tube.


Constructor Summary
Tube.TubeKeyframe(java.io.DataInputStream in, java.lang.Object parent)
          Reconstructs the keyframe from its serialized representation.
Tube.TubeKeyframe(Tube tube)
           
 
Method Summary
 Keyframe blend(Keyframe o2, double weight1, double weight2)
          These methods return a new Keyframe which is a weighted average of this one and one, two, or three others.
 Keyframe blend(Keyframe o2, Keyframe o3, double weight1, double weight2, double weight3)
          Return a new Keyframe which is a weighted average of this one and two others.
 Keyframe blend(Keyframe o2, Keyframe o3, Keyframe o4, double weight1, double weight2, double weight3, double weight4)
          Return a new Keyframe which is a weighted average of this one and three others.
 void blendSurface(MeshGesture average, MeshGesture[] p, double[] weight)
          Modify the mesh surface of a Gesture to be a weighted average of an arbitrary list of Gestures, averaged about this pose.
 Keyframe duplicate()
          Create a duplicate of this keyframe.
 Keyframe duplicate(java.lang.Object owner)
          Create a duplicate of this keyframe for a (possibly different) object.
 boolean equals(Keyframe k)
          Determine whether this keyframe is identical to another one.
 double[] getGraphValues()
          Get the list of graphable values for this keyframe.
 Skeleton getSkeleton()
          Get the skeleton for this pose (or null if it doesn't have one).
 ParameterValue getTextureParameter(TextureParameter p)
          Get the value of a per-vertex texture parameter.
 void setGraphValues(double[] values)
          Set the list of graphable values for this keyframe.
 void setSkeleton(Skeleton s)
          Set the skeleton for this pose.
 void setTextureParameter(TextureParameter p, ParameterValue value)
          Set the value of a per-vertex texture parameter.
 void textureChanged(TextureParameter[] oldParams, TextureParameter[] newParams)
          Update the texture parameter values when the texture is changed.
 void writeToStream(java.io.DataOutputStream out)
          Write out a representation of this keyframe to a stream.
 
Methods inherited from class artofillusion.animation.MeshGesture
blend, blendSkeleton
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tube.TubeKeyframe

public Tube.TubeKeyframe(Tube tube)

Tube.TubeKeyframe

public Tube.TubeKeyframe(java.io.DataInputStream in,
                         java.lang.Object parent)
                  throws java.io.IOException,
                         java.io.InvalidObjectException
Reconstructs the keyframe from its serialized representation.

Throws:
java.io.IOException
java.io.InvalidObjectException
Method Detail

getSkeleton

public Skeleton getSkeleton()
Get the skeleton for this pose (or null if it doesn't have one).


setSkeleton

public void setSkeleton(Skeleton s)
Set the skeleton for this pose.


duplicate

public Keyframe duplicate()
Create a duplicate of this keyframe.


duplicate

public Keyframe duplicate(java.lang.Object owner)
Description copied from interface: Keyframe
Create a duplicate of this keyframe for a (possibly different) object.


getGraphValues

public double[] getGraphValues()
Get the list of graphable values for this keyframe.


setGraphValues

public void setGraphValues(double[] values)
Set the list of graphable values for this keyframe.


blend

public Keyframe blend(Keyframe o2,
                      double weight1,
                      double weight2)
These methods return a new Keyframe which is a weighted average of this one and one, two, or three others. These methods should never be called, since Tubes can only be keyframed by converting them to Actors.


blend

public Keyframe blend(Keyframe o2,
                      Keyframe o3,
                      double weight1,
                      double weight2,
                      double weight3)
Description copied from interface: Keyframe
Return a new Keyframe which is a weighted average of this one and two others.


blend

public Keyframe blend(Keyframe o2,
                      Keyframe o3,
                      Keyframe o4,
                      double weight1,
                      double weight2,
                      double weight3,
                      double weight4)
Description copied from interface: Keyframe
Return a new Keyframe which is a weighted average of this one and three others.


blendSurface

public void blendSurface(MeshGesture average,
                         MeshGesture[] p,
                         double[] weight)
Modify the mesh surface of a Gesture to be a weighted average of an arbitrary list of Gestures, averaged about this pose. This method only modifies the vertex positions and texture parameters, not the skeleton, and all vertex positions are based on the offsets from the joints they are bound to.

Overrides:
blendSurface in class MeshGesture
Parameters:
average - the Gesture to modify to be an average of other Gestures
p - the list of Gestures to average
weight - the weights for the different Gestures

equals

public boolean equals(Keyframe k)
Determine whether this keyframe is identical to another one.


textureChanged

public void textureChanged(TextureParameter[] oldParams,
                           TextureParameter[] newParams)
Update the texture parameter values when the texture is changed.


getTextureParameter

public ParameterValue getTextureParameter(TextureParameter p)
Get the value of a per-vertex texture parameter.


setTextureParameter

public void setTextureParameter(TextureParameter p,
                                ParameterValue value)
Set the value of a per-vertex texture parameter.


writeToStream

public void writeToStream(java.io.DataOutputStream out)
                   throws java.io.IOException
Write out a representation of this keyframe to a stream.

Throws:
java.io.IOException


Copyright © 1999-2011 by Peter Eastman.