Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28996/src/net/sourceforge/bprocessor/gl/view
Modified Files:
Display.java
Log Message:
Work on active space in new display model
Index: Display.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Display.java 24 Sep 2007 14:20:07 -0000 1.7
--- Display.java 24 Sep 2007 14:40:34 -0000 1.8
***************
*** 47,50 ****
--- 47,51 ----
private static float[] white = new float[] {1.0f, 1.0f, 1.0f};
private static float[] black = new float[] {0.0f, 0.0f, 0.0f};
+ private static float[] grey = new float[] {0.8f, 0.8f, 0.8f};
private static float[] blueish = new float[] {0.1f, 0.2f, 0.5f};
private static float[] redish = new float[] {0.5f, 0.2f, 0.1f};
***************
*** 210,215 ****
}
! private static void drawEdges(Collection<Edge> edges) {
! gl.glColor3fv(black, 0);
gl.glLineWidth(1.0f);
for (Edge current : edges) {
--- 211,220 ----
}
! private static void drawEdges(Collection<Edge> edges, boolean active) {
! if (active) {
! gl.glColor3fv(black, 0);
! } else {
! gl.glColor3fv(grey, 0);
! }
gl.glLineWidth(1.0f);
for (Edge current : edges) {
***************
*** 275,281 ****
}
! private static void draw(Space space) {
Project project = Project.getInstance();
Camera camera = project.getCurrentCamera();
Set<Geometric> hidden = new HashSet();
hidden.addAll(camera.getHiddenGeometrics());
--- 280,290 ----
}
! private static void draw(Space space, boolean active) {
Project project = Project.getInstance();
Camera camera = project.getCurrentCamera();
+ if (!active) {
+ active = project.getActiveSpace() == space;
+ }
+
Set<Geometric> hidden = new HashSet();
hidden.addAll(camera.getHiddenGeometrics());
***************
*** 362,370 ****
if (selecting()) {
! selectSurfaces(surfaces);
selectEdges(edges);
} else {
! drawSurfaces(surfaces);
! drawEdges(edges);
}
--- 371,383 ----
if (selecting()) {
! if (active) {
! selectSurfaces(surfaces);
! }
selectEdges(edges);
} else {
! if (active) {
! drawSurfaces(surfaces);
! }
! drawEdges(edges, active);
}
***************
*** 378,382 ****
for (Space current : elements) {
! draw(current);
}
}
--- 391,395 ----
for (Space current : elements) {
! draw(current, active);
}
}
***************
*** 426,430 ****
initialize();
Space world = Project.getInstance().world();
! draw(world);
if (!selecting()) {
--- 439,443 ----
initialize();
Space world = Project.getInstance().world();
! draw(world, false);
if (!selecting()) {
|