private void init() { diagram = new PowerDiagram(); if (clipPolygon != null) { maxDelta = Math.max(clipPolygon.getBounds2D().getWidth(), clipPolygon.getBounds2D().getHeight()); } }
/** * The resulting Voronoi Cells are clipped with this polygon * * @param polygon */ public void setClipPolygon(PolygonSimple polygon) { clipPolygon = polygon; maxDelta = Math.max(clipPolygon.getBounds2D().getWidth(), clipPolygon.getBounds2D().getHeight()); if (diagram != null) { diagram.setClipPoly(polygon); } }