public VertexBuffer clone(Type overrideType) {
        VertexBuffer vb = new VertexBuffer(overrideType);
        vb.components = components;
        vb.componentsLength = componentsLength;

        // Make sure to pass a read-only buffer to clone so that
        // the position information doesn't get clobbered by another
        // reading thread during cloning (and vice versa) since this is
        // a purely read-only operation.
        vb.data = BufferUtils.clone(getDataReadOnly());
        vb.format = format;
        vb.handleRef = new Object();
        vb.id = -1;
        vb.normalized = normalized;
        vb.instanceSpan = instanceSpan;
        vb.offset = offset;
        vb.stride = stride;
        vb.updateNeeded = true;
        vb.usage = usage;
        return vb;
    }
Creates a deep clone of this VertexBuffer but overrides the
{@link Type}.

@param overrideType The type of the cloned VertexBuffer
@return A deep clone of the buffer
jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java