Class KBRotPosScaleSplinePathInterpolator


  • public class KBRotPosScaleSplinePathInterpolator
    extends KBSplinePathInterpolator
    KBRotPosScaleSplinePathInterpolator behavior. This class defines a behavior that varies the rotational, translational, and scale components of its target TransformGroup by using the Kochanek-Bartels cubic spline interpolation to interpolate among a series of key frames (using the value generated by the specified Alpha object). The interpolated position, orientation, and scale are used to generate a transform in the local coordinate system of this interpolator.
    • Constructor Detail

      • KBRotPosScaleSplinePathInterpolator

        public KBRotPosScaleSplinePathInterpolator​(Alpha alpha,
                                                   TransformGroup target,
                                                   Transform3D axisOfTransform,
                                                   KBKeyFrame[] keys)
        Constructs a new KBRotPosScaleSplinePathInterpolator object that varies the rotation, translation, and scale of the target TransformGroup's transform. At least 2 key frames are required for this interpolator. 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.
        Parameters:
        alpha - the alpha object for this interpolator
        target - the TransformGroup node affected by this interpolator
        axisOfTransform - the transform that specifies the local coordinate system in which this interpolator operates.
        keys - an array of key frames that defien the motion path
    • Method Detail

      • setAxisOfRotPosScale

        public void setAxisOfRotPosScale​(Transform3D axisOfRotPosScale)
        Deprecated.
        As of Java 3D version 1.3, replaced by TransformInterpolator.setTransformAxis(Transform3D)
      • getAxisOfRotPosScale

        public Transform3D getAxisOfRotPosScale()
        Deprecated.
        As of Java 3D version 1.3, replaced by TransformInterpolator.getTransformAxis()
      • setKeyFrame

        public void setKeyFrame​(int index,
                                KBKeyFrame keyFrame)
        Set the key frame at the specified index to keyFrame
        Overrides:
        setKeyFrame in class KBSplinePathInterpolator
        Parameters:
        index - Index of the key frame to change
        keyFrame - The new key frame
      • computeTransform

        public void computeTransform​(float alphaValue,
                                     Transform3D transform)
        Computes the new transform for this interpolator for a given alpha value.
        Specified by:
        computeTransform in class TransformInterpolator
        Parameters:
        alphaValue - alpha value between 0.0 and 1.0
        transform - object that receives the computed transform for the specified alpha value
        Since:
        Java 3D 1.3