Thread: [Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java, 1.123, 1.124
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2006-07-27 11:20:39
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8850/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Changed a bit on the drawing.... -The path are drawn with depthtest turned off -The non editable constructors are not drawn with with handles when in selsection mode -All constructors are drawn in the drawGeneralConstructors even the active coordinate system and its grid, to achieve depth test and visible coordinatesystem when in front of objects. - added test if constrctor is selected or target (CAN BE TOO SLOW) but othervise the selection is not clear, especially not the guidelines Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.123 retrieving revision 1.124 diff -C2 -d -r1.123 -r1.124 *** View.java 26 Jul 2006 14:41:12 -0000 1.123 --- View.java 27 Jul 2006 11:20:20 -0000 1.124 *************** *** 531,535 **** // grid and coords are always completely lit ! gl.glLineWidth(1.0f); CoordinateSystem cs = Project.getInstance().getActiveCoordinateSystem(); grid(cs); --- 531,535 ---- // grid and coords are always completely lit ! /*gl.glLineWidth(1.0f); CoordinateSystem cs = Project.getInstance().getActiveCoordinateSystem(); grid(cs); *************** *** 539,543 **** drawCoordinateSystem(cs, ((new Vertex(camera.getCamera())).minus(cs.center())).length() * scale, true); ! Iterator clipit = Project.getInstance().getCurrentCamera().getClipplanes().iterator(); while (clipit.hasNext()) { --- 539,543 ---- drawCoordinateSystem(cs, ((new Vertex(camera.getCamera())).minus(cs.center())).length() * scale, true); ! */ Iterator clipit = Project.getInstance().getCurrentCamera().getClipplanes().iterator(); while (clipit.hasNext()) { *************** *** 599,602 **** --- 599,603 ---- //Drawing the space path gl.glMatrixMode(GL.GL_PROJECTION); + gl.glDisable(GL.GL_DEPTH_TEST); gl.glPushMatrix(); gl.glLoadIdentity(); *************** *** 699,703 **** gl.glLineWidth(0.5f); gl.glColor4fv(gridColor); ! gl.glDisable(GL.GL_DEPTH_TEST); gl.glBegin(GL.GL_LINES); --- 700,704 ---- gl.glLineWidth(0.5f); gl.glColor4fv(gridColor); ! //gl.glDisable(GL.GL_DEPTH_TEST); gl.glBegin(GL.GL_LINES); *************** *** 1052,1057 **** dist = (c.getOrigin().minus(v)).length() * scale; } ! drawGeneralConstructor(c, dist, true); } } else { break; --- 1053,1061 ---- dist = (c.getOrigin().minus(v)).length() * scale; } ! if (target != c && !highligts.contains(c)) { ! drawGeneralConstructor(c, dist, true); ! } } + grid(cs); } else { break; *************** *** 1078,1082 **** } Line l = (Line)constructor; ! drawConstructorVector(l.getOrigin(), l.getDirection(), dist); if (l.isActive()) { drawConstructorLine(l.getOrigin(), l.getDirection(), dist); --- 1082,1088 ---- } Line l = (Line)constructor; ! if (l.isEditable()) { ! drawConstructorVector(l.getOrigin(), l.getDirection(), dist); ! } if (l.isActive()) { drawConstructorLine(l.getOrigin(), l.getDirection(), dist); *************** *** 1084,1091 **** } else if (constructor instanceof CoordinateSystem) { CoordinateSystem system = (CoordinateSystem)constructor; ! CoordinateSystem cs = Project.getInstance().getActiveCoordinateSystem(); ! if (cs != system) { ! drawCoordinateSystem(system, dist, colorize); ! } } } --- 1090,1094 ---- } else if (constructor instanceof CoordinateSystem) { CoordinateSystem system = (CoordinateSystem)constructor; ! drawCoordinateSystem(system, dist, colorize); } } *************** *** 1103,1107 **** gl.glColor3fv(X_AXIS_COLOR); } ! drawConstructorVector(cs.getOrigin(), i, dist); if (cs.isActive()) { drawConstructorLine(cs.getOrigin(), i, dist); --- 1106,1112 ---- gl.glColor3fv(X_AXIS_COLOR); } ! if (cs.isEditable()) { ! drawConstructorVector(cs.getOrigin(), i, dist); ! } if (cs.isActive()) { drawConstructorLine(cs.getOrigin(), i, dist); *************** *** 1110,1114 **** gl.glColor3fv(Y_AXIS_COLOR); } ! drawConstructorVector(cs.getOrigin(), j, dist); if (cs.isActive()) { drawConstructorLine(cs.getOrigin(), j, dist); --- 1115,1121 ---- gl.glColor3fv(Y_AXIS_COLOR); } ! if (cs.isEditable()) { ! drawConstructorVector(cs.getOrigin(), j, dist); ! } if (cs.isActive()) { drawConstructorLine(cs.getOrigin(), j, dist); *************** *** 1119,1123 **** gl.glColor3fv(Z_AXIS_COLOR); } ! drawConstructorVector(cs.getOrigin(), n, dist); if (cs.isActive()) { drawConstructorLine(cs.getOrigin(), n, dist); --- 1126,1132 ---- gl.glColor3fv(Z_AXIS_COLOR); } ! if (cs.isEditable()) { ! drawConstructorVector(cs.getOrigin(), n, dist); ! } if (cs.isActive()) { drawConstructorLine(cs.getOrigin(), n, dist); *************** *** 1784,1797 **** } if (selectIntersections) { ! pushName(gl, current.getOrigin()); ! drawVertexHit(current.getOrigin()); ! popName(gl); if (current instanceof Line) { Line line = (Line) current; Edge guide = line.edge(View.gridSize() * 2); ! Vertex tip = line.tip(dist / 16 + dist / 20); ! pushName(gl, tip); ! drawVertexHit(tip); ! popName(gl); if (current.isActive()) { pushName(gl, guide); --- 1793,1810 ---- } if (selectIntersections) { ! if (current.isEditable()) { ! pushName(gl, current.getOrigin()); ! drawVertexHit(current.getOrigin()); ! popName(gl); ! } if (current instanceof Line) { Line line = (Line) current; Edge guide = line.edge(View.gridSize() * 2); ! if (current.isEditable()) { ! Vertex tip = line.tip(dist / 16 + dist / 20); ! pushName(gl, tip); ! drawVertexHit(tip); ! popName(gl); ! } if (current.isActive()) { pushName(gl, guide); |