Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4914/src/net/sourceforge/bprocessor/gl/view
Modified Files:
View.java
Log Message:
Added drawing of constructors (the new type)
Index: View.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -d -r1.96 -r1.97
*** View.java 4 Jul 2006 09:37:00 -0000 1.96
--- View.java 6 Jul 2006 10:43:00 -0000 1.97
***************
*** 13,16 ****
--- 13,17 ----
import net.sourceforge.bprocessor.model.ClippingPlane;
+ import net.sourceforge.bprocessor.model.Constructor;
import net.sourceforge.bprocessor.model.CoordinateSystem;
import net.sourceforge.bprocessor.model.Defaults;
***************
*** 761,764 ****
--- 762,768 ----
}
+ //Draw constructors
+ drawConstructors();
+
{
gl.glColor3fv(SELECTED_COLOR);
***************
*** 883,887 ****
Space active = Project.getInstance().getActiveSpace();
! if (active != null) {
Set edges = new HashSet();
{
--- 887,891 ----
Space active = Project.getInstance().getActiveSpace();
! if (active != Project.getInstance().world()) {
Set edges = new HashSet();
{
***************
*** 907,910 ****
--- 911,934 ----
/**
+ * Draw all constructors in this level and all above
+ */
+ private void drawConstructors() {
+ Space active = Project.getInstance().getActiveSpace();
+ while (true) {
+ if (active != null) {
+ Collection cons = active.getConstructors();
+ Iterator iter = cons.iterator();
+ while (iter.hasNext()) {
+ Constructor c = (Constructor)iter.next();
+ drawVertexHit(c.getOrigin());
+ }
+ } else {
+ break;
+ }
+ active = active.getOwner();
+ }
+ }
+
+ /**
*
* @param gld The GLDrawable
|