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 |
|
|
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 |
|
|
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) + |
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 |