[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java, 1.126, 1.127
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-08-04 11:48:15
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6715/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Refactoring of Move Tool Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** View.java 3 Aug 2006 14:36:57 -0000 1.126 --- View.java 4 Aug 2006 11:48:11 -0000 1.127 *************** *** 2212,2215 **** --- 2212,2218 ---- } + + + // Set the last surface pointed at: // If pointing at something different than a surface then dont *************** *** 2305,2318 **** { if (lastSurface != null) { ! Plane plane = lastSurface.plane(); ! Vertex intersection = plane.intersection(edge); ! if (intersection != null) { ! Vertex projected = transformation.project(intersection); ! double dx = x - projected.getX(); ! double dy = (height - y) - projected.getY(); ! double distance = Math.sqrt(dx * dx + dy * dy); ! if (distance < 5) { ! return new Intersection(intersection, ! Intersection.SURFACE_INTERSECTION, lastSurface); } } --- 2308,2323 ---- { if (lastSurface != null) { ! if (!unWantedEntities.contains(lastSurface)) { ! Plane plane = lastSurface.plane(); ! Vertex intersection = plane.intersection(edge); ! if (intersection != null) { ! Vertex projected = transformation.project(intersection); ! double dx = x - projected.getX(); ! double dy = (height - y) - projected.getY(); ! double distance = Math.sqrt(dx * dx + dy * dy); ! if (distance < 5) { ! return new Intersection(intersection, ! Intersection.SURFACE_INTERSECTION, lastSurface); ! } } } |