/** * Remove KeyFrame according to {@code index} in the list and {@link #stopInterpolation()} if * {@link #interpolationStarted()}. If {@code index < 0 || index >= keyFr.size()} the call is * silently ignored. */ public void removeKeyFrame(int index) { if (index < 0 || index >= keyFrameList.size()) return; valuesAreValid = false; pathIsValid = false; currentFrmValid = false; if (interpolationStarted()) stopInterpolation(); KeyFrame kf = keyFrameList.remove(index); for (Agent agent : gScene.inputHandler().agents()) agent.removeGrabber(kf.frm); setInterpolationTime(firstTime()); }