[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java,1.66,1.67
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-02-26 23:56:48
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6182/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Hiding geometry when editing interior of space Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** View.java 26 Feb 2006 10:52:25 -0000 1.66 --- View.java 26 Feb 2006 23:56:45 -0000 1.67 *************** *** 754,785 **** //Draw edges if (doDrawEdges) { ! gl.glLineWidth(1.0f); ! gl.glColor3fv(lineColor); ! // draw all the edges in the model ! Iterator eit = edges.iterator(); ! while (eit.hasNext()) { ! Edge e = (Edge)eit.next(); ! if (e.getConstructor()) { ! gl.glColor3fv(constructorColor); ! drawConstructor(e); ! gl.glColor3fv(lineColor); ! } else { ! drawEdge(e); ! } ! } ! //draw all temporary edges. ! Iterator tempEdgeIt = tempEdges.iterator(); ! while (tempEdgeIt.hasNext()) { ! Edge e = (Edge)tempEdgeIt.next(); ! if (e.getConstructor()) { ! gl.glColor3fv(constructorColor); ! drawConstructor(e); ! gl.glColor3fv(lineColor); ! } else { ! drawEdge(e); ! } ! } } - //drawSpaces(gld); gl.glColor3fv(SELECTED_COLOR); --- 754,759 ---- //Draw edges if (doDrawEdges) { ! drawEdges(gld); } gl.glColor3fv(SELECTED_COLOR); *************** *** 892,900 **** */ private void drawSurfaces(GLDrawable gld, int side) { - Collection surfaces = Project.getInstance().getSurfaces(); - Collection spaces = Project.getInstance().getSpaces(); - drawSurfaces(gld, surfaces, side); drawSurfaces(gld, tempSurfaces, side); ! drawInteriorSurfaces(gld, side, spaces); } --- 866,958 ---- */ private void drawSurfaces(GLDrawable gld, int side) { drawSurfaces(gld, tempSurfaces, side); ! ! Space active = Project.getInstance().getActiveSpace(); ! ! if (active != null) { ! drawSpaceSurfaces(gld, active, side); ! } else { ! Collection surfaces = Project.getInstance().getSurfaces(); ! Collection spaces = Project.getInstance().getSpaces(); ! drawSurfaces(gld, surfaces, side); ! drawInteriorSurfaces(gld, side, spaces); ! } ! } ! ! /** ! * Draww all edges ! * @param gld The GLDrawable ! */ ! private void drawEdges(GLDrawable gld) { ! drawGeneralEdges(gld, tempEdges); ! ! Space active = Project.getInstance().getActiveSpace(); ! if (active != null) { ! Set edges = new HashSet(); ! Collection envelope = active.getEnvelope(); ! Iterator iter = envelope.iterator(); ! while (iter.hasNext()) { ! Surface current = (Surface) iter.next(); ! edges.addAll(current.getEdges()); ! } ! drawConstructionEdges(gld, edges); ! Mesh interior = active.getInterior(); ! if (interior != null) { ! drawGeneralEdges(gld, interior.getEdges()); ! ! } ! } else { ! Collection edges = Project.getInstance().getEdges(); ! drawGeneralEdges(gld, edges); ! } ! } ! ! /** ! * ! * @param gld The GLDrawable ! * @param edges The edges ! */ ! public void drawGeneralEdges(GLDrawable gld, Collection edges) { ! gl.glLineWidth(1.0f); ! gl.glColor3fv(lineColor); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge)iter.next(); ! if (current.getConstructor()) { ! gl.glColor3fv(constructorColor); ! drawConstructor(current); ! gl.glColor3fv(lineColor); ! } else { ! drawEdge(current); ! } ! } ! } ! ! /** ! * ! * @param gld The GLDrawable ! * @param edges The edges ! */ ! public void drawConstructionEdges(GLDrawable gld, Collection edges) { ! gl.glLineWidth(1.0f); ! gl.glColor3fv(constructorColor); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge)iter.next(); ! drawConstructor(current); ! } ! } ! ! ! /** ! * @param gld The GLDrawable ! * @param space The space ! * @param side The side ! */ ! public void drawSpaceSurfaces(GLDrawable gld, Space space, int side) { ! Mesh interior = space.getInterior(); ! if (interior != null) { ! drawSurfaces(gld, interior.getSurfaces(), side); ! } } |