@Override
    public void getDataAtTime(double t, float[] store) {
        float time = (float) t;

        int lastFrame = times.length - 1;
        if (time < 0 || lastFrame == 0) {
            if (weights != null) {
                System.arraycopy(weights,0,store,0, nbMorphTargets);
            }
            return;
        }

        int startFrame = 0;
        int endFrame = 1;
        float blend = 0;
        if (time >= times[lastFrame]) {
            startFrame = lastFrame;

            time = time - times[startFrame] + times[startFrame - 1];
            blend = (time - times[startFrame - 1])
                    / (times[startFrame] - times[startFrame - 1]);

        } else {
            // use lastFrame so we never overflow the array
            int i;
            for (i = 0; i < lastFrame && times[i] < time; i++) {
                startFrame = i;
                endFrame = i + 1;
            }
            blend = (time - times[startFrame])
                    / (times[endFrame] - times[startFrame]);
        }

        FrameInterpolator fi = (interpolator == null)
                ? FrameInterpolator.getThreadDefault() : interpolator;
        fi.interpolateWeights(blend, startFrame, weights, nbMorphTargets, store);
    }
Sets the number of morph targets and the corresponding weights.
Note that the number of weights must equal the number of frames times the number of morph targets.

@param weights        the weights for each frame (alias created
                      -- do not modify after passing it to this setter)
@param nbMorphTargets the desired number of morph targets
@throws IllegalArgumentException if the number of weights and the new
        number of morph targets violate the frame count constraint
jme3-core/src/main/java/com/jme3/anim/MorphTrack.java