Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18744
Modified Files:
View.java
Log Message:
made method for getting only a vertex or edge at a point
Index: View.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** View.java 10 Jan 2006 13:38:54 -0000 1.40
--- View.java 10 Jan 2006 14:06:49 -0000 1.41
***************
*** 1784,1787 ****
--- 1784,1826 ----
return selection;
}
+
+ /**
+ * Gets id of any Edges under a point. For use in selection.
+ * @param x the x coordinate of the point in mouse coordinates
+ * @param y the y coordinate of the point in mouse coordinates
+ * @return The object under the point, null if no object is there
+ */
+ public List getEdgeAtPoint(double x, double y) {
+ this.x = x;
+ this.y = y;
+
+ picking = 10;
+ selectMode = EDGES;
+ glv.repaint(true);
+
+ List selection = processSelect();
+ clearNames();
+ return selection;
+ }
+
+ /**
+ * Gets id of any Vertices under a point. For use in selection.
+ * @param x the x coordinate of the point in mouse coordinates
+ * @param y the y coordinate of the point in mouse coordinates
+ * @return The object under the point, null if no object is there
+ */
+ public List getVertexAtPoint(double x, double y) {
+ this.x = x;
+ this.y = y;
+
+ picking = 10;
+ selectMode = VERTICES;
+ glv.repaint(true);
+
+ List selection = processSelect();
+ clearNames();
+ return selection;
+ }
+
/**
|