Ejemplo n.º 1
0
  public static LineCollection dCEdgeListToLines(DoublyConnectedEdgeList p) {

    LineCollection lc = new LineCollection();
    Vector<DCHalfEdge> edges = p.edges;
    for (int i = 0; i < edges.size(); i++) {
      lc.addLine(edges.get(i).start.copy(), edges.get(i).end.copy());
    }
    return lc;
  }
Ejemplo n.º 2
0
 public static DoublyConnectedEdgeList linesToDCEdgeList(LineCollection lc) {
   DoublyConnectedEdgeList p = new DoublyConnectedEdgeList();
   Vector<Line> l = lc.getAllLines();
   for (int i = 0; i < l.size(); i++) {
     p.addHalfEdge(new DCHalfEdge(l.get(i).start.copy(), l.get(i).end.copy()));
   }
   return p;
 }