[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java, 1.127, 1.128
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-08-08 12:05:09
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1042/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Improved drawing of highlighted objects Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** View.java 4 Aug 2006 11:48:11 -0000 1.127 --- View.java 8 Aug 2006 12:05:05 -0000 1.128 *************** *** 68,71 **** --- 68,74 ---- private static Logger log = Logger.getLogger(View.class); + /** IGNORE */ + public static final boolean IGNORE = true; + /** the color of the x axis */ public static final float[] X_AXIS_COLOR = new float[] {0.1f, 0.8f, 0.1f}; *************** *** 544,558 **** gl.glPushMatrix(); picking = 0; - - // grid and coords are always completely lit - /*gl.glLineWidth(1.0f); - CoordinateSystem cs = Project.getInstance().getActiveCoordinateSystem(); - grid(cs); - Camera camera = Project.getInstance().getCurrentCamera(); - double scale = (camera.getFocalwidth() / 65) * (500 / height); - drawCoordinateSystem(cs, - ((new Vertex(camera.getCamera())).minus(cs.center())).length() * scale, true); - */ Iterator clipit = Project.getInstance().getCurrentCamera().getClipplanes().iterator(); while (clipit.hasNext()) { --- 547,551 ---- *************** *** 976,980 **** private void drawObject(Object o) { if (o instanceof Vertex) { ! //gl.glDisable(GL.GL_DEPTH_TEST); Vertex v = (Vertex) o; gl.glPointSize(9.0f); --- 969,973 ---- private void drawObject(Object o) { if (o instanceof Vertex) { ! gl.glDisable(GL.GL_DEPTH_TEST); Vertex v = (Vertex) o; gl.glPointSize(9.0f); *************** *** 983,994 **** gl.glEnd(); gl.glPointSize(1.0f); ! //gl.glEnable(GL.GL_DEPTH_TEST); } else if (o instanceof Edge) { - //gl.glDisable(GL.GL_DEPTH_TEST); Edge e = (Edge) o; ! gl.glLineWidth(1.5f); drawEdge(e); gl.glLineWidth(1.0f); - //gl.glEnable(GL.GL_DEPTH_TEST); } else if (o instanceof Surface) { gl.glEnable(GL.GL_POLYGON_STIPPLE); --- 976,985 ---- gl.glEnd(); gl.glPointSize(1.0f); ! gl.glEnable(GL.GL_DEPTH_TEST); } else if (o instanceof Edge) { Edge e = (Edge) o; ! gl.glLineWidth(2.0f); drawEdge(e); gl.glLineWidth(1.0f); } else if (o instanceof Surface) { gl.glEnable(GL.GL_POLYGON_STIPPLE); *************** *** 1265,1284 **** while (iter.hasNext()) { Edge current = (Edge)iter.next(); ! float[] color = (float[])colorMap.get(current); ! if (color != null) { ! gl.glColor3fv(color); ! if (current.getStrippled()) { drawConstructor(current); } else { drawEdge(current); } ! gl.glColor3fv(lineColor); ! } else if (current.getStrippled()) { ! gl.glColor3fv(constructorColor); ! drawConstructor(current); ! gl.glColor3fv(lineColor); ! } else { ! drawEdge(current); ! } } } --- 1256,1277 ---- while (iter.hasNext()) { Edge current = (Edge)iter.next(); ! if (IGNORE || !(highligts.contains(current) || current == target)) { ! float[] color = (float[])colorMap.get(current); ! if (color != null) { ! gl.glColor3fv(color); ! if (current.getStrippled()) { ! drawConstructor(current); ! } else { ! drawEdge(current); ! } ! gl.glColor3fv(lineColor); ! } else if (current.getStrippled()) { ! gl.glColor3fv(constructorColor); drawConstructor(current); + gl.glColor3fv(lineColor); } else { drawEdge(current); } ! } } } |