/**
   * Set all the key frames
   *
   * @param keyFrames The new key frames
   */
  public void setKeyFrames(KBKeyFrame[] keyFrame) {
    super.setKeyFrames(keyFrame);

    // Create a spline curve using the derived key frames
    cubicSplineCurve = new KBCubicSplineCurve(this.keyFrames);
    numSegments = cubicSplineCurve.numSegments;
  }
  /**
   * Set the key frame at the specified index to <code>keyFrame</code>
   *
   * @param index Index of the key frame to change
   * @param keyFrame The new key frame
   */
  public void setKeyFrame(int index, KBKeyFrame keyFrame) {
    super.setKeyFrame(index, keyFrame);

    // TODO Optimize this
    // Create a spline curve using the derived key frames
    cubicSplineCurve = new KBCubicSplineCurve(this.keyFrames);
    numSegments = cubicSplineCurve.numSegments;
  }
  /**
   * Copies KBRotPosScaleSplinePathInterpolator information from <code>originalNode</code> into the
   * current node. This method is called from the <code>cloneNode</code> method which is, in turn,
   * called by the <code>cloneTree</code> method.
   *
   * <p>
   *
   * @param originalNode the original node to duplicate.
   * @param forceDuplicate when set to <code>true</code>, causes the <code>duplicateOnCloneTree
   *     </code> flag to be ignored. When <code>false</code>, the value of each node's <code>
   *     duplicateOnCloneTree</code> variable determines whether NodeComponent data is duplicated or
   *     copied.
   * @exception RestrictedAccessException if this object is part of a live or compiled scenegraph.
   * @see Node#duplicateNode
   * @see Node#cloneTree
   * @see NodeComponent#setDuplicateOnCloneTree
   */
  public void duplicateNode(Node originalNode, boolean forceDuplicate) {
    super.duplicateNode(originalNode, forceDuplicate);

    KBRotPosScaleSplinePathInterpolator interpolator =
        (KBRotPosScaleSplinePathInterpolator) originalNode;
    setAxisOfRotPosScale(interpolator.axis);
    target = interpolator.target;
    cubicSplineCurve = new KBCubicSplineCurve(interpolator.keyFrames);
    numSegments = cubicSplineCurve.numSegments;
  }