private int computeNumElements(int bufSize) {
        switch (mode) {
            case Triangles:
                return bufSize / 3;
            case TriangleFan:
            case TriangleStrip:
                return bufSize - 2;
            case Points:
                return bufSize;
            case Lines:
                return bufSize / 2;
            case LineLoop:
                return bufSize;
            case LineStrip:
                return bufSize - 1;
            case Patch:
                return bufSize / patchVertexCount;
            default:
                throw new UnsupportedOperationException();
        }
    }
Interleaves the data in this mesh. This operation cannot be reversed.
Some GPUs may prefer the data in this format, however it is a good idea
to <em>avoid</em> using this method as it disables some engine features.
jme3-core/src/main/java/com/jme3/scene/Mesh.java