[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool SelectTool.java,1.11,1.12
Status: Pre-Alpha
Brought to you by:
henryml
From: Nordholt <nor...@us...> - 2005-08-31 12:49:51
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8497 Modified Files: SelectTool.java Log Message: changed method for determining the view used Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SelectTool.java 31 Aug 2005 10:31:40 -0000 1.11 --- SelectTool.java 31 Aug 2005 12:49:40 -0000 1.12 *************** *** 9,12 **** --- 9,16 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.view.View; + import net.sourceforge.bprocessor.gl.view.View3D; + import net.sourceforge.bprocessor.gl.view.ViewXY; + import net.sourceforge.bprocessor.gl.view.ViewXZ; + import net.sourceforge.bprocessor.gl.view.ViewYZ; import net.sourceforge.bprocessor.kernel.notification.Notification; *************** *** 100,119 **** viewType = 0; View view = glv.getView(); ! double[] coords = view.toCanvasCoords(new double[]{x, y}); ! double[] coordsx = view.toCanvasCoords(new double[] {x + 1, y}); ! double[] coordsy = view.toCanvasCoords(new double[] {x , y + 1}); ! if (coords[0] == 0 && coordsx[0] == 0 && coordsy[0] == 0) { ! viewType = View.VIEW_YZ; ! } ! if (coords[1] == 0 && coordsx[1] == 0 && coordsy[1] == 0) { ! viewType = View.VIEW_XZ; ! } ! if (coords[2] == 0 && coordsx[2] == 0 && coordsy[2] == 0) { ! viewType = View.VIEW_XY; ! } ! if (coords[0] == 0 && coords[1] == 0 && coords[2] == 0 && ! coordsx[0] == 0 && coordsx[1] == 0 && coordsx[2] == 0 && ! coordsy[0] == 0 && coordsy[1] == 0 && coordsy[2] == 0) { viewType = View.VIEW_3D; } --- 104,115 ---- viewType = 0; View view = glv.getView(); ! if (view instanceof View3D) { viewType = View.VIEW_3D; + } else if (view instanceof ViewXY) { + viewType = View.VIEW_XY; + } else if (view instanceof ViewXZ) { + viewType = View.VIEW_XZ; + } else if (view instanceof ViewYZ) { + viewType = View.VIEW_YZ; } *************** *** 135,139 **** } } ! } --- 131,135 ---- } } ! } |