[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java,1.53,1.54
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-01-31 14:45:17
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19502/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Uses white in hiddenline wireframe Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** View.java 30 Jan 2006 12:35:48 -0000 1.53 --- View.java 31 Jan 2006 14:44:53 -0000 1.54 *************** *** 125,135 **** private static final int ALL = 4; ! /** The NORMAL side is the side where the normal points to */ ! private static final int NORMAL = 0; ! /** The front side is the functional-space side. */ private static final int FRONT = 1; ! /** The back side the construction-space side. */ private static final int BACK = 2; --- 125,135 ---- private static final int ALL = 4; ! /** BOTH side is used when surface is drawn without lightning and culling */ ! private static final int BOTH = 0; ! /** The front side is side the normal is pointing to */ private static final int FRONT = 1; ! /** The back side is the other side than the one the normal is pointing to */ private static final int BACK = 2; *************** *** 891,895 **** gl.glPolygonOffset(1.0f, 1.0f); gl.glColor3fv(SURFACE_COLOR); ! drawSurfaces(gld, NORMAL); gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); break; --- 891,895 ---- gl.glPolygonOffset(1.0f, 1.0f); gl.glColor3fv(SURFACE_COLOR); ! drawSurfaces(gld, BOTH); gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); break; *************** *** 1361,1364 **** --- 1361,1367 ---- return false; } + if (front == back) { + return false; + } return true; } *************** *** 1401,1429 **** if (!selection.contains(s)) { boolean visible = isVisible(s); ! if (!visible) { ! gl.glEnable(GL.GL_POLYGON_STIPPLE); ! gl.glPolygonStipple(seethrough); ! gl.glColor3fv(GRID_COLOR); } else { ! if (side == FRONT) { ! if (s.getFrontMaterial() == null) { ! Space back = s.getFrontDomain(); ! gl.glColor3fv(getSpaceColor(back)); ! } else { ! gl.glColor3fv(s.getFrontMaterial().getColor()); } ! } ! if (side == BACK) { ! if (s.getBackMaterial() == null) { ! Space front = s.getBackDomain(); ! gl.glColor3fv(getSpaceColor(front)); ! } else { ! gl.glColor3fv(s.getBackMaterial().getColor()); } } ! } ! drawSurface(s); ! if (!visible) { ! gl.glDisable(GL.GL_POLYGON_STIPPLE); } } --- 1404,1438 ---- if (!selection.contains(s)) { boolean visible = isVisible(s); ! if (side == BOTH) { ! if (visible) { ! drawSurface(s); ! } } else { ! if (!visible) { ! gl.glEnable(GL.GL_POLYGON_STIPPLE); ! gl.glPolygonStipple(seethrough); ! gl.glColor3fv(GRID_COLOR); ! } else { ! if (side == FRONT) { ! if (s.getFrontMaterial() == null) { ! Space back = s.getFrontDomain(); ! gl.glColor3fv(getSpaceColor(back)); ! } else { ! gl.glColor3fv(s.getFrontMaterial().getColor()); ! } } ! if (side == BACK) { ! if (s.getBackMaterial() == null) { ! Space front = s.getBackDomain(); ! gl.glColor3fv(getSpaceColor(front)); ! } else { ! gl.glColor3fv(s.getBackMaterial().getColor()); ! } } } ! drawSurface(s); ! if (!visible) { ! gl.glDisable(GL.GL_POLYGON_STIPPLE); ! } } } |