Remove unneded commented-out code

This commit is contained in:
Lukas Rieger (Blue) 2022-10-19 23:04:07 +02:00
parent a5c6f5a31f
commit 685a7bf85e
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -628,10 +628,15 @@ private void sort() {
MergeSort.mergeSortInt(materialIndexSort, 0, size, this::compareMaterialIndex, materialIndexSortSupport); MergeSort.mergeSortInt(materialIndexSort, 0, size, this::compareMaterialIndex, materialIndexSortSupport);
// move // move
int s; int s, c;
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
s = materialIndexSort[i]; s = materialIndexSort[i]; c = 0;
while (s < i) s = materialIndexSort[s]; while (s < i) {
s = materialIndexSort[s];
// should never happen, just making absolutely sure this can't get stuck in an endless loop
if (c++ > size) throw new IllegalStateException();
}
swap(i, s); swap(i, s);
} }
} }
@ -696,11 +701,6 @@ private void swap(int face1, int face2) {
vi = materialIndex[face1]; vi = materialIndex[face1];
materialIndex[face1] = materialIndex[face2]; materialIndex[face1] = materialIndex[face2];
materialIndex[face2] = vi; materialIndex[face2] = vi;
//swap material-index-sort (assuming FI_MATERIAL_INDEX = 1)
//vi = materialIndexSort[face1];
//materialIndexSort[face1] = materialIndexSort[face2];
//materialIndexSort[face2] = vi;
} }
private static void calculateSurfaceNormal( private static void calculateSurfaceNormal(