private void populateTransform(Type type, int index, List<KeyFrame> keyFrames, KeyFrame currentKeyFrame, TransformIndices transformIndices) {
        Object transform = getTransform(type, currentKeyFrame);
        if (transform != null) {
            getArray(type)[index] = transform;
            transformIndices.last = index;
        } else {
            transformIndices.next = findNext(keyFrames, type, index);
            if (transformIndices.next == -1) {
                //no next let's use prev value.
                if (transformIndices.last == -1) {
                    //last Transform Index = -1 it means there are no transforms. nothing more to do
                    return;
                }
                KeyFrame lastKeyFrame = keyFrames.get(transformIndices.last);
                getArray(type)[index] = getTransform(type, lastKeyFrame);
                return;
            }
            KeyFrame nextKeyFrame = keyFrames.get(transformIndices.next);
            if (transformIndices.last == -1) {
                //no previous transforms let's use the new one.
                translations[index] = nextKeyFrame.translation;
            } else {
                //interpolation between the previous transform and the next one.
                KeyFrame lastKeyFrame = keyFrames.get(transformIndices.last);
                float ratio = currentKeyFrame.time / (nextKeyFrame.time - lastKeyFrame.time);
                interpolate(type, ratio, lastKeyFrame, nextKeyFrame, index);
            }

        }
    }
Verify that the
{@link #times}, {@link #translations}, {@link #rotations}, and
{@link #scales} vectors all have the same length, if present.

@throws AssetLoadException if the lengths differ
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/TrackData.java