Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15042/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
AbstractPencil.java
Log Message:
Removed work plane from AbstractPencil
Index: AbstractPencil.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -d -r1.92 -r1.93
*** AbstractPencil.java 5 Sep 2007 06:24:47 -0000 1.92
--- AbstractPencil.java 5 Sep 2007 09:24:00 -0000 1.93
***************
*** 109,117 ****
/** Whether or not the tool is locked */
protected boolean lock;
-
- /** Work plane */
- protected Plane plane;
-
-
/** Number */
--- 109,112 ----
***************
*** 147,151 ****
lock = false;
active = false;
- plane = new Plane (0, 0, 1, 0);
}
--- 142,145 ----
***************
*** 186,190 ****
Edge ray = new Edge(near, far);
ray = transformation.unProject(ray);
!
{
Vertex n = new Vertex(0, 0, 1.0);
--- 180,184 ----
Edge ray = new Edge(near, far);
ray = transformation.unProject(ray);
! Plane work;
{
Vertex n = new Vertex(0, 0, 1.0);
***************
*** 192,213 ****
n.normalize();
if (start != null) {
! Vertex planeNormal;
! if (Math.abs(n.getZ()) < 0.45) {
! planeNormal = plane.normal();
} else {
! planeNormal = plane.normal();
}
- plane = new Plane(planeNormal.getX(),
- planeNormal.getY(),
- planeNormal.getZ(),
- -(planeNormal.getX() * start.vertex().getX() +
- planeNormal.getY() * start.vertex().getY() +
- planeNormal.getZ() * start.vertex().getZ()));
}
}
- Plane work = plane;
-
if (constrain) {
if (lockingEdge != null) {
--- 186,208 ----
n.normalize();
if (start != null) {
! Vertex normal;
! if (Math.abs(n.getZ()) > 0.45) {
! normal = new Vertex(0, 0, 1.0);
} else {
! normal = new Vertex(1, 0, 0);
}
+ work = new Plane(normal.getX(),
+ normal.getY(),
+ normal.getZ(),
+ -(normal.getX() * start.vertex().getX() +
+ normal.getY() * start.vertex().getY() +
+ normal.getZ() * start.vertex().getZ()));
+
+ } else {
+ work = new Plane(0, 0, 1, 0);
}
}
if (constrain) {
if (lockingEdge != null) {
***************
*** 764,768 ****
*/
public void cleanUp() {
- plane = new Plane(0, 0, 1, 0);
start = null;
current = null;
--- 759,762 ----
|