/[gzz]/gzz/gzz/modules/pp/vob/VobCSGenerator.java
ViewVC logotype

Diff of /gzz/gzz/modules/pp/vob/VobCSGenerator.java

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

revision 1.8 by mudyc, Wed Jan 1 10:33:28 2003 UTC revision 1.9 by tjl, Fri Jan 3 07:16:56 2003 UTC
# Line 40  public static final String rcsid = "$Id$ Line 40  public static final String rcsid = "$Id$
40      public float smallest_percent = 0.2f;      public float smallest_percent = 0.2f;
41    
42    
43      private int vob_cs[][];      private int vob_cs[];
44    
45    
46    
# Line 123  public static final String rcsid = "$Id$ Line 123  public static final String rcsid = "$Id$
123              sum += rations[i];              sum += rations[i];
124          }          }
125    
126          vob_cs = new int[vob_count][2];          vob_cs = new int[vob_count];
127    
128          float real_ratio = y_diff/sum;          float real_ratio = y_diff/sum;
129    
# Line 138  public static final String rcsid = "$Id$ Line 138  public static final String rcsid = "$Id$
138    
139              float y_d = y - y_tmp;              float y_d = y - y_tmp;
140    
141              vob_cs[i][0] = ((GLVobCoorder)vs.coords).affineCoordsys(0, 0,              int ctr = ((GLVobCoorder)vs.coords).affineCoordsys(0, 0,
142                                                                      x_center, y_tmp + muutos/2,                                                                        x_center, y_tmp + muutos/2,  
143                                                                      1, 0, 0, 1);                                                                      1, 0, 0, 1);
144              vob_cs[i][1] = vs.coords.orthoBox(vob_cs[i][0], 10,  
145                                                -vob_width/2, -y_d/2, 1,1,              vob_cs[i] = vs.coords.orthoBox(ctr, 10,
146                                                vob_width, y_d);                            -vob_width/2, -y_d/2, 1,1,
147                              vob_width, y_d);
148    
149              if (dbg) {              if (dbg) {
150                  if (i == focus_index) pa("y_tmp: "+ y_tmp +" y_cent: " +(y-muutos/2) +                  if (i == focus_index) pa("y_tmp: "+ y_tmp +" y_cent: " +(y-muutos/2) +
# Line 159  public static final String rcsid = "$Id$ Line 160  public static final String rcsid = "$Id$
160      private int index = 0;      private int index = 0;
161      /** get the Coordinate System one by one.      /** get the Coordinate System one by one.
162       */       */
163      public int getNextCS(int which) {      public int getNextCS() {
164          int i = index;          int i = index;
165          if (i < 0 || i >= vob_cs.length) throw new Error("index: "+index+ " out of vob_cs.length");          if (i < 0 || i >= vob_cs.length) throw new Error("index: "+index+ " out of vob_cs.length");
166          switch(which) {          return vob_cs[index++];
         case 0: return vob_cs[index][which];  
         case 1: return vob_cs[index++][which];  
         }  
         throw new Error("asked unknown CS: " + i);  
167      }      }
168    
169      /** Easy algorithm      /** Easy algorithm

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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