VerboseBuffer buffer = new VerboseBuffer(ib); for (int c = lod; c < getWidth() - (1 * lod); c += lod) { // column int idx = rowIdx + c; buffer.put(idx); idx = nextRowIdx + c; buffer.put(idx); buffer.put(idx); idx = nextRowIdx + (1 * lod); // inset by 1 buffer.put(idx); buffer.put(br); // bottom right -1 int corner = getWidth() * getWidth() - 1; buffer.put(corner); // bottom right corner if (rightLod) { // if lower LOD for (int row = getWidth() - lod; row >= 1 + lod; row -= 2 * lod) { int idx = (row) * getWidth() - 1 - lod; buffer.put(idx); idx = (row - lod) * getWidth() - 1; buffer.put(idx); if (row > lod + 1) { //if not the last one idx = (row - lod) * getWidth() - 1 - lod; buffer.put(idx); idx = (row - lod) * getWidth() - 1; buffer.put(idx); } else { buffer.put(corner);//br+1);//degenerate to flip winding order
VerboseBuffer buffer = new VerboseBuffer(ib); for (int c = lod; c < getWidth() - (1 * lod); c += lod) { // column int idx = rowIdx + c; buffer.put(idx); idx = nextRowIdx + c; buffer.put(idx); buffer.put(idx); idx = nextRowIdx + (1 * lod); // inset by 1 buffer.put(idx); buffer.put(br); // bottom right -1 int corner = getWidth() * getWidth() - 1; buffer.put(corner); // bottom right corner if (rightLod > lod) { // if lower LOD int idx = corner; buffer.put(getWidth() - 1); } else if (j == lodDiff) { buffer.put(idxB); buffer.put(idxB + lod); } else { buffer.put(idxB); buffer.put(idx); buffer.put(getWidth() * (lod + 1) - lod - 1); // top-right +1row buffer.put(getWidth() - 1);// top-right
VerboseBuffer buffer = new VerboseBuffer(ib); for (int c = lod; c < getWidth() - (1 * lod); c += lod) { // column int idx = rowIdx + c; buffer.put(idx); idx = nextRowIdx + c; buffer.put(idx); buffer.put(idx); idx = nextRowIdx + (1 * lod); // inset by 1 buffer.put(idx); buffer.put(br); // bottom right -1 int corner = getWidth() * getWidth() - 1; buffer.put(corner); // bottom right corner if (rightLod > lod) { // if lower LOD int idx = corner; buffer.put(getWidth() - 1); } else if (j == lodDiff) { buffer.put(idxB); buffer.put(idxB + lod); } else { buffer.put(idxB); buffer.put(idx); buffer.put(getWidth() * (lod + 1) - lod - 1); // top-right +1row buffer.put(getWidth() - 1);// top-right
VerboseBuffer buffer = new VerboseBuffer(ib); for (int c = lod; c < getWidth() - (1 * lod); c += lod) { // column int idx = rowIdx + c; buffer.put(idx); idx = nextRowIdx + c; buffer.put(idx); buffer.put(idx); idx = nextRowIdx + (1 * lod); // inset by 1 buffer.put(idx); buffer.put(br); // bottom right -1 int corner = getWidth() * getWidth() - 1; buffer.put(corner); // bottom right corner if (rightLod) { // if lower LOD for (int row = getWidth() - lod; row >= 1 + lod; row -= 2 * lod) { int idx = (row) * getWidth() - 1 - lod; buffer.put(idx); idx = (row - lod) * getWidth() - 1; buffer.put(idx); if (row > lod + 1) { //if not the last one idx = (row - lod) * getWidth() - 1 - lod; buffer.put(idx); idx = (row - lod) * getWidth() - 1; buffer.put(idx); } else { buffer.put(corner);//br+1);//degenerate to flip winding order