[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool AbstractPencil.java, 1.43, 1.44
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-07-20 08:42:03
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14748/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractPencil.java Log Message: Fixed orthogonal constructor Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** AbstractPencil.java 19 Jul 2006 14:31:05 -0000 1.43 --- AbstractPencil.java 20 Jul 2006 08:41:59 -0000 1.44 *************** *** 447,450 **** --- 447,454 ---- origin.setZ(start.vertex().getZ()); } + + origin.setX(0); + origin.setY(0); + origin.setZ(0); Vertex direction = parrallel.getDirection(); direction = system.translate(direction); *************** *** 455,465 **** direction = system.unTranslate(direction); direction.scale(50 / direction.length()); Edge orthogonal = null; ! if (start != null) { ! orthogonal = new Edge(start.vertex().minus(direction), start.vertex().add(direction)); ! } else { ! if (incident != null) { ! orthogonal = new Edge(incident.vertex().minus(direction), ! incident.vertex().add(direction)); } } --- 459,472 ---- direction = system.unTranslate(direction); direction.scale(50 / direction.length()); + Edge orthogonal = null; ! if (Math.abs(direction.getZ()) < 0.0000001) { ! if (start != null) { ! orthogonal = new Edge(start.vertex().minus(direction), start.vertex().add(direction)); ! } else { ! if (incident != null) { ! orthogonal = new Edge(incident.vertex().minus(direction), ! incident.vertex().add(direction)); ! } } } |