private org.poly2tri.geometry.polygon.Polygon makePolygon(Polygon polygon) { org.poly2tri.geometry.polygon.Polygon poly = makePolygon(polygon.getExteriorRing()); // Add holes for(int idHole = 0; idHole < polygon.getNumInteriorRing(); idHole++) { poly.addHole(makePolygon(polygon.getInteriorRingN(idHole))); } return poly; }
private static Polygon convert(PolygonWithHolesList2d polygonWithHoles) { Polygon outer = convert(polygonWithHoles.getOuter()); if (polygonWithHoles.getInner() != null) { for (PolygonList2d inner : polygonWithHoles.getInner()) { outer.addHole(convert(inner)); } } return outer; }
private org.poly2tri.geometry.polygon.Polygon makePolygon(Polygon polygon) { org.poly2tri.geometry.polygon.Polygon poly = makePolygon(polygon.getExteriorRing()); // Add holes for(int idHole = 0; idHole < polygon.getNumInteriorRing(); idHole++) { poly.addHole(makePolygon(polygon.getInteriorRingN(idHole))); } return poly; }
private org.poly2tri.geometry.polygon.Polygon makePolygon(Polygon polygon) { org.poly2tri.geometry.polygon.Polygon poly = makePolygon(polygon.getExteriorRing()); // Add holes for(int idHole = 0; idHole < polygon.getNumInteriorRing(); idHole++) { poly.addHole(makePolygon(polygon.getInteriorRingN(idHole))); } return poly; }