Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31591/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
MoveTool.java
Log Message:
Move of clipplane
Index: MoveTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/MoveTool.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** MoveTool.java 25 Nov 2005 10:20:11 -0000 1.17
--- MoveTool.java 25 Nov 2005 17:48:08 -0000 1.18
***************
*** 8,11 ****
--- 8,12 ----
import net.sourceforge.bprocessor.gl.GLView;
+ import net.sourceforge.bprocessor.gl.model.ClippingPlane;
import net.sourceforge.bprocessor.gl.view.AbstractView;
import net.sourceforge.bprocessor.gl.view.Transformation;
***************
*** 95,98 ****
--- 96,117 ----
}
}
+ } else if (o instanceof ClippingPlane) {
+ ClippingPlane plane = (ClippingPlane) o;
+ vertices.add(plane.origin());
+ }
+ }
+
+ /**
+ * Update selection
+ *
+ */
+ protected void update() {
+ Iterator iter = selection.iterator();
+ while (iter.hasNext()) {
+ Object o = iter.next();
+ if (o instanceof ClippingPlane) {
+ ClippingPlane plane = (ClippingPlane) o;
+ plane.update();
+ }
}
}
***************
*** 142,145 ****
--- 161,167 ----
inner = sel.getIsInner();
temp = sel.plane();
+ } else if (o instanceof ClippingPlane) {
+ ClippingPlane clippingplane = (ClippingPlane) o;
+ temp = clippingplane.getPlane();
}
// make a orthogonal plane to the current one
***************
*** 208,211 ****
--- 230,234 ----
from.move(delta.getX(), delta.getY(), delta.getZ());
glv.setLength(from.minus(initial).length());
+ update();
}
|