Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10444
Modified Files:
ExtrusionTool.java
Log Message:
Corrected the calculation of a ray so that it now drags correct
Index: ExtrusionTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ExtrusionTool.java 20 Sep 2005 12:23:59 -0000 1.12
--- ExtrusionTool.java 20 Sep 2005 17:28:46 -0000 1.13
***************
*** 9,12 ****
--- 9,13 ----
import net.sourceforge.bprocessor.gl.GLView;
import net.sourceforge.bprocessor.gl.view.View;
+ import net.sourceforge.bprocessor.gl.view.AbstractView;
import net.sourceforge.bprocessor.gl.view.Transformation;
***************
*** 45,52 ****
/*** the previous x-coordinate */
! private int prevX;
/** the previous y-coordinate */
! private int prevY;
/** The extrusion edge */
--- 46,53 ----
/*** the previous x-coordinate */
! private double prevX;
/** the previous y-coordinate */
! private double prevY;
/** The extrusion edge */
***************
*** 164,169 ****
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);
--- 165,170 ----
View view = glv.getView();
Transformation trans = view.transformation();
! double x = prevX;
! double y = AbstractView.getHeight() - prevY;
Vertex near = new Vertex("near", x, y, 0.0);
Vertex far = new Vertex("far", x, y, 1.0);
|