Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18206/src/net/sourceforge/bprocessor/gl/view
Modified Files:
AbstractView.java
Log Message:
Small Improvements of layout
Index: AbstractView.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** AbstractView.java 17 Nov 2005 18:14:00 -0000 1.58
--- AbstractView.java 20 Nov 2005 19:33:52 -0000 1.59
***************
*** 653,658 ****
Iterator selit = selection.iterator();
while (selit.hasNext()) {
! Object o = selit.next();
! drawObject(o);
}
--- 653,660 ----
Iterator selit = selection.iterator();
while (selit.hasNext()) {
! Object o = selit.next();
! if (o instanceof Surface) {
! drawObject(o);
! }
}
***************
*** 721,724 ****
--- 723,735 ----
}
+ gl.glColor3fv(SELECTED_COLOR);
+ selit = selection.iterator();
+ while (selit.hasNext()) {
+ Object o = selit.next();
+ if (!(o instanceof Surface)) {
+ drawObject(o);
+ }
+ }
+
// draw target
gl.glColor3fv(TARGET_COLOR);
***************
*** 822,827 ****
while (it.hasNext()) {
ClippingPlane cp = (ClippingPlane)it.next();
pushName(gl, cp);
! //drawClipplane(cp);
popName(gl);
}
--- 833,839 ----
while (it.hasNext()) {
ClippingPlane cp = (ClippingPlane)it.next();
+ gl.glDisable(GL.GL_CLIP_PLANE0 + cp.getNumber());
pushName(gl, cp);
! drawClipplaneFrame(cp);
popName(gl);
}
***************
*** 831,839 ****
/**
* Draw a clippingPlane
* @param clipplane The clipplane to draw
*/
private void drawClipplane(ClippingPlane clipplane) {
!
double[] d = clipplane.getPlane().getDoublev();
Collection corners = clipplane.getCorners();
--- 843,876 ----
/**
+ * Draw the frame of a clippingplane
+ * @param clipplane The clippingplane
+ */
+ private void drawClipplaneFrame(ClippingPlane clipplane) {
+ {
+ Collection corners = clipplane.getCorners();
+ gl.glColor3fv(CLIP_PLANE_COLOR);
+ gl.glLineWidth(2.0f);
+ gl.glBegin(GL.GL_LINE_STRIP);
+ Iterator it = corners.iterator();
+ while (it.hasNext()) {
+ Vertex v = (Vertex)it.next();
+ gl.glVertex3d(v.getX(),
+ v.getY(),
+ v.getZ());
+ }
+ Vertex v = (Vertex) corners.iterator().next();
+ gl.glVertex3d(v.getX(),
+ v.getY(),
+ v.getZ());
+ gl.glEnd();
+ }
+ }
+
+ /**
* Draw a clippingPlane
* @param clipplane The clipplane to draw
*/
private void drawClipplane(ClippingPlane clipplane) {
! Collection selection = glv.getTool().getSelection();
double[] d = clipplane.getPlane().getDoublev();
Collection corners = clipplane.getCorners();
***************
*** 852,856 ****
}
{
! gl.glColor3fv(CLIP_PLANE_COLOR);
gl.glLineWidth(2.0f);
gl.glBegin(GL.GL_LINE_STRIP);
--- 889,897 ----
}
{
! if (selection.contains(clipplane)) {
! gl.glColor3fv(SELECTED_COLOR);
! } else {
! gl.glColor3fv(CLIP_PLANE_COLOR);
! }
gl.glLineWidth(2.0f);
gl.glBegin(GL.GL_LINE_STRIP);
***************
*** 1252,1256 ****
Set vertices = new HashSet();
Set edges = new HashSet();
-
for (int i = 0; i < hits; i++) {
names = selectBuffer.get(bufferOffset);
--- 1293,1296 ----
***************
*** 1272,1279 ****
if (near < nearest) {
nearest = near;
! if (!(current instanceof ClippingPlane && closest != null)) {
! // if the closest are set we don't care about clipplanes
! closest = current;
! }
}
bufferOffset += names;
--- 1312,1316 ----
if (near < nearest) {
nearest = near;
! closest = current;
}
bufferOffset += names;
|