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

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

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

revision 1.6 by tjl, Fri Feb 21 20:02:48 2003 UTC revision 1.7 by humppake, Wed Mar 5 09:23:44 2003 UTC
# Line 53  public static final String rcsid = "$Id$ Line 53  public static final String rcsid = "$Id$
53    
54      static protected float [][] circleGL = new float[360][2];      static protected float [][] circleGL = new float[360][2];
55      static protected boolean circleGLReady = false;      static protected boolean circleGLReady = false;
56      static protected void prepareCircleGL() {      static protected void prepareCircleGL(float r) {
57          if (!circleGLReady) {          if (!circleGLReady) {
58              for (int i=0;i<360;i++) {              for (int i=0;i<360;i++) {
59                  float a = (float)((Math.PI / 180) * (360-i));                  float a = (float)((Math.PI / 180) * (360-i));
60                  circleGL[i][0] = 0.5f + x(a, 0.5f);                  circleGL[i][0] = r + x(a, r);
61                  circleGL[i][1] = 0.5f + y(a, 0.5f);                  circleGL[i][1] = r + y(a, r);
62              }              }
63              circleGLReady = true;              circleGLReady = true;
64          }          }
# Line 153  public static final String rcsid = "$Id$ Line 153  public static final String rcsid = "$Id$
153      public int putGL(VobScene vs, int coordsys1) {      public int putGL(VobScene vs, int coordsys1) {
154          if(dbg) pa("Addtolistgl coloredsectorvob "+coordsys1);          if(dbg) pa("Addtolistgl coloredsectorvob "+coordsys1);
155          if(glList == null) {          if(glList == null) {
156              if (!circleGLReady) prepareCircleGL();              if (!circleGLReady) prepareCircleGL(0.5f);
157              String bgcall = "";              String bgcall = "";
158              if(nsolids > 0) {              if(nsolids > 0) {
159                  int arc = sector / nsolids;                  int arc = sector / nsolids;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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