Skip to content
Permalink
Browse files
using enhanced for loop when possible
  • Loading branch information
darkma773r committed Jul 4, 2020
1 parent 3c25e07 commit 385c02a9b2cc924ebdaacc8ba02f93b76cac31cc
Showing 3 changed files with 6 additions and 6 deletions.
@@ -328,8 +328,8 @@ public static List<ConvexPolygon3D> indexedConvexPolygons(final List<Vector3D> v
i, face.length));
}

for (int j = 0; j < face.length; ++j) {
faceVertices.add(vertices.get(face[j]));
for (final int vertexIndex : face) {
faceVertices.add(vertices.get(vertexIndex));
}

polygons.add(convexPolygonFromVertices(
@@ -243,9 +243,9 @@ private void writeFaceWithVertexOffset(final int vertexOffset, final int... vert

writer.write('f');

for (int i = 0; i < vertexIndices.length; ++i) {
for (final int vertexIndex : vertexIndices) {
writer.write(SPACE);
writer.write(String.valueOf(vertexIndices[i] + vertexOffset));
writer.write(String.valueOf(vertexIndex + vertexOffset));
}

writer.write(lineSeparator);
@@ -246,9 +246,9 @@ private void writeFaceWithVertexOffset(final int vertexOffset, final int... vert

writer.write(OBJConstants.FACE_KEYWORD);

for (int i = 0; i < vertexIndices.length; ++i) {
for (final int vertexIndex : vertexIndices) {
writer.write(SPACE);
writer.write(String.valueOf(vertexIndices[i] + vertexOffset));
writer.write(String.valueOf(vertexIndex + vertexOffset));
}

writer.write(lineSeparator);

0 comments on commit 385c02a

Please sign in to comment.