/[gzz]/gzz/gzz/vob/vobs/ColoredSquareSectorVob.java
ViewVC logotype

Diff of /gzz/gzz/vob/vobs/ColoredSquareSectorVob.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by humppake, Wed Mar 5 09:23:44 2003 UTC revision 1.4 by humppake, Wed Mar 5 09:37:29 2003 UTC
# Line 100  public static final String rcsid = "$Id$ Line 100  public static final String rcsid = "$Id$
100          if(dbg) pa("Addtolistgl coloredsectorvob "+coordsys1);          if(dbg) pa("Addtolistgl coloredsectorvob "+coordsys1);
101          if(glList == null) {          if(glList == null) {
102              if (!circleGLReady) prepareCircleGL((float)Math.sqrt(50)/10);              if (!circleGLReady) prepareCircleGL((float)Math.sqrt(50)/10);
             String bgcall = "";  
             if(nsolids > 0) {  
                 int arc = sector / nsolids;  
                 for(int i=0; i<nsolids; i++) {  
                     Color c = solids[i];  
                     bgcall += (  
                                "Color "+ColorUtil.colorGLString(solids[i])+" 1\n"+  
                                "Begin POLYGON\n"+  
                                "Vertex 0.5 0.5\n");  
                     for (int j=i*arc;j<(i+1)*arc;j+=step) {  
                         bgcall += ("Vertex " + circleGL[(j+start)%360][0] +  
                                    " " + circleGL[(j+start)%360][1] + "\n");  
                     }  
                     int last = (i+1)*arc-1;  
                     if (sector == 360) last++;  
                     if (last == 360) last = 0;  
                     bgcall += ("Vertex " + circleGL[(last+start)%360][0] +  
                                " " + circleGL[(last+start)%360][1] + "\n" +  
                                "End\n");  
                 }  
             } else {  
                 bgcall = (  
                     "Color "+ColorUtil.colorGLString(bg)+" 1\n" +  
                     "Begin POLYGON\n");  
                 if (sector < 360) bgcall += ("Vertex 0.5 0.5\n");  
                 for (int i=0;i<sector;i+=step) {  
                     bgcall += ("Vertex " + circleGL[(i+start)%360][0] +  
                                " " + circleGL[(i+start)%360][1] + "\n");  
                 }  
                 bgcall += ("Vertex " + circleGL[(sector-1+start)%360][0] +  
                            " " + circleGL[(sector-1+start)%360][1] + "\n" +  
                            "End\n");  
             }  
103    
104              bgcall += (              String bgcall = "";
105                        "Color 0 0 0 1\n" +              if(nsolids > 0) bgcall += glSolidsString();
106                        "Begin LINE_LOOP\n");              else bgcall += glBgString();
107              if (sector < 360) bgcall += ("Vertex 0.5 0.5\n");              if(drawBorder) bgcall += glBorderString();
             for (int i=0;i<sector;i+=step) {  
                 bgcall += ("Vertex " + circleGL[(i+start)%360][0] +  
                                " " + circleGL[(i+start)%360][1] + "\n");  
             }  
             bgcall += ("Vertex " + circleGL[(sector-1+start)%360][0] +  
                        " " + circleGL[(sector-1+start)%360][1] + "\n" +  
                        "End\n");  
108                                            
109              glList = GLRen.createCallListBoxCoorded(              glList = GLRen.createCallListBoxCoorded(
110                  "PushAttrib CURRENT_BIT ENABLE_BIT\n"+                  "PushAttrib CURRENT_BIT ENABLE_BIT\n"+

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26