int getVertexIndex(Vertex v) {
            for (int i = 0; i < 3; i++) {
                if (vertex[i] == v) {
                    return vertexId[i];
                }
            }
            throw new IllegalArgumentException("Vertex " + v + "is not part of triangle" + this);
        }
Collapses vertices until the cost exceeds the given value.

Collapse cost indicates how much inaccuracy the
reduction causes. This generates the best LOD output, but the collapse
cost is implementation-dependant.
jme3-core/src/tools/java/jme3tools/optimize/LodGenerator.java