com.sun.j3d.utils.behaviors.interpolators
Class TCBSplinePathInterpolator

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Leaf
              extended by javax.media.j3d.Behavior
                  extended by javax.media.j3d.Interpolator
                      extended by javax.media.j3d.TransformInterpolator
                          extended by com.sun.j3d.utils.behaviors.interpolators.TCBSplinePathInterpolator
Direct Known Subclasses:
RotPosScaleTCBSplinePathInterpolator

public abstract class TCBSplinePathInterpolator
extends javax.media.j3d.TransformInterpolator

TCBSplinePathInterpolator behavior. This class defines the base class for all TCB (Kochanek-Bartels) Spline Path Interpolators.

Since:
Java3D 1.1

Field Summary
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
TCBSplinePathInterpolator(javax.media.j3d.Alpha alpha, TCBKeyFrame[] keys)
          Deprecated. As of Java 3D version 1.3, replaced by TCBSplinePathInterpolator(Alpha, TransformGroup, TCBKeyFrame[])
TCBSplinePathInterpolator(javax.media.j3d.Alpha alpha, javax.media.j3d.TransformGroup target, TCBKeyFrame[] keys)
          Constructs a new TCBSplinePathInterpolator object that interpolates between keyframes with specified alpha, target and default axisOfTransform set to identity.
TCBSplinePathInterpolator(javax.media.j3d.Alpha alpha, javax.media.j3d.TransformGroup target, javax.media.j3d.Transform3D axisOfTransform, TCBKeyFrame[] keys)
          Constructs a new TCBSplinePathInterpolator object that interpolates between keyframes with specified alpha, target and axisOfTransform.
 
Method Summary
 void duplicateNode(javax.media.j3d.Node originalNode, boolean forceDuplicate)
          Copies all TCBSplinePathInterpolator information from originalNode into the current node.
 int getArrayLength()
          This method retrieves the length of the key frame array.
 TCBKeyFrame getKeyFrame(int index)
          This method retrieves the key frame at the specified index.
 
Methods inherited from class javax.media.j3d.TransformInterpolator
computeTransform, getTarget, getTransformAxis, processStimulus, setTarget, setTransformAxis, updateNodeReferences
 
Methods inherited from class javax.media.j3d.Interpolator
getAlpha, initialize, setAlpha
 
Methods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval
 
Methods inherited from class javax.media.j3d.Node
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TCBSplinePathInterpolator

public TCBSplinePathInterpolator(javax.media.j3d.Alpha alpha,
                                 TCBKeyFrame[] keys)
Deprecated. As of Java 3D version 1.3, replaced by TCBSplinePathInterpolator(Alpha, TransformGroup, TCBKeyFrame[])


TCBSplinePathInterpolator

public TCBSplinePathInterpolator(javax.media.j3d.Alpha alpha,
                                 javax.media.j3d.TransformGroup target,
                                 TCBKeyFrame[] keys)
Constructs a new TCBSplinePathInterpolator object that interpolates between keyframes with specified alpha, target and default axisOfTransform set to identity. It takes at least two key frames. The first key frame's knot must have a value of 0.0 and the last knot must have a value of 1.0. An intermediate key frame with index k must have a knot value strictly greater than the knot value of a key frame with index less than k. Once this constructor has all the valid key frames it creates its own list of key fames that duplicates the first key frame at the beginning of the list and the last key frame at the end of the list.

Parameters:
alpha - the alpha object for this interpolator
target - the TransformGroup node effected by this TCBSplinePathInterpolator
keys - an array of TCBKeyFrame. Requires at least two key frames.
Since:
Java 3D 1.3

TCBSplinePathInterpolator

public TCBSplinePathInterpolator(javax.media.j3d.Alpha alpha,
                                 javax.media.j3d.TransformGroup target,
                                 javax.media.j3d.Transform3D axisOfTransform,
                                 TCBKeyFrame[] keys)
Constructs a new TCBSplinePathInterpolator object that interpolates between keyframes with specified alpha, target and axisOfTransform. It takes at least two key frames. The first key frame's knot must have a value of 0.0 and the last knot must have a value of 1.0. An intermediate key frame with index k must have a knot value strictly greater than the knot value of a key frame with index less than k. Once this constructor has all the valid key frames it creates its own list of key fames that duplicates the first key frame at the beginning of the list and the last key frame at the end of the list.

Parameters:
alpha - the alpha object for this interpolator
target - the TransformGroup node effected by this TCBSplinePathInterpolator
axisOfTransform - the transform that defines the local coordinate
keys - an array of TCBKeyFrame. Requires at least two key frames.
Since:
Java 3D 1.3
Method Detail

getArrayLength

public int getArrayLength()
This method retrieves the length of the key frame array.

Returns:
the number of key frames

getKeyFrame

public TCBKeyFrame getKeyFrame(int index)
This method retrieves the key frame at the specified index.

Parameters:
index - the index of the key frame requested
Returns:
the key frame at the associated index

duplicateNode

public void duplicateNode(javax.media.j3d.Node originalNode,
                          boolean forceDuplicate)
Copies all TCBSplinePathInterpolator information from originalNode into the current node. This method is called from the cloneNode method which is, in turn, called by the cloneTree method.

Overrides:
duplicateNode in class javax.media.j3d.Node
Parameters:
originalNode - the original node to duplicate.
forceDuplicate - when set to true, causes the duplicateOnCloneTree flag to be ignored. When false, the value of each node's duplicateOnCloneTree variable determines whether NodeComponent data is duplicated or copied.
Throws:
javax.media.j3d.RestrictedAccessException - if this object is part of a live or compiled scenegraph.
See Also:
Node.duplicateNode(javax.media.j3d.Node, boolean), Node.cloneTree(), NodeComponent.setDuplicateOnCloneTree(boolean)