30 |
import gzz.client.*; |
import gzz.client.*; |
31 |
import gzz.client.gl.*; |
import gzz.client.gl.*; |
32 |
|
|
33 |
public class GLVobCoorder extends AffineVobCoorder { |
public final class GLVobCoorder extends AffineVobCoorder { |
34 |
public static final String rcsid = "$Id$"; |
public static final String rcsid = "$Id$"; |
35 |
public static boolean dbg = false; |
public static boolean dbg = false; |
36 |
private static void pa(String s) { System.err.println(s); } |
private static void pa(String s) { System.err.println(s); } |
177 |
} |
} |
178 |
|
|
179 |
|
|
180 |
|
public int rotateCentered(int into, float degrees, float x, float y) { |
181 |
|
int paramInd = nfloats; |
182 |
|
nfloats += 3; |
183 |
|
|
184 |
|
inds[ninds + 0] = 16; // rotationCentered = 16 |
185 |
|
inds[ninds + 1] = into; |
186 |
|
inds[ninds + 2] = paramInd; |
187 |
|
int was = ninds; |
188 |
|
ninds += 3; |
189 |
|
|
190 |
|
setRotateCenteredParams(was, degrees, x, y); |
191 |
|
|
192 |
|
return was; |
193 |
|
} |
194 |
|
|
195 |
|
public void setRotateCenteredParams(int cs, float degrees, |
196 |
|
float x, float y) { |
197 |
|
int ind = inds[cs + 2]; |
198 |
|
floats[ind + 0] = degrees; |
199 |
|
floats[ind + 1] = x; |
200 |
|
floats[ind + 2] = y; |
201 |
|
} |
202 |
|
|
203 |
|
|
204 |
public int rotateXYZ(int into, float degrees, float x, float y, float z) { |
public int rotateXYZ(int into, float degrees, float x, float y, float z) { |
205 |
floats[nfloats + 0] = x; |
floats[nfloats + 0] = x; |
206 |
floats[nfloats + 1] = y; |
floats[nfloats + 1] = y; |
288 |
return was; |
return was; |
289 |
} |
} |
290 |
|
|
291 |
|
/** Make a nadir rotation around unitsq center towards nadir. |
292 |
|
*/ |
293 |
|
public int nadirUnitSq(int into, int nadir) { |
294 |
|
int paramInd = nfloats; |
295 |
|
nfloats += 0; |
296 |
|
|
297 |
|
inds[ninds + 0] = 17; // nadirUnitSq |
298 |
|
inds[ninds + 1] = into; |
299 |
|
inds[ninds + 2] = nadir; |
300 |
|
inds[ninds + 3] = paramInd; |
301 |
|
int was = ninds; |
302 |
|
ninds += 4; |
303 |
|
|
304 |
|
return was; |
305 |
|
} |
306 |
|
|
307 |
|
|
308 |
|
|
309 |
|
|
310 |
|
|