[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view Display.java, 1.26, 1.27
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2007-10-10 14:16:03
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3845/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: xray experiment Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Display.java 10 Oct 2007 12:43:52 -0000 1.26 --- Display.java 10 Oct 2007 14:15:56 -0000 1.27 *************** *** 268,271 **** --- 268,276 ---- */ + private static void apply(float[] color) { + float[] alpha = new float[]{color[0], color[1], color[2], 1.0f}; + gl.glColor4fv(alpha, 0); + } + private static void draw(Vertex vertex) { gl.glBegin(GL.GL_POINTS); *************** *** 352,356 **** } ! private static void drawSurfaces(Collection<Surface> surfaces) { gl.glEnable(GL.GL_LIGHTING); gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); --- 357,362 ---- } ! private static void paintSurfaces(Collection<Surface> surfaces) { ! gl.glEnable(GL.GL_LIGHTING); gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); *************** *** 364,372 **** gl.glNormal3d(n.getX(), n.getY(), n.getZ()); if (front.isVoid()) { ! gl.glColor3fv(misty, 0); } else if (front.isConstructionSpace()) { ! gl.glColor3fv(Defaults.getFrontColor(), 0); } else { ! gl.glColor3fv(Defaults.getBackColor(), 0); } draw(current, false); --- 370,378 ---- gl.glNormal3d(n.getX(), n.getY(), n.getZ()); if (front.isVoid()) { ! apply(misty); } else if (front.isConstructionSpace()) { ! apply(Defaults.getFrontColor()); } else { ! apply(Defaults.getBackColor()); } draw(current, false); *************** *** 379,387 **** gl.glNormal3d(-n.getX(), -n.getY(), -n.getZ()); if (back.isVoid()) { ! gl.glColor3fv(misty, 0); } else if (back.isConstructionSpace()) { ! gl.glColor3fv(Defaults.getFrontColor(), 0); } else { ! gl.glColor3fv(Defaults.getBackColor(), 0); } draw(current, true); --- 385,393 ---- gl.glNormal3d(-n.getX(), -n.getY(), -n.getZ()); if (back.isVoid()) { ! apply(misty); } else if (back.isConstructionSpace()) { ! apply(Defaults.getFrontColor()); } else { ! apply(Defaults.getBackColor()); } draw(current, true); *************** *** 679,683 **** selectSurfaces(surfaces); } ! if (inside || intersecting()) { selectEdges(edges); } --- 685,689 ---- selectSurfaces(surfaces); } ! if (inside || (intersecting() && !(active instanceof Net))) { selectEdges(edges); } *************** *** 687,691 **** } else { if (inside) { ! drawSurfaces(surfaces); } if (active == space) { --- 693,697 ---- } else { if (inside) { ! paintSurfaces(surfaces); } if (active == space) { |