Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20025/src/net/sourceforge/bprocessor/gl/view
Modified Files:
View.java Display.java
Log Message:
Progress on display
Index: Display.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Display.java 23 Sep 2007 19:41:16 -0000 1.4
--- Display.java 24 Sep 2007 08:50:21 -0000 1.5
***************
*** 43,46 ****
--- 43,47 ----
private static GLU glu;
private static ArrayList objects;
+ private static Geometric target;
private static float[] white = new float[] {1.0f, 1.0f, 1.0f};
***************
*** 122,126 ****
/**
! * Set the objects table
* @param value ArrayList
*/
--- 123,127 ----
/**
! * Sets the objects table
* @param value ArrayList
*/
***************
*** 128,131 ****
--- 129,139 ----
objects = value;
}
+ /**
+ * Sets the target
+ * @param value Geometric
+ */
+ public static void target(Geometric value) {
+ target = value;
+ }
private static void push(Object object) {
***************
*** 148,152 ****
gl.glEnable(GL.GL_LIGHTING);
gl.glEnable(GL.GL_POLYGON_OFFSET_FILL);
! gl.glPolygonOffset(0.5f, 0.5f);
gl.glEnable(GL.GL_CULL_FACE);
gl.glCullFace(GL.GL_BACK);
--- 156,160 ----
gl.glEnable(GL.GL_LIGHTING);
gl.glEnable(GL.GL_POLYGON_OFFSET_FILL);
! gl.glPolygonOffset(1.0f, 1.0f);
gl.glEnable(GL.GL_CULL_FACE);
gl.glCullFace(GL.GL_BACK);
***************
*** 178,189 ****
}
- private static void highlight(Surface surface) {
- gl.glEnable(GL.GL_POLYGON_STIPPLE);
- gl.glPolygonStipple(highlight, 0);
- gl.glColor3fv(redish, 0);
- draw(surface, false);
- gl.glDisable(GL.GL_POLYGON_STIPPLE);
- }
-
private static void draw(Surface surface, boolean reverse) {
glu.gluTessBeginPolygon(tesselator, null);
--- 186,189 ----
***************
*** 319,328 ****
gl.glColor3fv(redish, 0);
for (Geometric current : Selection.primary()) {
! if (current.getOwner() == space) {
! if (current instanceof Surface) {
! draw((Surface) current, false);
}
}
}
gl.glDisable(GL.GL_POLYGON_STIPPLE);
}
--- 319,333 ----
gl.glColor3fv(redish, 0);
for (Geometric current : Selection.primary()) {
! if (current != target) {
! if (current.getOwner() == space) {
! if (current instanceof Surface) {
! draw((Surface) current, false);
! }
}
}
}
+ if (target instanceof Surface) {
+ draw((Surface) target, false);
+ }
gl.glDisable(GL.GL_POLYGON_STIPPLE);
}
***************
*** 332,343 ****
} else {
gl.glColor3fv(redish, 0);
! gl.glLineWidth(2.0f);
for (Geometric current : Selection.primary()) {
! if (current.getOwner() == space) {
! if (current instanceof Edge) {
! draw((Edge) current);
}
}
}
drawEdges(edges);
}
--- 337,355 ----
} else {
gl.glColor3fv(redish, 0);
! gl.glLineWidth(3.0f);
for (Geometric current : Selection.primary()) {
! if (current != target) {
! if (current.getOwner() == space) {
! if (current instanceof Edge) {
! draw((Edge) current);
! }
}
}
}
+ if (target instanceof Edge) {
+ if (target.getOwner() == space) {
+ draw((Edge) target);
+ }
+ }
drawEdges(edges);
}
Index: View.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v
retrieving revision 1.233
retrieving revision 1.234
diff -C2 -d -r1.233 -r1.234
*** View.java 23 Sep 2007 19:41:16 -0000 1.233
--- View.java 24 Sep 2007 08:50:21 -0000 1.234
***************
*** 692,695 ****
--- 692,696 ----
initNames(gl);
Display.objects(objectTable);
+ Display.target((Geometric) target);
Display.draw(gld);
Display.selecting(false);
|