Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26074
Modified Files:
AbstractTool.java ExtrusionTool.java
Log Message:
made pressPos private in Abstract tool and therefore made changes in Extrusiontool
Index: ExtrusionTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ExtrusionTool.java 12 Sep 2005 18:11:26 -0000 1.8
--- ExtrusionTool.java 14 Sep 2005 07:02:56 -0000 1.9
***************
*** 41,50 ****
private static Surface dragSurface = null;
- /** the selected surface */
- // private static Surface selectedSurface = null;
-
/** the dragplane */
private Plane dragplane;
/**
* The Constructor
--- 41,53 ----
private static Surface dragSurface = null;
/** the dragplane */
private Plane dragplane;
+ /** */
+ private int prevX;
+
+ /** */
+ private int prevY;
+
/**
* The Constructor
***************
*** 73,77 ****
normal.scale(1 / normal.length());
View view = glv.getView();
! double[] from = view.toPlaneCoords(new double[] {pressPos[0], pressPos[1]}, dragplane);
double[] to = view.toPlaneCoords(new double[] {e.getX(), e.getY()}, dragplane);
double[] delta = new double[] {to[0] - from[0], to[1] - from[1], to[2] - from[2]};
--- 76,80 ----
normal.scale(1 / normal.length());
View view = glv.getView();
! double[] from = view.toPlaneCoords(new double[] {prevX, prevY}, dragplane);
double[] to = view.toPlaneCoords(new double[] {e.getX(), e.getY()}, dragplane);
double[] delta = new double[] {to[0] - from[0], to[1] - from[1], to[2] - from[2]};
***************
*** 106,111 ****
}
}
! pressPos[0] = e.getX();
! pressPos[1] = e.getY();
}
--- 109,114 ----
}
}
! prevX = e.getX();
! prevY = e.getY();
}
***************
*** 152,163 ****
protected void pressed(MouseEvent e) {
super.pressed(e);
! pressPos[0] = e.getX();
! pressPos[1] = e.getY();
if (target instanceof Surface) {
Surface selectedSurface = (Surface)target;
View view = glv.getView();
Transformation trans = view.transformation();
! int x = pressPos[0];
! int y = pressPos[1];
Vertex near = new Vertex("near", x, y, 0.0);
Vertex far = new Vertex("far", x, y, 1.0);
--- 155,166 ----
protected void pressed(MouseEvent e) {
super.pressed(e);
! prevX = e.getX();
! prevY = e.getY();
if (target instanceof Surface) {
Surface selectedSurface = (Surface)target;
View view = glv.getView();
Transformation trans = view.transformation();
! int x = prevX;
! int y = prevY;
Vertex near = new Vertex("near", x, y, 0.0);
Vertex far = new Vertex("far", x, y, 1.0);
Index: AbstractTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** AbstractTool.java 12 Sep 2005 18:06:43 -0000 1.16
--- AbstractTool.java 14 Sep 2005 07:02:56 -0000 1.17
***************
*** 37,41 ****
/** The mouse position last time the mouse was pressed initializes to (0,0) */
! protected static int[] pressPos = new int[2];
/** The mouse movement in x axis since press */
--- 37,41 ----
/** The mouse position last time the mouse was pressed initializes to (0,0) */
! private static int[] pressPos = new int[2];
/** The mouse movement in x axis since press */
|