private VertexBuffer[] cleanBuffer(VertexBuffer[] lods, int numBakedLods) {
        int index = 0;
        VertexBuffer[] result = new VertexBuffer[numBakedLods];

        for (VertexBuffer lod : lods) {
            if (lod != null) {
                result[index] = lod;
                index++;
            }
        }

        return result;
    }
Computes the LODs and returns an array of VertexBuffers that can
be passed to Mesh.setLodLevels(). <br>

This method must be fed with the reduction method
{@link TriangleReductionMethod} and a list of reduction values.<br> for
each value a LOD will be generated. <br> The resulting array will always
contain at index 0 the original index buffer of the mesh. <p>
<strong>Important note :</strong> some meshes cannot be decimated, so the
result of this method can vary depending of the given mesh. Also the
reduction values are indicative and the produces mesh will not always
meet the required reduction.

@param reductionMethod the reduction method to use
@param reductionValues the reduction value to use for each LOD level.
@return an array of VertexBuffers containing the different index buffers
representing the LOD levels.
jme3-core/src/tools/java/jme3tools/optimize/LodGenerator.java