Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24013/src/net/sourceforge/bprocessor/gl/view
Modified Files:
View.java
Log Message:
Changed the way clipplanes is drawn so that the edges cutting the geometry is rendered as well... now drawing of clipplanse always uses drawClipplanes and not drawClipplaneFrame (due to the clippingplane now drawn as filled) added clipplane as possible target
Index: View.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** View.java 15 May 2006 12:09:39 -0000 1.90
--- View.java 18 May 2006 14:24:11 -0000 1.91
***************
*** 518,522 ****
ClippingPlane cp = (ClippingPlane)clipit.next();
// draw the clipping planes
! drawClipplane(cp);
}
--- 518,532 ----
ClippingPlane cp = (ClippingPlane)clipit.next();
// draw the clipping planes
! Collection selection = glv.getTool().getSelection();
! if (cp == target) {
! drawObject(cp);
! } else {
! if (selection.contains(cp)) {
! gl.glColor3fv(SELECTED_COLOR);
! } else {
! gl.glColor3fv(CLIP_PLANE_COLOR);
! }
! drawClipplane(cp);
! }
}
***************
*** 850,853 ****
--- 860,868 ----
drawSurface(s);
gl.glDisable(GL.GL_POLYGON_STIPPLE);
+ } else if (o instanceof ClippingPlane) {
+ gl.glDisable(GL.GL_DEPTH_TEST);
+ ClippingPlane cp = (ClippingPlane) o;
+ drawClipplane(cp);
+ gl.glEnable(GL.GL_DEPTH_TEST);
}
}
***************
*** 1429,1433 ****
ClippingPlane cp = (ClippingPlane)it.next();
pushName(gl, cp);
! drawClipplaneFrame(cp);
popName(gl);
}
--- 1444,1448 ----
ClippingPlane cp = (ClippingPlane)it.next();
pushName(gl, cp);
! drawClipplane(cp);
popName(gl);
}
***************
*** 1466,1478 ****
*/
private void drawClipplane(ClippingPlane clipplane) {
- Collection selection = glv.getTool().getSelection();
- double[] d = clipplane.getPlane().getDoublev();
Collection corners = clipplane.getCorners();
{
- if (selection.contains(clipplane)) {
- gl.glColor3fv(SELECTED_COLOR);
- } else {
- gl.glColor3fv(CLIP_PLANE_COLOR);
- }
gl.glLineWidth(2.0f);
gl.glBegin(GL.GL_LINE_STRIP);
--- 1481,1486 ----
***************
*** 1490,1493 ****
--- 1498,1507 ----
gl.glEnd();
}
+ Collection lines = clipplane.getLines();
+ Iterator it = lines.iterator();
+ while (it.hasNext()) {
+ Edge e = (Edge)it.next();
+ drawConstructor(e);
+ }
}
|