Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28279/src/net/sourceforge/bprocessor/model
Modified Files:
Project.java
Log Message:
Added drag selection with the left mousebutton, and fixed the selectionBuffer so that if the selection were too big to fit in the selectionBuffer the size will double and it will try again, that will keep going forever, so some kind of valve have to be added if GL starts to redisplay all the time
Index: Project.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** Project.java 11 Feb 2006 18:04:24 -0000 1.37
--- Project.java 14 Feb 2006 11:56:25 -0000 1.38
***************
*** 130,135 ****
*/
private void addCams() {
! Camera cam0 = Camera.create(Camera.VIEW_3D); // The starting cam
cam0.setId(new Long(cameraId++));
Camera cam1 = Camera.create(Camera.VIEW_3D); // Reset to 3D position
cam1.setId(new Long(cameraId++));
--- 130,136 ----
*/
private void addCams() {
! Camera cam0 = Camera.create(Camera.VIEW_3D); // The starting cam (copy of 3d cam)
cam0.setId(new Long(cameraId++));
+ cameras.put(cam0.getId(), cam0);
Camera cam1 = Camera.create(Camera.VIEW_3D); // Reset to 3D position
cam1.setId(new Long(cameraId++));
***************
*** 148,151 ****
--- 149,171 ----
/**
+ * remove all elements in the collection from the project
+ * @param c the collection of elements
+ */
+ public void delete(Collection c) {
+ Iterator iter = c.iterator();
+ while (iter.hasNext()) {
+ Object next = iter.next();
+ if (next instanceof Edge) {
+ mesh.delete((Edge)next);
+ } else if (next instanceof Surface) {
+ mesh.delete((Surface)next);
+ } else if (next instanceof Vertex) {
+ mesh.delete((Vertex)next);
+ }
+ }
+ changed(this);
+ }
+
+ /**
* Add a constraint
* @param constraint The constraint to add
|