Skip to content

Commit

Permalink
Pass the border to all polygons (not only the ones with holes)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed Jun 20, 2021
1 parent c5fdc66 commit 80d19e2
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -168,15 +168,15 @@ public void drawGeometry(final Geometry geom, final boolean solid, final Color b
}

private void drawPolyhedron(final Polygon polygon, final boolean solid, final double height, final Color border) {
final boolean hasHoles = getHolesNumber(polygon) > 0;
// final boolean hasHoles = getHolesNumber(polygon) > 0;
// Draw bottom
drawPolygon(polygon, solid, hasHoles ? border : null, true, true);
drawPolygon(polygon, solid, border, /* hasHoles ? border : null, */ true, true);
_vertices.getNormal(true, height, _normal);
try {
gl.pushMatrix();
gl.translateBy(_normal.x, _normal.y, _normal.z);
// Draw top
drawPolygon(polygon, solid, hasHoles ? border : null, true, false);
drawPolygon(polygon, solid, border, /* hasHoles ? border null, */ true, false);
} finally {
gl.popMatrix();
}
Expand Down

0 comments on commit 80d19e2

Please sign in to comment.