[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool PencilTool.java,1.1,1.2 SelectTool.jav
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-08-26 14:48:23
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26667/src/net/sourceforge/bprocessor/gl/tool Modified Files: PencilTool.java SelectTool.java Log Message: Added Transformation that implements transforming between model and screen coordinates. Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SelectTool.java 23 Aug 2005 11:56:48 -0000 1.8 --- SelectTool.java 26 Aug 2005 14:48:15 -0000 1.9 *************** *** 128,131 **** --- 128,136 ---- Notification n = new Notification(Notification.EDGE_SELECTED, edge.getId()); Notifier.getInstance().sendNotification(n); + } else if (selectObject instanceof Vertex) { + Vertex vertex = (Vertex) selectObject; + Notification n = new Notification(Notification.VERTEX_SELECTED, vertex.getId()); + Notifier.getInstance().sendNotification(n); + selectedVertex = vertex; } } Index: PencilTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/PencilTool.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PencilTool.java 22 Aug 2005 14:30:59 -0000 1.1 --- PencilTool.java 26 Aug 2005 14:48:15 -0000 1.2 *************** *** 12,15 **** --- 12,16 ---- import net.sourceforge.bprocessor.gl.GLView; + import net.sourceforge.bprocessor.gl.view.Transformation; import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.model.Edge; *************** *** 83,87 **** int y = e.getY(); View v = glv.getView(); ! } /** --- 84,93 ---- int y = e.getY(); View v = glv.getView(); ! Transformation transformation = v.transformation(); ! if (selectedVertex != null) { ! Vertex projected = transformation.project(selectedVertex); ! System.out.println(selectedVertex.toString()); ! System.out.println(projected.toString()); ! } } /** *************** *** 93,96 **** --- 99,103 ---- int y = e.getY(); View v = glv.getView(); + } |