Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32003/src/net/sourceforge/bprocessor/gl/view
Modified Files:
View.java
Log Message:
Added active to clippingplane as well so that it is now possible to disable a clippingplane, Added to Select double clicking of constructors and clippingplanes to negate the active boolean of the object. Changed the drawing of planes to be with constructor colors, (THERE ARE STILL ONE THING WITH THE GRID NOW IT IS CLIPPED BY THE CLIPPING PLANE COULD BE OK???)
Index: View.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v
retrieving revision 1.130
retrieving revision 1.131
diff -C2 -d -r1.130 -r1.131
*** View.java 9 Aug 2006 13:46:18 -0000 1.130
--- View.java 9 Aug 2006 18:10:36 -0000 1.131
***************
*** 551,556 ****
while (clipit.hasNext()) {
ClippingPlane cp = (ClippingPlane)clipit.next();
! gl.glClipPlane(GL.GL_CLIP_PLANE0 + cp.getNumber(), cp.getPlane().getDoublev());
! gl.glEnable(GL.GL_CLIP_PLANE0 + cp.getNumber());
}
--- 551,558 ----
while (clipit.hasNext()) {
ClippingPlane cp = (ClippingPlane)clipit.next();
! if (cp.isActive()) {
! gl.glClipPlane(GL.GL_CLIP_PLANE0 + cp.getNumber(), cp.getPlane().getDoublev());
! gl.glEnable(GL.GL_CLIP_PLANE0 + cp.getNumber());
! }
}
***************
*** 565,569 ****
while (clipit.hasNext()) {
ClippingPlane cp = (ClippingPlane)clipit.next();
! gl.glDisable(GL.GL_CLIP_PLANE0 + cp.getNumber());
}
--- 567,573 ----
while (clipit.hasNext()) {
ClippingPlane cp = (ClippingPlane)clipit.next();
! if (cp.isActive()) {
! gl.glDisable(GL.GL_CLIP_PLANE0 + cp.getNumber());
! }
}
***************
*** 1120,1153 ****
Vertex i = cs.getI();
Vertex j = cs.getJ();
! if (colorize) {
! gl.glColor3fv(X_AXIS_COLOR);
! }
! if (cs.isEditable()) {
! drawConstructorVector(cs.getOrigin(), i, dist);
! }
! if (cs.isActive() && active) {
! drawConstructorLine(cs.getOrigin(), i, dist);
! }
! if (colorize) {
! gl.glColor3fv(Y_AXIS_COLOR);
! }
! if (cs.isEditable()) {
! drawConstructorVector(cs.getOrigin(), j, dist);
! }
! if (cs.isActive() && active) {
! drawConstructorLine(cs.getOrigin(), j, dist);
! }
! if (!cs.onlyPlane()) {
! Vertex n = cs.getN();
if (colorize) {
! gl.glColor3fv(Z_AXIS_COLOR);
}
if (cs.isEditable()) {
! drawConstructorVector(cs.getOrigin(), n, dist);
}
if (cs.isActive() && active) {
! drawConstructorLine(cs.getOrigin(), n, dist);
}
- } else {
if (cs.isActive() && active) {
Vertex origin = cs.getOrigin();
--- 1124,1143 ----
Vertex i = cs.getI();
Vertex j = cs.getJ();
! if (cs.onlyPlane()) {
if (colorize) {
! gl.glColor3fv(CONSTRUCTOR_COLOR);
}
if (cs.isEditable()) {
! drawConstructorVector(cs.getOrigin(), i, dist);
}
if (cs.isActive() && active) {
! drawConstructorLine(cs.getOrigin(), i, dist);
! }
! if (cs.isEditable()) {
! drawConstructorVector(cs.getOrigin(), j, dist);
! }
! if (cs.isActive() && active) {
! drawConstructorLine(cs.getOrigin(), j, dist);
}
if (cs.isActive() && active) {
Vertex origin = cs.getOrigin();
***************
*** 1174,1177 ****
--- 1164,1196 ----
gl.glDisable(GL.GL_POLYGON_STIPPLE);
}
+ } else {
+ if (colorize) {
+ gl.glColor3fv(X_AXIS_COLOR);
+ }
+ if (cs.isEditable()) {
+ drawConstructorVector(cs.getOrigin(), i, dist);
+ }
+ if (cs.isActive() && active) {
+ drawConstructorLine(cs.getOrigin(), i, dist);
+ }
+ if (colorize) {
+ gl.glColor3fv(Y_AXIS_COLOR);
+ }
+ if (cs.isEditable()) {
+ drawConstructorVector(cs.getOrigin(), j, dist);
+ }
+ if (cs.isActive() && active) {
+ drawConstructorLine(cs.getOrigin(), j, dist);
+ }
+ Vertex n = cs.getN();
+ if (colorize) {
+ gl.glColor3fv(Z_AXIS_COLOR);
+ }
+ if (cs.isEditable()) {
+ drawConstructorVector(cs.getOrigin(), n, dist);
+ }
+ if (cs.isActive() && active) {
+ drawConstructorLine(cs.getOrigin(), n, dist);
+ }
}
}
|