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 |
} |
} |
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; |