if (verts == null || verts.length != batch.getIndexBuffer() .capacity()) verts = new Vector3f[batch.getIndexBuffer().capacity()]; batch.getIndexBuffer().rewind(); for (int i = 0; i < verts.length; i++) { if (verts[i] == null) verts[i] = new Vector3f(); BufferUtils.populateFromBuffer(verts[i], batch.getVertexBuffer(), batch.getIndexBuffer().get(i)); } return verts;
if (batch != null) return batch.getMeshAsTrianglesVertices(verts); else return verts;
    public Vector3f[] getMeshAsTrianglesVertices(int batchIndex, Vector3f[] verts) {        TriangleBatch batch = getBatch(batchIndex);        if (verts == null                || verts.length != batch.getIndexBuffer()                        .capacity())            verts = new Vector3f[batch.getIndexBuffer().capacity()];        batch.getIndexBuffer().rewind();        for (int i = 0; i < verts.length; i++) {            if (verts[i] == null)                verts[i] = new Vector3f();            BufferUtils.populateFromBuffer(verts[i], batch.getVertexBuffer(),                    batch.getIndexBuffer().get(i));        }        return verts;    }