[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java, 1.155, 1.156
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-10-02 06:10:24
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24585/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Reorganised Space Menu Draw coordinatesystem and grid in the transformed system Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.155 retrieving revision 1.156 diff -C2 -d -r1.155 -r1.156 *** View.java 29 Sep 2006 12:09:50 -0000 1.155 --- View.java 2 Oct 2006 06:10:21 -0000 1.156 *************** *** 20,24 **** import net.sourceforge.bprocessor.model.Geometry; import net.sourceforge.bprocessor.model.Line; - import net.sourceforge.bprocessor.model.Matrix; import net.sourceforge.bprocessor.model.Plane; import net.sourceforge.bprocessor.model.Camera; --- 20,23 ---- *************** *** 932,936 **** CoordinateSystem cs = Project.getInstance().getActiveCoordinateSystem(); ! grid(cs); drawConstructorPlanes(); --- 931,935 ---- CoordinateSystem cs = Project.getInstance().getActiveCoordinateSystem(); ! //grid(cs); drawConstructorPlanes(); *************** *** 1025,1039 **** double yaxis[] = new double[]{0, 1, 0, 0}; double zaxis[] = new double[]{0, 0, 1, 0}; - - Matrix zmatrix = Matrix.rotation(Math.PI * rotate.rz() / 180, - zaxis[0], zaxis[1], zaxis[2]); - xaxis = zmatrix.multiply(xaxis); - yaxis = zmatrix.multiply(yaxis); - Matrix ymatrix = Matrix.rotation(Math.PI * rotate.ry() / 180, - yaxis[0], yaxis[1], yaxis[2]); - xaxis = ymatrix.multiply(xaxis); - gl.glRotated(rotate.rx(), xaxis[0], xaxis[1], xaxis[2]); - gl.glRotated(rotate.ry(), yaxis[0], yaxis[1], yaxis[2]); gl.glRotated(rotate.rz(), zaxis[0], zaxis[1], zaxis[2]); } if (current instanceof AxisRotate) { --- 1024,1030 ---- double yaxis[] = new double[]{0, 1, 0, 0}; double zaxis[] = new double[]{0, 0, 1, 0}; gl.glRotated(rotate.rz(), zaxis[0], zaxis[1], zaxis[2]); + gl.glRotated(rotate.ry(), yaxis[0], yaxis[1], yaxis[2]); + gl.glRotated(rotate.rx(), xaxis[0], xaxis[1], xaxis[2]); } if (current instanceof AxisRotate) { *************** *** 1193,1196 **** --- 1184,1195 ---- double scale = (camera.getFocalwidth() / 65) * (500 / height); double dist = v.minus(new Vertex(camera.getCenter())).length() * scale; + if (active != null) { + gl.glPushMatrix(); + transformTo(active); + drawGeneralConstructor(Project.getInstance().getActiveCoordinateSystem(), + dist, true, OBJECTS); + grid(Project.getInstance().getActiveCoordinateSystem()); + gl.glPopMatrix(); + } while (true) { if (active != null) { *************** *** 1206,1210 **** } if (target != c && !highligts.contains(c)) { ! drawGeneralConstructor(c, dist, true, OBJECTS); } } --- 1205,1211 ---- } if (target != c && !highligts.contains(c)) { ! if (c != Project.getInstance().getActiveCoordinateSystem()) { ! drawGeneralConstructor(c, dist, true, OBJECTS); ! } } } |