Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22386/src/net/sourceforge/bprocessor/model
Modified Files:
Mesh.java
Log Message:
Implemented repeat in move tool
Index: Mesh.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Mesh.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Mesh.java 11 Apr 2007 12:19:41 -0000 1.16
--- Mesh.java 29 May 2007 21:08:43 -0000 1.17
***************
*** 9,14 ****
--- 9,16 ----
import java.util.Collection;
+ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
+ import java.util.Map;
/**
***************
*** 183,185 ****
--- 185,208 ----
return result;
}
+
+ /**
+ * Returns a copy of this mesh
+ * @return copy of this Mesh
+ */
+ public Mesh copy() {
+ Collection<Vertex> vs = new LinkedList();
+ Collection<Edge> es = new LinkedList();
+ Collection<Surface> ss = new LinkedList();
+ Map map = new HashMap();
+ for (Vertex current : vertices) {
+ vs.add((Vertex) current.copy(map));
+ }
+ for (Edge current : edges) {
+ es.add((Edge) current.copy(map));
+ }
+ for (Surface current : surfaces) {
+ ss.add((Surface) current.copy(map));
+ }
+ return new Mesh(ss, es, vs);
+ }
}
|