Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4128/src/net/sourceforge/bprocessor/gl/view
Modified Files:
View.java Display.java
Log Message:
Drawing temp edges
Index: Display.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Display.java 25 Sep 2007 08:45:52 -0000 1.10
--- Display.java 25 Sep 2007 11:07:39 -0000 1.11
***************
*** 47,50 ****
--- 47,51 ----
private static ArrayList objects;
private static Geometric target;
+ private static Collection<? extends Geometric> extras;
private static float[] white = new float[] {1.0f, 1.0f, 1.0f};
***************
*** 141,144 ****
--- 142,153 ----
}
+ /**
+ * Sets the extras geometry
+ * @param value Collection of geometrics
+ */
+ public static void extras(Collection<? extends Geometric> value) {
+ extras = value;
+ }
+
private static void push(Object object) {
objects.add(object);
***************
*** 353,356 ****
--- 362,379 ----
}
}
+
+ // FIXME the set of edges not connected
+ // to a surface should be cashed.
+ Set<Edge> mark = new HashSet();
+ for (Surface current : space.getSurfaces()) {
+ mark.addAll(current.getEdges());
+ }
+ for (Edge current : space.getEdges()) {
+ if (!mark.contains(current)) {
+ if (!hidden.contains(current)) {
+ edges.add(current);
+ }
+ }
+ }
}
{
***************
*** 441,444 ****
--- 464,481 ----
draw(world, false);
+ {
+ Collection<Edge> edges = new LinkedList();
+ for (Geometric current : extras) {
+ if (current instanceof Edge) {
+ edges.add((Edge) current);
+ }
+ }
+ if (selecting()) {
+ selectEdges(edges);
+ } else {
+ drawEdges(edges, true);
+ }
+ }
+
if (!selecting()) {
Collection<Geometric> geometrics = new HashSet();
Index: View.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v
retrieving revision 1.235
retrieving revision 1.236
diff -C2 -d -r1.235 -r1.236
*** View.java 24 Sep 2007 13:02:18 -0000 1.235
--- View.java 25 Sep 2007 11:07:38 -0000 1.236
***************
*** 702,705 ****
--- 702,706 ----
Display.target(null);
}
+ Display.extras(tempEdges);
Display.draw(gld);
Display.selecting(false);
|