PathInterpolator class methods

Method

PathInterpolator( Alpha alpha, float[] knots )
void setKnot( int index, float knot )

Path interpolator classes differ from the other interpolators in that they may store two or more values for interpolation.

The Java 3D core provides path interpolator classes for position interpolation, rotation interpolation, position and rotation interpolation, and position, rotation, and scale interpolation. The target of a path interpolator object is a TransformGroup object which changes the position, orientation, and scale, as appropriate, for its child objects.

Path interpolator objects store a set of values, or knots, that are used two at a time for interpolation. The alpha value determines which two knot values are used. The knot values are in the range of 0.0 to 1.0 inclusive, which corresponds to the range of values of the alpha object. The first knot must have a value of 0.0 and the last knot must have a value of 1.0. The remaining knots must be stored in increasing order in the path interpolator object. The knot values correspond with values for the variable parameter(s) (e.g., position or rotation) used in interpolation. There is one parameter value specified for each knot value. The knot with the largest value equal or less than the alpha value, and the next knot, are used. The knots are specified in order, so as the alpha value changes, the knots are used in adjacent pairs.