/** * insert the point to this Delaunay Triangulation. Note: if p is null or * already exist in this triangulation p is ignored. * * @param p * new vertex to be inserted the triangulation. */ public void insertPoint(Point p) { if (vertices.contains(p)) return; modCount++; updateBoundingBox(p); vertices.add(p); Triangle t = insertPointSimple(p); if (t == null) // return; Triangle tt = t; currT = t; // recall the last point for - fast (last) update iterator. do { flip(tt, modCount); tt = tt.getCaTriangle(); } while (tt != t && !tt.isHalfplane()); // Update index with changed triangles if (gridIndex != null) gridIndex.updateIndex(getLastUpdatedTriangles()); }