[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view Display.java, 1.61, 1.62
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2007-12-03 17:54:27
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18461/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Made selection and visual gl drawing the same for constructors, and moved selection according to active space... Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** Display.java 21 Nov 2007 21:10:41 -0000 1.61 --- Display.java 3 Dec 2007 17:54:29 -0000 1.62 *************** *** 819,822 **** --- 819,823 ---- private static void drawInstance(Space space, boolean inside) { + gl.glPushMatrix(); translateToCoordinatesystem(space); if (USEDL && inside) { *************** *** 834,845 **** } boolean selActivated = false; if (selecting()) { push(space); selActivated = true; ! selecting = false; } ! drawSpace(space.getProto(), inside); if (selActivated) { selecting = true; pop(); } --- 835,854 ---- } boolean selActivated = false; + Space oldActive = active; if (selecting()) { push(space); selActivated = true; ! if (space == active) { ! selecting = true; ! active = space.getProto(); ! } } ! if (space == active) { ! paint(space.getInstanceAnchor()); ! } ! drawSpace(space.getProto(), inside || space == active); if (selActivated) { selecting = true; + active = oldActive; pop(); } *************** *** 992,996 **** selectEdges(edges); } ! if (construction()) { selectConstructors(constructors); } --- 1001,1005 ---- selectEdges(edges); } ! if (space == active && construction()) { selectConstructors(constructors); } *************** *** 1005,1009 **** } } ! if (active == space) { if (construction()) { gl.glDepthMask(false); --- 1014,1018 ---- } } ! if (space == active) { if (construction()) { gl.glDepthMask(false); *************** *** 1072,1076 **** Vertex k = cs.getN(); Vertex center = cs.center(); - gl.glPushMatrix(); double[] matrix = new double[]{ i.getX(), i.getY(), i.getZ(), 0, --- 1081,1084 ---- *************** *** 1104,1107 **** --- 1112,1116 ---- Space space = (Space) current; if (space.isInstance()) { + gl.glPushMatrix(); translateToCoordinatesystem(space); } *************** *** 1290,1296 **** geometrics.addAll(Selection.primary()); if (target != null) { ! geometrics.add(target); } hilite(geometrics); } } --- 1299,1316 ---- geometrics.addAll(Selection.primary()); if (target != null) { ! Collection<Geometric> hilite = new HashSet(); ! hilite.add(target); ! hilite(hilite); ! } ! if (active.isInstance()) { ! gl.glPushMatrix(); ! translateToCoordinatesystem(active); } + hilite(geometrics); + + if (active.isInstance()) { + gl.glPopMatrix(); + } } } |