Example #1
0
 public String verticesToString() {
   String result = "List of vertices\n";
   Iterator it = this.vertices.iterator();
   int cont = 0;
   while (it.hasNext()) {
     Vertex v = (Vertex) it.next();
     result = result + "v" + cont + " " + v.getPoint().toString() + "\n";
     cont++;
   }
   return result;
 }
Example #2
0
 public String facesToString() {
   String result = "List of faces\n";
   Iterator it = this.facets.iterator();
   int cont = 0;
   while (it.hasNext()) {
     Face<X> f = (Face<X>) it.next();
     result = result + "f" + cont + " ";
     Halfedge<X> e = f.getEdge();
     while (e.getNext() != f.getEdge()) {
       result = result + vertices.indexOf(e.getVertex()) + " ";
       e = e.getNext();
     }
     result = result + vertices.indexOf(e.getVertex()) + "\n";
     cont++;
   }
   return result;
 }