Normand Briere
2019-07-18 d7a17c35c443e2cb6c09eaa3cfeaf590a571faa1
CameraPane.java
....@@ -37,7 +37,6 @@
3737 static boolean[] selectedstack = new boolean[65536];
3838 static int materialdepth = 0;
3939
40
- static boolean DEBUG = false;
4140 static boolean FRUSTUM = false; // still bogus true; // frustum culling
4241
4342 // camera change fix
....@@ -149,6 +148,8 @@
149148 defaultcaps.setAccumBlueBits(16);
150149 defaultcaps.setAccumAlphaBits(16);
151150 }
151
+
152
+ private File defaultDirectory = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory();
152153
153154 void SetAsGLRenderer(boolean b)
154155 {
....@@ -325,7 +326,7 @@
325326 cStatic.objectstack[materialdepth++] = obj;
326327 //System.out.println("material " + material);
327328 //Applet3D.tracein(this, selected);
328
- display.vector2buffer = obj.projectedVertices;
329
+ //display.vector2buffer = obj.projectedVertices;
329330 if (obj instanceof Camera)
330331 {
331332 display.options1[0] = material.shift;
....@@ -334,14 +335,28 @@
334335 display.options1[2] = material.shadowbias;
335336 display.options1[3] = material.aniso;
336337 display.options1[4] = material.anisoV;
338
+// System.out.println("display.options1[0] " + display.options1[0]);
339
+// System.out.println("display.options1[1] " + display.options1[1]);
340
+// System.out.println("display.options1[2] " + display.options1[2]);
341
+// System.out.println("display.options1[3] " + display.options1[3]);
342
+// System.out.println("display.options1[4] " + display.options1[4]);
337343 display.options2[0] = material.opacity;
338344 display.options2[1] = material.diffuse;
339345 display.options2[2] = material.factor;
346
+// System.out.println("display.options2[0] " + display.options2[0]);
347
+// System.out.println("display.options2[1] " + display.options2[1]);
348
+// System.out.println("display.options2[2] " + display.options2[2]);
340349
341350 cColor.HSBtoRGB(material.color, material.modulation, 1, display.options3);
351
+// System.out.println("display.options3[0] " + display.options3[0]);
352
+// System.out.println("display.options3[1] " + display.options3[1]);
353
+// System.out.println("display.options3[2] " + display.options3[2]);
342354 display.options4[0] = material.cameralight/0.2f;
343355 display.options4[1] = material.subsurface;
344356 display.options4[2] = material.sheen;
357
+// System.out.println("display.options4[0] " + display.options4[0]);
358
+// System.out.println("display.options4[1] " + display.options4[1]);
359
+// System.out.println("display.options4[2] " + display.options4[2]);
345360
346361 // if (display.CURRENTANTIALIAS > 0)
347362 // display.options3[3] /= 4;
....@@ -357,7 +372,7 @@
357372 /**/
358373 } else
359374 {
360
- DrawMaterial(material, selected);
375
+ DrawMaterial(material, selected, obj.projectedVertices);
361376 }
362377 } else
363378 {
....@@ -381,8 +396,8 @@
381396 cStatic.objectstack[materialdepth++] = obj;
382397 //System.out.println("material " + material);
383398 //Applet3D.tracein("selected ", selected);
384
- display.vector2buffer = obj.projectedVertices;
385
- display.DrawMaterial(material, selected);
399
+ //display.vector2buffer = obj.projectedVertices;
400
+ display.DrawMaterial(material, selected, obj.projectedVertices);
386401 }
387402 }
388403
....@@ -399,8 +414,8 @@
399414 materialdepth -= 1;
400415 if (materialdepth > 0)
401416 {
402
- display.vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices;
403
- display.DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1]);
417
+ //display.vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices;
418
+ display.DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1], cStatic.objectstack[materialdepth - 1].projectedVertices);
404419 }
405420 //Applet3D.traceout("selected ", (stackdepth>0)?selectedstack[stackdepth-1]:"???");
406421 } else if (selected && CameraPane.flash && obj.GetMaterial() != null)
....@@ -420,8 +435,8 @@
420435 materialdepth -= 1;
421436 if (materialdepth > 0)
422437 {
423
- display.vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices;
424
- display.DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1]);
438
+ //display.vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices;
439
+ display.DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1], cStatic.objectstack[materialdepth - 1].projectedVertices);
425440 }
426441 //Applet3D.traceout("selected ", (stackdepth>0)?selectedstack[stackdepth-1]:"???");
427442 //else
....@@ -462,10 +477,12 @@
462477 if (!selectmode) // display.drawMode != display.SELECTION) // && display.drawMode != display.SHADOW) // (attributes & FILL) != 0)
463478 {
464479 //gl.glBegin(gl.GL_TRIANGLES);
465
- boolean hasnorm = pv.norm != null; // && (pv.norm.x != 0 || pv.norm.y != 0 || pv.norm.z != 0);
480
+ boolean hasnorm = pv.norm != null && (pv.norm.x != 0 || pv.norm.y != 0 || pv.norm.z != 0)
481
+ // TEST LIVE NORMALS && !obj.dontselect
482
+ ;
466483 if (!hasnorm)
467484 {
468
- // System.out.println("FUCK!!");
485
+ // System.out.println("Mesh normal");
469486 LA.vecSub(pv/*.pos*/, qv/*.pos*/, obj.v0);
470487 LA.vecSub(pv/*.pos*/, rv/*.pos*/, obj.v1);
471488 LA.vecCross(obj.v0, obj.v1, obj.v2);
....@@ -1190,10 +1207,12 @@
11901207 gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1);
11911208 }
11921209 }
1210
+
11931211 if (flipV)
11941212 gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]);
11951213 else
11961214 gl.glTexCoord2f(uv[count2], uv[count2 + 1]);
1215
+
11971216 //System.out.println("vertex1 = " + v[count3] + ", " + v[count3+1] + ", " + v[count3+2]);
11981217 gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]);
11991218
....@@ -1213,10 +1232,12 @@
12131232 gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1);
12141233 }
12151234 }
1235
+
12161236 if (flipV)
12171237 gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]);
12181238 else
12191239 gl.glTexCoord2f(uv[count2], uv[count2 + 1]);
1240
+
12201241 //System.out.println("vertex2 = " + v[count3] + ", " + v[count3+1] + ", " + v[count3+2]);
12211242 gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]);
12221243
....@@ -1244,8 +1265,10 @@
12441265 gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]);
12451266 else
12461267 gl.glTexCoord2f(uv[count2], uv[count2 + 1]);
1268
+
12471269 //System.out.println("coord3 = " + uv[count2] + ", " + uv[count2+1]);
12481270 gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]);
1271
+
12491272 count2 += 2;
12501273 count3 += 3;
12511274 }
....@@ -1601,7 +1624,7 @@
16011624 // gl.glMaterialfv(gl.GL_BACK, gl.GL_DIFFUSE, colorV, 0);
16021625 }
16031626
1604
- void DrawMaterial(cMaterial material, boolean selected)
1627
+ void DrawMaterial(cMaterial material, boolean selected, Object3D.cVector2[] others)
16051628 {
16061629 CameraPane display = this;
16071630 //new Exception().printStackTrace();
....@@ -1636,7 +1659,7 @@
16361659 colorV[0] = display.modelParams0[0] * material.diffuse;
16371660 colorV[1] = display.modelParams0[1] * material.diffuse;
16381661 colorV[2] = display.modelParams0[2] * material.diffuse;
1639
- colorV[3] = material.opacity;
1662
+ colorV[3] = 1; // material.opacity;
16401663
16411664 gl.glColor4f(colorV[0], colorV[1], colorV[2], material.opacity);
16421665 //System.out.println("Opacity = " + opacity);
....@@ -1744,9 +1767,9 @@
17441767 display.modelParams7[2] = 0;
17451768 display.modelParams7[3] = 0;
17461769
1747
- display.modelParams6[0] = 100; // criss de bug de bump
1770
+ //display.modelParams6[0] = 100; // criss de bug de bump
17481771
1749
- Object3D.cVector2[] extparams = display.vector2buffer;
1772
+ Object3D.cVector2[] extparams = others; // display.vector2buffer;
17501773 if (extparams != null && extparams.length > 0 && extparams[0] != null)
17511774 {
17521775 display.modelParams6[0] = extparams[0].x / 1000.0f; // bump
....@@ -1888,7 +1911,7 @@
18881911 void PushMatrix(double[][] matrix)
18891912 {
18901913 // GrafreeD.tracein(matrix);
1891
- PushMatrix(matrix,1);
1914
+ PushMatrix(matrix, 1);
18921915 }
18931916
18941917 void PushMatrix()
....@@ -2042,7 +2065,7 @@
20422065 //System.err.println("Oeil on");
20432066 OEIL = true;
20442067 if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode)
2045
- object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
2068
+ object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
20462069 //pingthread.StepToTarget(true);
20472070 }
20482071
....@@ -2257,7 +2280,7 @@
22572280
22582281 void ToggleDebug()
22592282 {
2260
- DEBUG ^= true;
2283
+ Globals.DEBUG ^= true;
22612284 }
22622285
22632286 void ToggleLookAt()
....@@ -2265,7 +2288,7 @@
22652288 LOOKAT ^= true;
22662289 }
22672290
2268
- void ToggleRandom()
2291
+ void ToggleSwitch()
22692292 {
22702293 SWITCH ^= true;
22712294 }
....@@ -2374,7 +2397,7 @@
23742397 {
23752398 return currentGL;
23762399 }
2377
-
2400
+
23782401 /**/
23792402 class CacheTexture
23802403 {
....@@ -7919,6 +7942,64 @@
79197942 ReleaseTexture(pigment, false);
79207943 }
79217944
7945
+ public void ReleasePigmentTexture(cTexture tex) // INTERFACE
7946
+ {
7947
+ if (/*tex == null ||*/ ambientOcclusion ) // || !textureon)
7948
+ {
7949
+ return;
7950
+ }
7951
+
7952
+ if (tex == null)
7953
+ {
7954
+ ReleaseTexture(null, false);
7955
+ return;
7956
+ }
7957
+
7958
+ String pigment = Object3D.GetPigment(tex);
7959
+
7960
+ if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
7961
+ {
7962
+ // System.out.print("RELEASE +++++++++++++++ pigment = " + pigment);
7963
+ // System.out.println("; bump = " + bump);
7964
+ }
7965
+
7966
+ if (pigment.equals(""))
7967
+ {
7968
+ pigment = null;
7969
+ }
7970
+
7971
+ ReleaseTexture(pigment, false);
7972
+ }
7973
+
7974
+ public void ReleaseBumpTexture(cTexture tex) // INTERFACE
7975
+ {
7976
+ if (/*tex == null ||*/ ambientOcclusion ) // || !textureon)
7977
+ {
7978
+ return;
7979
+ }
7980
+
7981
+ if (tex == null)
7982
+ {
7983
+ ReleaseTexture(null, true);
7984
+ return;
7985
+ }
7986
+
7987
+ String bump = Object3D.GetBump(tex);
7988
+
7989
+ if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
7990
+ {
7991
+ // System.out.print("RELEASE +++++++++++++++ pigment = " + pigment);
7992
+ // System.out.println("; bump = " + bump);
7993
+ }
7994
+
7995
+ if (bump.equals(""))
7996
+ {
7997
+ bump = null;
7998
+ }
7999
+
8000
+ ReleaseTexture(bump, true);
8001
+ }
8002
+
79228003 void ReleaseTexture(String tex, boolean bump)
79238004 {
79248005 if (// DrawMode() != 0 || /*tex == null ||*/
....@@ -8067,6 +8148,93 @@
80678148 return; // true;
80688149 }
80698150
8151
+ /*boolean*/ public void BindPigmentTexture(cTexture tex, int resolution) throws Exception // INTERFACE
8152
+ {
8153
+ if (// DrawMode() != 0 || /*tex == null ||*/
8154
+ ambientOcclusion ) // || !textureon)
8155
+ {
8156
+ return; // false;
8157
+ }
8158
+
8159
+ if (tex == null)
8160
+ {
8161
+ BindTexture(null,false,resolution);
8162
+ return;
8163
+ }
8164
+
8165
+ String pigment = Object3D.GetPigment(tex);
8166
+
8167
+ usedtextures.put(pigment, pigment);
8168
+
8169
+ if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
8170
+ {
8171
+ // System.out.print("BIND +++++++++++++++ pigment = " + pigment);
8172
+ // System.out.println("; bump = " + bump);
8173
+ }
8174
+
8175
+ if (pigment.equals(""))
8176
+ {
8177
+ pigment = null;
8178
+ }
8179
+
8180
+ GetGL().glActiveTexture(GetGL().GL_TEXTURE0);
8181
+ BindTexture(pigment, false, resolution);
8182
+ }
8183
+
8184
+ /*boolean*/ public void BindBumpTexture(cTexture tex, int resolution) throws Exception // INTERFACE
8185
+ {
8186
+ if (// DrawMode() != 0 || /*tex == null ||*/
8187
+ ambientOcclusion ) // || !textureon)
8188
+ {
8189
+ return; // false;
8190
+ }
8191
+
8192
+ if (tex == null)
8193
+ {
8194
+ BindTexture(null,true,resolution);
8195
+ return;
8196
+ }
8197
+
8198
+ String bump = Object3D.GetBump(tex);
8199
+
8200
+ usedtextures.put(bump, bump);
8201
+
8202
+ if (!tex.equals(":") && !tex.equals(DEFAULT_TEXTURES))
8203
+ {
8204
+ // System.out.print("BIND +++++++++++++++ pigment = " + pigment);
8205
+ // System.out.println("; bump = " + bump);
8206
+ }
8207
+
8208
+ if (bump.equals(""))
8209
+ {
8210
+ bump = null;
8211
+ }
8212
+
8213
+ GetGL().glActiveTexture(GetGL().GL_TEXTURE2);
8214
+ BindTexture(bump, true, resolution);
8215
+ GetGL().glActiveTexture(GetGL().GL_TEXTURE0);
8216
+ }
8217
+
8218
+ java.util.HashSet<String> missingTextures = new java.util.HashSet<String>();
8219
+
8220
+ private boolean FileExists(String tex)
8221
+ {
8222
+ if (missingTextures.contains(tex))
8223
+ {
8224
+ return false;
8225
+ }
8226
+
8227
+ boolean fileExists = new File(tex).exists();
8228
+
8229
+ if (!fileExists)
8230
+ {
8231
+ // If file exists, the "new File()" is not executed sgain
8232
+ missingTextures.add(tex);
8233
+ }
8234
+
8235
+ return fileExists;
8236
+ }
8237
+
80708238 CacheTexture GetCacheTexture(String tex, boolean bump, int resolution) throws Exception
80718239 {
80728240 CacheTexture/*com.sun.opengl.util.texture.Texture*/ texture = null;
....@@ -8075,15 +8243,17 @@
80758243 {
80768244 String texname = tex;
80778245
8246
+ String fallbackTextureName = defaultDirectory + "/Textures/" + texname;
8247
+
80788248 // String[] split = tex.split("Textures");
80798249 // if (split.length > 1)
80808250 // texname = "/Users/nbriere/Textures" + split[split.length-1];
80818251 // else
80828252 // if (!texname.startsWith("/"))
80838253 // texname = "/Users/nbriere/Textures/" + texname;
8084
- if (!new File(tex).exists())
8254
+ if (!FileExists(tex))
80858255 {
8086
- texname = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory() + "/Textures/" + texname;
8256
+ texname = fallbackTextureName;
80878257 }
80888258
80898259 if (CACHETEXTURE)
....@@ -8153,7 +8323,7 @@
81538323 }
81548324
81558325 cachename = texname.substring(0, texname.length()-4)+ext+".jpg";
8156
- if (!new File(cachename).exists())
8326
+ if (!FileExists(cachename))
81578327 cachename = texname;
81588328 else
81598329 processbump = false; // don't process bump map again
....@@ -8175,7 +8345,7 @@
81758345 }
81768346
81778347 cachename = texname.substring(0, texname.length()-4)+ext+".png";
8178
- if (!new File(cachename).exists())
8348
+ if (!FileExists(cachename))
81798349 cachename = texname;
81808350 else
81818351 processbump = false; // don't process bump map again
....@@ -9210,11 +9380,35 @@
92109380 jy8[3] = 0.5f;
92119381 }
92129382
9213
- float[] options1 = new float[]{1000, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV
9383
+ float[] options1 = new float[]{100, 0.00001f, 20, 0, 0}; // focus, aperture, Shadow blur, aniso, anisoV
92149384 float[] options2 = new float[]{0, 1, 0, 0}; // fog density, intensity, elevation
92159385 float[] options3 = new float[]{1, 1, 1, 0}; // fog color
92169386 float[] options4 = new float[]{1, 0, 1, 0}; // image intensity, subsurface, lightsheen
92179387
9388
+ void ResetOptions()
9389
+ {
9390
+ options1[0] = 100;
9391
+ options1[1] = 0.025f;
9392
+ options1[2] = 0.01f;
9393
+ options1[3] = 0;
9394
+ options1[4] = 0;
9395
+
9396
+ options2[0] = 0;
9397
+ options2[1] = 0.75f;
9398
+ options2[2] = 0;
9399
+ options2[3] = 0;
9400
+
9401
+ options3[0] = 1;
9402
+ options3[1] = 1;
9403
+ options3[2] = 1;
9404
+ options3[3] = 0;
9405
+
9406
+ options4[0] = 1;
9407
+ options4[1] = 0;
9408
+ options4[2] = 1;
9409
+ options4[3] = 0;
9410
+ }
9411
+
92189412 static int imagecount = 0; // movie generation
92199413
92209414 static int jitter = 0;
....@@ -9310,8 +9504,8 @@
93109504 assert (parentcam != renderCamera);
93119505
93129506 if (renderCamera != lightCamera)
9313
- for (int count = parentcam.GetTransformCount(); --count>=0;)
9314
- LA.matConcat(matrix, parentcam.toParent, matrix);
9507
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
9508
+ LA.matConcat(matrix, parentcam.GlobalTransform(), matrix);
93159509
93169510 // LA.matConcat(renderCamera.toScreen, renderCamera.toParent, matrix);
93179511
....@@ -9326,8 +9520,8 @@
93269520 LA.matCopy(renderCamera.fromScreen, matrix);
93279521
93289522 if (renderCamera != lightCamera)
9329
- for (int count = parentcam.GetTransformCount(); --count>=0;)
9330
- LA.matConcat(parentcam.fromParent, matrix, matrix);
9523
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
9524
+ LA.matConcat(parentcam.GlobalTransformInv(), matrix, matrix);
93319525
93329526 // LA.matConcat(renderCamera.fromParent, renderCamera.fromScreen, matrix);
93339527
....@@ -10325,6 +10519,7 @@
1032510519 ANTIALIAS = 0;
1032610520 //System.out.println("RESTART");
1032710521 AAtimer.restart();
10522
+ Globals.TIMERRUNNING = true;
1032810523 }
1032910524 }
1033010525 }
....@@ -10392,13 +10587,14 @@
1039210587 ambientOcclusion = false;
1039310588 }
1039410589
10395
- if (Globals.lighttouched && DrawMode() == DEFAULT && !lightMode) // && !FROZEN)
10590
+ if (//Globals.lighttouched &&
10591
+ DrawMode() == DEFAULT) // && !lightMode) // && !FROZEN)
1039610592 {
1039710593 //if (RENDERSHADOW) // ?
1039810594 if (!IsFrozen())
1039910595 {
1040010596 // dec 2012
10401
- if (!ambientOcclusion && !(!flash && !lightMode && DrawMode() == DEFAULT && ANTIALIAS > 0))
10597
+ if (!ambientOcclusion && !(!flash && DrawMode() == DEFAULT && ANTIALIAS > 0))
1040210598 {
1040310599 Globals.framecount++;
1040410600 shadowbuffer.display();
....@@ -10525,8 +10721,8 @@
1052510721
1052610722 // if (parentcam != renderCamera) // not a light
1052710723 if (cam != lightCamera)
10528
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10529
- LA.matConcat(matrix, parentcam.toParent, matrix);
10724
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
10725
+ LA.matConcat(matrix, parentcam.GlobalTransform(), matrix);
1053010726
1053110727 for (int j = 0; j < 4; j++)
1053210728 {
....@@ -10540,8 +10736,8 @@
1054010736
1054110737 // if (parentcam != renderCamera) // not a light
1054210738 if (cam != lightCamera)
10543
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10544
- LA.matConcat(parentcam.fromParent, matrix, matrix);
10739
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
10740
+ LA.matConcat(parentcam.GlobalTransformInv(), matrix, matrix);
1054510741
1054610742 //LA.matConcat(cam.fromScreen, parentcam.fromParent, matrix);
1054710743
....@@ -10832,9 +11028,9 @@
1083211028
1083311029 gl.glMatrixMode(GL.GL_MODELVIEW);
1083411030
10835
-//gl.glHint(gl.GL_POLYGON_SMOOTH_HINT, gl.GL_NICEST);
10836
-//gl.glEnable(gl.GL_POLYGON_SMOOTH);
10837
-//gl.glEnable(gl.GL_MULTISAMPLE);
11031
+gl.glEnable(gl.GL_POLYGON_SMOOTH);
11032
+gl.glHint(gl.GL_POLYGON_SMOOTH_HINT, gl.GL_NICEST);
11033
+gl.glEnable(gl.GL_MULTISAMPLE);
1083811034 } else
1083911035 {
1084011036 //gl.glDisable(GL.GL_TEXTURE_2D);
....@@ -10845,7 +11041,7 @@
1084511041 //System.out.println("BLENDING ON");
1084611042 gl.glEnable(GL.GL_BLEND);
1084711043 gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
10848
-
11044
+// gl.glBlendFunc(GL.GL_SRC_ALPHA_SATURATE, GL.GL_ONE);
1084911045 gl.glMatrixMode(gl.GL_PROJECTION);
1085011046 gl.glLoadIdentity();
1085111047
....@@ -10934,8 +11130,8 @@
1093411130 System.err.println("parentcam != renderCamera");
1093511131
1093611132 // if (cam != lightCamera)
10937
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10938
- LA.xformDir(lightposition, parentcam.toParent, lightposition); // may 2013
11133
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
11134
+ LA.xformDir(lightposition, parentcam.GlobalTransform(), lightposition); // may 2013
1093911135 }
1094011136
1094111137 LA.xformDir(lightposition, cam.toScreen, lightposition);
....@@ -10956,8 +11152,8 @@
1095611152 if (true) // TODO
1095711153 {
1095811154 if (cam != lightCamera)
10959
- for (int count = parentcam.GetTransformCount(); --count>=0;)
10960
- LA.xformDir(light0, parentcam.toParent, light0); // may 2013
11155
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
11156
+ LA.xformDir(light0, parentcam.GlobalTransform(), light0); // may 2013
1096111157 }
1096211158
1096311159 LA.xformPos(light0, cam.toScreen, light0);
....@@ -11302,15 +11498,36 @@
1130211498
1130311499 static boolean zoomonce = false;
1130411500
11501
+ static void CreateSelectedPoint()
11502
+ {
11503
+ if (selectedpoint == null)
11504
+ {
11505
+ debugpointG = new Sphere();
11506
+ debugpointP = new Sphere();
11507
+ debugpointC = new Sphere();
11508
+ debugpointR = new Sphere();
11509
+
11510
+ selectedpoint = new Superellipsoid();
11511
+
11512
+ for (int i=0; i<8; i++)
11513
+ {
11514
+ debugpoints[i] = new Sphere();
11515
+ }
11516
+ }
11517
+ }
11518
+
1130511519 void DrawObject(GL gl, boolean draw)
1130611520 {
11521
+ // To clear camera values
11522
+ ResetOptions();
11523
+
1130711524 //System.out.println("DRAW OBJECT " + mouseDown);
1130811525 // DrawMode() = SELECTION;
1130911526 //GL gl = getGL();
1131011527 if ((TRACK || SHADOWTRACK) || zoomonce)
1131111528 {
1131211529 if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode)
11313
- object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
11530
+ object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
1131411531 pingthread.StepToTarget(true); // true);
1131511532 // zoomonce = false;
1131611533 }
....@@ -11382,8 +11599,9 @@
1138211599
1138311600 if (DrawMode() == DEFAULT)
1138411601 {
11385
- if (DEBUG)
11602
+ if (Globals.DEBUG)
1138611603 {
11604
+ CreateSelectedPoint();
1138711605 float radius = 0.05f;
1138811606 if (selectedpoint.radius != radius)
1138911607 {
....@@ -11552,7 +11770,7 @@
1155211770 return;
1155311771 }
1155411772
11555
- String string = obj.GetToolTip();
11773
+ String string = obj.toString(); //.GetToolTip();
1155611774
1155711775 GL gl = GetGL();
1155811776
....@@ -11869,8 +12087,8 @@
1186912087 //obj.TransformToWorld(light, light);
1187012088 for (int i = tp.size(); --i >= 0;)
1187112089 {
11872
- for (int count = tp.get(i).GetTransformCount(); --count>=0;)
11873
- LA.xformPos(light, tp.get(i).toParent, light);
12090
+ //for (int count = tp.get(i).GetTransformCount(); --count>=0;)
12091
+ LA.xformPos(light, tp.get(i).GlobalTransformInv(), light);
1187412092 }
1187512093
1187612094
....@@ -11887,8 +12105,8 @@
1188712105 parentcam = cameras[0];
1188812106 }
1188912107
11890
- for (int count = parentcam.GetTransformCount(); --count>=0;)
11891
- LA.xformPos(light, parentcam.toParent, light); // may 2013
12108
+ //for (int count = parentcam.GetTransformCount(); --count>=0;)
12109
+ LA.xformPos(light, parentcam.GlobalTransform(), light); // may 2013
1189212110
1189312111 LA.xformPos(light, renderCamera.toScreen, light);
1189412112
....@@ -13140,7 +13358,8 @@
1314013358 /*static*/ float[] modelParams5 = new float[]{0, 0, 0, 0}; // texture, opacity, fakedepth, shadowbias
1314113359 /*static*/ float[] modelParams6 = new float[]{0, 0, 0, 0}; // bump, noise, borderfade, fog punchthrough
1314213360 /*static*/ float[] modelParams7 = new float[]{0, 0, 0, 0}; // noise power, opacity power
13143
- Object3D.cVector2[] vector2buffer;
13361
+
13362
+ //Object3D.cVector2[] vector2buffer;
1314413363
1314513364 // IN : ndotl, ndoth, xxx, NdotL //, snininess, lightarea
1314613365 // OUT : diff, spec
....@@ -13156,9 +13375,10 @@
1315613375 "DP3 " + dest + ".z," + "normals," + "eye;" +
1315713376 "MAX " + dest + ".w," + dest + ".z," + "eps.x;" +
1315813377 //"MOV " + dest + ".w," + "normal.z;" +
13159
- "MUL " + dest + ".z," + "params2.w," + dest + ".x;" +
13160
- "MUL " + dest + ".z," + dest + ".z," + dest + ".x;" +
13161
- //"MOV " + dest + ".z," + "params2.w;" +
13378
+// "MUL " + dest + ".z," + "params2.w," + dest + ".x;" + // PRETTY HEURISTIC FOR VELVET
13379
+// "MUL " + dest + ".z," + dest + ".z," + dest + ".x;" +
13380
+
13381
+ "MOV " + dest + ".z," + "params2.w;" + // EXACT
1316213382 "POW " + dest + ".w," + dest + ".w," + dest + ".z;" +
1316313383 "RCP " + dest + ".w," + dest + ".w;" +
1316413384 //"RSQ " + dest + ".w," + dest + ".w;" +
....@@ -13663,6 +13883,7 @@
1366313883 else
1366413884 if (evt.getSource() == AAtimer)
1366513885 {
13886
+ Globals.TIMERRUNNING = false;
1366613887 if (mouseDown)
1366713888 {
1366813889 //new Exception().printStackTrace();
....@@ -13722,7 +13943,7 @@
1372213943
1372313944 // fev 2014???
1372413945 if ((TRACK || SHADOWTRACK) && trackedobject != null) // && DrawMode() == SHADOW) // && !lightMode)
13725
- object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
13946
+ object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
1372613947 pingthread.StepToTarget(true); // true);
1372713948 }
1372813949 // if (!LIVE)
....@@ -13737,6 +13958,7 @@
1373713958 return;
1373813959
1373913960 AAtimer.restart(); //
13961
+ Globals.TIMERRUNNING = true;
1374013962
1374113963 // waslive = LIVE;
1374213964 // LIVE = false;
....@@ -13809,9 +14031,12 @@
1380914031
1381014032 public void mouseDragged(MouseEvent e)
1381114033 {
14034
+ Globals.MOUSEDRAGGED = true;
14035
+
1381214036 //System.out.println("mouseDragged: " + e);
1381314037 if (isRenderer)
1381414038 movingcamera = true;
14039
+
1381514040 //if (drawing)
1381614041 //return;
1381714042 if ((e.getModifiersEx() & CTRL) != 0
....@@ -14072,12 +14297,12 @@
1407214297 void GoDown(int mod)
1407314298 {
1407414299 MODIFIERS |= COMMAND;
14075
- /*
14300
+ /**/
1407614301 if((mod&SHIFT) == SHIFT)
1407714302 manipCamera.RotatePosition(0, -speed);
1407814303 else
14079
- manipCamera.BackForth(0, -speed*delta, getWidth());
14080
- */
14304
+ manipCamera.BackForth(0, -speed*delta, 0); // getWidth());
14305
+ /**/
1408114306 if ((mod & SHIFT) == SHIFT)
1408214307 {
1408314308 mouseMode = mouseMode; // VR??
....@@ -14093,12 +14318,12 @@
1409314318 void GoUp(int mod)
1409414319 {
1409514320 MODIFIERS |= COMMAND;
14096
- /*
14321
+ /**/
1409714322 if((mod&SHIFT) == SHIFT)
1409814323 manipCamera.RotatePosition(0, speed);
1409914324 else
14100
- manipCamera.BackForth(0, speed*delta, getWidth());
14101
- */
14325
+ manipCamera.BackForth(0, speed*delta, 0); // getWidth());
14326
+ /**/
1410214327 if ((mod & SHIFT) == SHIFT)
1410314328 {
1410414329 mouseMode = mouseMode;
....@@ -14114,12 +14339,12 @@
1411414339 void GoLeft(int mod)
1411514340 {
1411614341 MODIFIERS |= COMMAND;
14117
- /*
14342
+ /**/
1411814343 if((mod&SHIFT) == SHIFT)
14119
- manipCamera.RotatePosition(speed, 0);
14120
- else
1412114344 manipCamera.Translate(speed*delta, 0, getWidth());
14122
- */
14345
+ else
14346
+ manipCamera.RotatePosition(speed, 0);
14347
+ /**/
1412314348 if ((mod & SHIFT) == SHIFT)
1412414349 {
1412514350 mouseMode = mouseMode;
....@@ -14135,12 +14360,12 @@
1413514360 void GoRight(int mod)
1413614361 {
1413714362 MODIFIERS |= COMMAND;
14138
- /*
14363
+ /**/
1413914364 if((mod&SHIFT) == SHIFT)
14140
- manipCamera.RotatePosition(-speed, 0);
14141
- else
1414214365 manipCamera.Translate(-speed*delta, 0, getWidth());
14143
- */
14366
+ else
14367
+ manipCamera.RotatePosition(-speed, 0);
14368
+ /**/
1414414369 if ((mod & SHIFT) == SHIFT)
1414514370 {
1414614371 mouseMode = mouseMode;
....@@ -14197,7 +14422,8 @@
1419714422 info.camera = renderCamera;
1419814423 info.x = x;
1419914424 info.y = y;
14200
- object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0);
14425
+ object.GetWindow().copy
14426
+ .doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0);
1420114427 } else
1420214428 {
1420314429 if (x < startX)
....@@ -14361,7 +14587,9 @@
1436114587 ci.camera = renderCamera;
1436214588 if (!isRenderer)
1436314589 {
14364
- if (object.editWindow.copy.doEditClick(ci, 0))
14590
+ //ObjEditor editWindow = object.editWindow;
14591
+ //Object3D copy = editWindow.copy;
14592
+ if (object.doEditClick(ci, 0))
1436514593 {
1436614594 setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
1436714595 } else
....@@ -14373,7 +14601,11 @@
1437314601
1437414602 public void mouseReleased(MouseEvent e)
1437514603 {
14604
+ Globals.MOUSEDRAGGED = false;
14605
+
1437614606 movingcamera = false;
14607
+ X = 0; // getBounds().width/2;
14608
+ Y = 0; // getBounds().height/2;
1437714609 //System.out.println("mouseReleased: " + e);
1437814610 clickEnd(e.getX(), e.getY(), e.getModifiersEx());
1437914611 }
....@@ -14714,7 +14946,9 @@
1471414946 case 'E' : COMPACT ^= true;
1471514947 repaint();
1471614948 break;
14717
- case 'W' : DEBUGHSB ^= true;
14949
+ case 'W' : // Wide Window (fullscreen)
14950
+ //DEBUGHSB ^= true;
14951
+ ObjEditor.theFrame.ToggleFullScreen();
1471814952 repaint();
1471914953 break;
1472014954 case 'u' : Udebug ^= true; Vdebug = false; NORMALdebug = false; programInitialized = false; repaint(); break;
....@@ -14739,8 +14973,8 @@
1473914973 RevertCamera();
1474014974 repaint();
1474114975 break;
14742
- case 'L':
1474314976 case 'l':
14977
+ //case 'L':
1474414978 if (lightMode)
1474514979 {
1474614980 lightMode = false;
....@@ -14883,9 +15117,9 @@
1488315117 case '_':
1488415118 kompactbit = 5;
1488515119 break;
14886
- case '+':
14887
- kompactbit = 6;
14888
- break;
15120
+// case '+':
15121
+// kompactbit = 6;
15122
+// break;
1488915123 case ' ':
1489015124 lightMode ^= true;
1489115125 Globals.lighttouched = true;
....@@ -14897,6 +15131,7 @@
1489715131 case ESC:
1489815132 RENDERPROGRAM += 1;
1489915133 RENDERPROGRAM %= 3;
15134
+
1490015135 repaint();
1490115136 break;
1490215137 case 'Z':
....@@ -14936,8 +15171,9 @@
1493615171 case DELETE:
1493715172 ClearSelection();
1493815173 break;
14939
- /*
1494015174 case '+':
15175
+
15176
+ /*
1494115177 //fontsize += 1;
1494215178 bbzoom *= 2;
1494315179 repaint();
....@@ -14954,17 +15190,17 @@
1495415190 case '=':
1495515191 IncDepth();
1495615192 //fontsize += 1;
14957
- object.editWindow.refreshContents(true);
15193
+ object.GetWindow().refreshContents(true);
1495815194 maskbit = 6;
1495915195 break;
1496015196 case '-': //if (PixelThreshold>1) PixelThreshold /= 2;
1496115197 DecDepth();
1496215198 maskbit = 5;
1496315199 //if(fontsize > 1) fontsize -= 1;
14964
- if (object.editWindow == null)
14965
- new Exception().printStackTrace();
14966
- else
14967
- object.editWindow.refreshContents(true);
15200
+// if (object.editWindow == null)
15201
+// new Exception().printStackTrace();
15202
+// else
15203
+ object.GetWindow().refreshContents(true);
1496815204 break;
1496915205 case '{':
1497015206 manipCamera.shaper_fovy /= 1.1;
....@@ -15188,7 +15424,7 @@
1518815424 }
1518915425 */
1519015426
15191
- object.editWindow.EditSelection();
15427
+ object.GetWindow().EditSelection(false);
1519215428 }
1519315429
1519415430 void SelectParent()
....@@ -15205,10 +15441,10 @@
1520515441 {
1520615442 //selectees.remove(i);
1520715443 System.out.println("select parent of " + elem);
15208
- group.editWindow.Select(elem.parent.GetTreePath(), first, true);
15444
+ group.GetWindow().Select(elem.parent.GetTreePath(), first, true);
1520915445 } else
1521015446 {
15211
- group.editWindow.Select(elem.GetTreePath(), first, true);
15447
+ group.GetWindow().Select(elem.GetTreePath(), first, true);
1521215448 }
1521315449
1521415450 first = false;
....@@ -15250,12 +15486,12 @@
1525015486 for (int j = 0; j < group.children.size(); j++)
1525115487 {
1525215488 elem = (Object3D) group.children.elementAt(j);
15253
- object.editWindow.Select(elem.GetTreePath(), first, true);
15489
+ object.GetWindow().Select(elem.GetTreePath(), first, true);
1525415490 first = false;
1525515491 }
1525615492 } else
1525715493 {
15258
- object.editWindow.Select(elem.GetTreePath(), first, true);
15494
+ object.GetWindow().Select(elem.GetTreePath(), first, true);
1525915495 }
1526015496
1526115497 first = false;
....@@ -15266,21 +15502,21 @@
1526615502 {
1526715503 //Composite group = (Composite) object;
1526815504 Object3D group = object;
15269
- group.editWindow.loadClipboard(true); // ClearSelection(false);
15505
+ group.GetWindow().loadClipboard(true); // ClearSelection(false);
1527015506 }
1527115507
1527215508 void ResetTransform(int mask)
1527315509 {
1527415510 //Composite group = (Composite) object;
1527515511 Object3D group = object;
15276
- group.editWindow.ResetTransform(mask);
15512
+ group.GetWindow().ResetTransform(mask);
1527715513 }
1527815514
1527915515 void FlipTransform()
1528015516 {
1528115517 //Composite group = (Composite) object;
1528215518 Object3D group = object;
15283
- group.editWindow.FlipTransform();
15519
+ group.GetWindow().FlipTransform();
1528415520 // group.editWindow.ReduceMesh(true);
1528515521 }
1528615522
....@@ -15288,7 +15524,7 @@
1528815524 {
1528915525 //Composite group = (Composite) object;
1529015526 Object3D group = object;
15291
- group.editWindow.PrintMemory();
15527
+ group.GetWindow().PrintMemory();
1529215528 // group.editWindow.ReduceMesh(true);
1529315529 }
1529415530
....@@ -15296,7 +15532,7 @@
1529615532 {
1529715533 //Composite group = (Composite) object;
1529815534 Object3D group = object;
15299
- group.editWindow.ResetCentroid();
15535
+ group.GetWindow().ResetCentroid();
1530015536 }
1530115537
1530215538 void IncDepth()
....@@ -15382,7 +15618,9 @@
1538215618 info.bounds.setBounds(0, 0, (int) (width * zoom), (int) (height * zoom));
1538315619 //Image img = CreateImage(width, height);
1538415620 //System.out.println("width = " + width + "; height = " + height + "\n");
15621
+
1538515622 Graphics gr = g; // img.getGraphics();
15623
+
1538615624 if (!hasMarquee)
1538715625 {
1538815626 if (Xmin < Xmax) // !locked)
....@@ -15470,6 +15708,7 @@
1547015708 info.bounds.y += (height - desired) / 2;
1547115709 }
1547215710 }
15711
+
1547315712 info.g = gr;
1547415713 info.camera = renderCamera;
1547515714 /*
....@@ -15479,15 +15718,55 @@
1547915718 */
1548015719 if (!isRenderer)
1548115720 {
15482
- object.drawEditHandles(info, 0);
15721
+ Grafreed.Assert(object != null);
15722
+ Grafreed.Assert(object.selection != null);
15723
+ if (object.selection.Size() > 0)
15724
+ {
15725
+ int hitSomething = object.selection.get(0).hitSomething;
15726
+
15727
+ info.DX = 0;
15728
+ info.DY = 0;
15729
+ info.W = 1;
15730
+ if (hitSomething == Object3D.hitCenter)
15731
+ {
15732
+ info.DX = X;
15733
+ if (X != 0)
15734
+ info.DX -= info.bounds.width/2;
15735
+
15736
+ info.DY = Y;
15737
+ if (Y != 0)
15738
+ info.DY -= info.bounds.height/2;
15739
+ }
15740
+
15741
+ object.drawEditHandles(info, 0);
15742
+
15743
+ if (drag && (X != 0 || Y != 0))
15744
+ {
15745
+ switch (hitSomething)
15746
+ {
15747
+ case Object3D.hitCenter: gr.setColor(Color.pink);
15748
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15749
+ break;
15750
+ case Object3D.hitRotate: gr.setColor(Color.yellow);
15751
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15752
+ break;
15753
+ case Object3D.hitScale: gr.setColor(Color.cyan);
15754
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
15755
+ break;
15756
+ }
15757
+
15758
+ }
15759
+ }
1548315760 }
1548415761 }
15762
+
1548515763 if (isRenderer)
1548615764 {
1548715765 //gr.setColor(Color.black);
1548815766 //gr.drawRect(info.bounds.x - 1, info.bounds.y - 1, info.bounds.width + 1, info.bounds.height + 1);
1548915767 //gr.drawRect(info.bounds.x - 2, info.bounds.y - 2, info.bounds.width + 3, info.bounds.height + 3);
1549015768 }
15769
+
1549115770 if (hasMarquee)
1549215771 {
1549315772 gr.setXORMode(Color.white);
....@@ -15894,7 +16173,7 @@
1589416173 Object3D object;
1589516174 static Object3D trackedobject;
1589616175 Camera renderCamera; // Light or Eye (or Occlusion)
15897
- /*static*/ Camera manipCamera; // Light or Eye
16176
+ /*static*/ Camera manipCamera; // Light or Eye. Can be Light when Eye, not Eye when Light
1589816177 /*static*/ Camera eyeCamera;
1589916178 /*static*/ Camera lightCamera;
1590016179 int cameracount;
....@@ -16179,16 +16458,16 @@
1617916458 cStatic.objectstack[materialdepth++] = checker;
1618016459 //System.out.println("material " + material);
1618116460 //Applet3D.tracein(this, selected);
16182
- vector2buffer = checker.projectedVertices;
16461
+ //vector2buffer = checker.projectedVertices;
1618316462
1618416463 //checker.GetMaterial().Draw(this, false); // true);
16185
- DrawMaterial(checker.GetMaterial(), false); // true);
16464
+ DrawMaterial(checker.GetMaterial(), false, checker.projectedVertices); // true);
1618616465
1618716466 materialdepth -= 1;
1618816467 if (materialdepth > 0)
1618916468 {
16190
- vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices;
16191
- DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1]);
16469
+ //vector2buffer = cStatic.objectstack[materialdepth - 1].projectedVertices;
16470
+ DrawMaterial(materialstack[materialdepth - 1], selectedstack[materialdepth - 1], cStatic.objectstack[materialdepth - 1].projectedVertices);
1619216471 }
1619316472 //checker.GetMaterial().opacity = 1f;
1619416473 ////checker.GetMaterial().ambient = 1f;
....@@ -16412,6 +16691,8 @@
1641216691 // System.err.println("view = " + view[8] + " " + view[9] + " " + view[10] + " " + view[11]);
1641316692 // System.err.println("view = " + view[12] + " " + view[13] + " " + view[14] + " " + view[15]);
1641416693
16694
+ CreateSelectedPoint();
16695
+
1641516696 // Will fit the mesh !!!
1641616697 selectedpoint.toParent[0][0] = 0.0001;
1641716698 selectedpoint.toParent[1][1] = 0.0001;
....@@ -16465,7 +16746,7 @@
1646516746 }
1646616747
1646716748 if (!movingcamera && !PAINTMODE)
16468
- object.editWindow.ScreenFitPoint(); // fev 2014
16749
+ object.GetWindow().ScreenFitPoint(); // fev 2014
1646916750
1647016751 if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
1647116752 {
....@@ -16477,17 +16758,17 @@
1647716758
1647816759 group.add(paintobj); // link
1647916760
16480
- object.editWindow.SnapObject(group);
16761
+ object.GetWindow().SnapObject(group);
1648116762
16482
- Object3D folder = object.editWindow.copy;
16763
+ Object3D folder = object.GetWindow().copy;
1648316764
16484
- if (object.editWindow.copy.selection.Size() > 0)
16485
- folder = object.editWindow.copy.selection.elementAt(0);
16765
+ if (object.GetWindow().copy.selection.Size() > 0)
16766
+ folder = object.GetWindow().copy.selection.elementAt(0);
1648616767
1648716768 folder.add(group);
1648816769
16489
- object.editWindow.ResetModel();
16490
- object.editWindow.refreshContents();
16770
+ object.GetWindow().ResetModel();
16771
+ object.GetWindow().refreshContents();
1649116772 }
1649216773 else
1649316774 paintcount = 0;
....@@ -16526,6 +16807,11 @@
1652616807 //System.out.println("objects[color] = " + objects[color]);
1652716808 //objects[color].Select();
1652816809 indexcount = 0;
16810
+ ObjEditor window = object.GetWindow();
16811
+ if (window != null && deselect)
16812
+ {
16813
+ window.Select(null, deselect, true);
16814
+ }
1652916815 object.Select(color, deselect);
1653016816 }
1653116817
....@@ -17051,23 +17337,15 @@
1705117337 int AAbuffersize = 0;
1705217338
1705317339 //double[] selectedpoint = new double[3];
17054
- static Superellipsoid selectedpoint = new Superellipsoid();
17340
+ static Superellipsoid selectedpoint;
1705517341 static Sphere previousselectedpoint = null;
17056
- static Sphere debugpointG = new Sphere();
17057
- static Sphere debugpointP = new Sphere();
17058
- static Sphere debugpointC = new Sphere();
17059
- static Sphere debugpointR = new Sphere();
17342
+ static Sphere debugpointG;
17343
+ static Sphere debugpointP;
17344
+ static Sphere debugpointC;
17345
+ static Sphere debugpointR;
1706017346
1706117347 static Sphere debugpoints[] = new Sphere[8];
1706217348
17063
- static
17064
- {
17065
- for (int i=0; i<8; i++)
17066
- {
17067
- debugpoints[i] = new Sphere();
17068
- }
17069
- }
17070
-
1707117349 static void InitPoints(float radius)
1707217350 {
1707317351 for (int i=0; i<8; i++)