39 |
int[] list = new int[10000]; |
int[] list = new int[10000]; |
40 |
int curs = 0; |
int curs = 0; |
41 |
int[] cs = new int[10000]; |
int[] cs = new int[10000]; |
42 |
Vob[] vobs = new Vob[10000]; |
Object[] vobs = new Vob[10000]; |
43 |
int nvobs = 0; |
int nvobs = 0; |
44 |
|
public void put(Vob3 vob, int coordsys1, int coordsys2, int coordsys3) { |
45 |
|
curs = vob.addToListGL(screen, list, curs, coordsys1, |
46 |
|
coordsys2, coordsys3); |
47 |
|
if(dbg) pa("Add to GLVobMap "+this+": "+vob+" "+coordsys1+" " |
48 |
|
+coordsys2+" "+coordsys3+" curs: "+curs); |
49 |
|
// Stash it away so it won't get garbage collected too early :( |
50 |
|
cs[nvobs] = coordsys1; |
51 |
|
vobs[nvobs++] = vob; |
52 |
|
} |
53 |
public void put(Vob vob, int coordsys1, int coordsys2) { |
public void put(Vob vob, int coordsys1, int coordsys2) { |
54 |
curs = vob.addToListGL(screen, list, curs, coordsys1, coordsys2); |
curs = vob.addToListGL(screen, list, curs, coordsys1, coordsys2); |
55 |
if(dbg) pa("Add to GLVobMap "+this+": "+vob+" "+coordsys1+" "+coordsys2+" curs: "+curs); |
if(dbg) pa("Add to GLVobMap "+this+": "+vob+" "+coordsys1+" "+coordsys2+" curs: "+curs); |
77 |
public Vob getVobByCS(int csind) { |
public Vob getVobByCS(int csind) { |
78 |
for(int i=nvobs-1; i>=0; i--) { |
for(int i=nvobs-1; i>=0; i--) { |
79 |
if(cs[i] == csind) |
if(cs[i] == csind) |
80 |
return vobs[i]; |
return (Vob)vobs[i]; |
81 |
} |
} |
82 |
return null; |
return null; |
83 |
} |
} |