javax.media.j3d
Class PathInterpolator

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 javax.media.j3d.PathInterpolator
Direct Known Subclasses:
PositionPathInterpolator, RotationPathInterpolator, RotPosPathInterpolator, RotPosScalePathInterpolator

public abstract class PathInterpolator
extends TransformInterpolator

PathInterpolator behavior. This class defines the base class for all Path Interpolators. Subclasses have access to the computePathInterpolation() method, which computes the currentInterpolationValue given the current time and alpha. The method also computes the currentKnotIndex, which is based on the currentInterpolationValue. The currentInterpolationValue is calculated by linearly interpolating among a series of predefined knots (using the value generated by the specified Alpha object). The first knot must have a value of 0.0 and the last knot must have a value of 1.0. An intermediate knot with index k must have a value strictly greater than any knot with index less than k.


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
PathInterpolator(Alpha alpha, float[] knots)
          Deprecated. As of Java 3D version 1.3, replaced by PathInterpolator(Alpha, TransformGroup, float[])
PathInterpolator(Alpha alpha, TransformGroup target, float[] knots)
          Constructs a new PathInterpolator object that interpolates between the knot values in the knots array.
PathInterpolator(Alpha alpha, TransformGroup target, Transform3D axisOfTransform, float[] knots)
          Constructs a new PathInterpolator object that interpolates between the knot values in the knots array.
 
Method Summary
 int getArrayLengths()
          Retrieves the length of the knots array.
 float getKnot(int index)
          Retrieves the knot at the specified index.
 void getKnots(float[] knots)
          Copies the array of knots from this interpolator into the specified array.
 void setKnot(int index, float knot)
          Sets the knot at the specified index for this interpolator.
 
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, duplicateNode, 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

PathInterpolator

public PathInterpolator(Alpha alpha,
                        float[] knots)
Deprecated. As of Java 3D version 1.3, replaced by PathInterpolator(Alpha, TransformGroup, float[])

Constructs a new PathInterpolator object that interpolates between the knot values in the knots array. The array of knots is copied into this PathInterpolator object.

Parameters:
alpha - the alpha object for this interpolator.
knots - an array of knot values that specify interpolation points.

PathInterpolator

public PathInterpolator(Alpha alpha,
                        TransformGroup target,
                        float[] knots)
Constructs a new PathInterpolator object that interpolates between the knot values in the knots array. The array of knots is copied into this PathInterpolator object.

Parameters:
alpha - the alpha object for this interpolator.
target - the transformgroup node effected by this pathInterpolator
knots - an array of knot values that specify interpolation points.
Since:
Java 3D 1.3

PathInterpolator

public PathInterpolator(Alpha alpha,
                        TransformGroup target,
                        Transform3D axisOfTransform,
                        float[] knots)
Constructs a new PathInterpolator object that interpolates between the knot values in the knots array. The array of knots is copied into this PathInterpolator object.

Parameters:
alpha - the alpha object for this interpolator.
target - the transform node effected by this positionInterpolator
axisOfTransform - the transform that defines the local coordinate
knots - an array of knot values that specify interpolation points.
Since:
Java 3D 1.3
Method Detail

getArrayLengths

public int getArrayLengths()
Retrieves the length of the knots array.

Returns:
the array length

setKnot

public void setKnot(int index,
                    float knot)
Sets the knot at the specified index for this interpolator.

Parameters:
index - the index to be changed
knot - the new knot value

getKnot

public float getKnot(int index)
Retrieves the knot at the specified index.

Parameters:
index - the index of the value requested
Returns:
the interpolator's knot value at the associated index

getKnots

public void getKnots(float[] knots)
Copies the array of knots from this interpolator into the specified array. The array must be large enough to hold all of the knots.

Parameters:
knots - array that will receive the knots.
Since:
Java 3D 1.2