Normand Briere
2019-07-01 6600d22461ccc1cb602f238a9ffa83cf07dd830e
CameraPane.java
....@@ -2065,7 +2065,7 @@
20652065 //System.err.println("Oeil on");
20662066 OEIL = true;
20672067 if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode)
2068
- object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
2068
+ object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
20692069 //pingthread.StepToTarget(true);
20702070 }
20712071
....@@ -2396,128 +2396,6 @@
23962396 public GL GetGL() // INTERFACE
23972397 {
23982398 return currentGL;
2399
- }
2400
-
2401
- private void GetRemoteZip(String url, String name, boolean unzip, boolean save)
2402
- {
2403
- java.net.URL u;
2404
- InputStream is = null;
2405
- DataInputStream dis;
2406
- java.util.zip.ZipInputStream zis;
2407
- //String s;
2408
-
2409
- System.out.println("GetRemoteZip " + name);
2410
-
2411
- int total = 0; // dis.available();
2412
-
2413
- byte[] bytes = new byte[16384];
2414
-
2415
- try
2416
- {
2417
- u = new java.net.URL(url + name);
2418
- is = u.openStream();
2419
-
2420
- System.out.println(url + name);
2421
-
2422
- if (unzip)
2423
- {
2424
- //dis = new DataInputStream(new BufferedInputStream(is));
2425
- zis = new java.util.zip.ZipInputStream(new BufferedInputStream(is));
2426
- //while ((s = dis.readLine()) != null)
2427
-
2428
- if (save)
2429
- new java.io.File(name).mkdirs();
2430
-
2431
- // FileOutputStream stream = new FileOutputStream("test.zip");
2432
- //
2433
- // int count;
2434
- //
2435
- // while ((count = dis.read(bytes)) != -1)
2436
- // {
2437
- // //System.out.println(s);
2438
- // System.out.println(count);
2439
- // total += count;
2440
- // stream.write(bytes);
2441
- // }
2442
- //
2443
- // stream.close();
2444
-
2445
- // now iterate through each item in the stream. The get next
2446
- // entry call will return a ZipEntry for each file in the
2447
- // stream
2448
- java.util.zip.ZipEntry entry;
2449
- while((entry = zis.getNextEntry())!=null)
2450
- {
2451
- if (entry.getName().endsWith(".gsm"))
2452
- {
2453
- continue;
2454
- }
2455
-
2456
- String s = String.format("Entry: %s len %d added %TD",
2457
- entry.getName(), entry.getSize(),
2458
- new java.util.Date(entry.getTime()));
2459
- System.out.println(s);
2460
-
2461
- if (save)
2462
- {
2463
- // Once we get the entry from the stream, the stream is
2464
- // positioned read to read the raw data, and we keep
2465
- // reading until read returns 0 or less.
2466
- String outpath = name + "/" + entry.getName();
2467
- FileOutputStream output = null;
2468
- try
2469
- {
2470
- output = new FileOutputStream(outpath);
2471
- int len = 0;
2472
- while ((len = zis.read(bytes)) > 0)
2473
- {
2474
- output.write(bytes, 0, len);
2475
- }
2476
- }
2477
- finally
2478
- {
2479
- // we must always close the output file
2480
- if(output!=null) output.close();
2481
- }
2482
- }
2483
- }
2484
- }
2485
- }
2486
- catch (java.net.MalformedURLException mue)
2487
- {
2488
- System.err.println("Ouch - a MalformedURLException happened.");
2489
- mue.printStackTrace();
2490
- //System.exit(2);
2491
- }
2492
- catch (IOException ioe)
2493
- {
2494
- //System.err.println("Oops - an IOException happened.");
2495
- //ioe.printStackTrace();
2496
- //System.exit(3);
2497
- }
2498
- finally
2499
- {
2500
- try
2501
- {
2502
- if (is != null)
2503
- is.close();
2504
- }
2505
- catch (IOException ioe)
2506
- {
2507
- }
2508
- }
2509
-
2510
- // System.out.println("length = " + total);
2511
-
2512
-// try
2513
-// {
2514
-// Runtime.getRuntime().exec("/usr/local/bin/wget https://archive3d.net/?a=download&do=get&id=7caca905");
2515
-// }
2516
-// catch (Exception e)
2517
-// {
2518
-// e.printStackTrace();
2519
-// }
2520
-
25212399 }
25222400
25232401 /**/
....@@ -11649,7 +11527,7 @@
1164911527 if ((TRACK || SHADOWTRACK) || zoomonce)
1165011528 {
1165111529 if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode)
11652
- object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
11530
+ object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
1165311531 pingthread.StepToTarget(true); // true);
1165411532 // zoomonce = false;
1165511533 }
....@@ -14065,7 +13943,7 @@
1406513943
1406613944 // fev 2014???
1406713945 if ((TRACK || SHADOWTRACK) && trackedobject != null) // && DrawMode() == SHADOW) // && !lightMode)
14068
- object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
13946
+ object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK);
1406913947 pingthread.StepToTarget(true); // true);
1407013948 }
1407113949 // if (!LIVE)
....@@ -15295,12 +15173,6 @@
1529515173 break;
1529615174 case '+':
1529715175
15298
- //for (int i=0; i<0x7FFFFFFF; i++)
15299
- {
15300
- //String.format("%08X", i); // "7caca905"
15301
- GetRemoteZip("https://archive3d.net/?a=download&do=get&id=", "7caca905", true, true);
15302
- }
15303
-
1530415176 /*
1530515177 //fontsize += 1;
1530615178 bbzoom *= 2;
....@@ -15318,17 +15190,17 @@
1531815190 case '=':
1531915191 IncDepth();
1532015192 //fontsize += 1;
15321
- object.editWindow.refreshContents(true);
15193
+ object.GetWindow().refreshContents(true);
1532215194 maskbit = 6;
1532315195 break;
1532415196 case '-': //if (PixelThreshold>1) PixelThreshold /= 2;
1532515197 DecDepth();
1532615198 maskbit = 5;
1532715199 //if(fontsize > 1) fontsize -= 1;
15328
- if (object.editWindow == null)
15329
- new Exception().printStackTrace();
15330
- else
15331
- object.editWindow.refreshContents(true);
15200
+// if (object.editWindow == null)
15201
+// new Exception().printStackTrace();
15202
+// else
15203
+ object.GetWindow().refreshContents(true);
1533215204 break;
1533315205 case '{':
1533415206 manipCamera.shaper_fovy /= 1.1;
....@@ -15552,7 +15424,7 @@
1555215424 }
1555315425 */
1555415426
15555
- object.editWindow.EditSelection(false);
15427
+ object.GetWindow().EditSelection(false);
1555615428 }
1555715429
1555815430 void SelectParent()
....@@ -15569,10 +15441,10 @@
1556915441 {
1557015442 //selectees.remove(i);
1557115443 System.out.println("select parent of " + elem);
15572
- group.editWindow.Select(elem.parent.GetTreePath(), first, true);
15444
+ group.GetWindow().Select(elem.parent.GetTreePath(), first, true);
1557315445 } else
1557415446 {
15575
- group.editWindow.Select(elem.GetTreePath(), first, true);
15447
+ group.GetWindow().Select(elem.GetTreePath(), first, true);
1557615448 }
1557715449
1557815450 first = false;
....@@ -15614,12 +15486,12 @@
1561415486 for (int j = 0; j < group.children.size(); j++)
1561515487 {
1561615488 elem = (Object3D) group.children.elementAt(j);
15617
- object.editWindow.Select(elem.GetTreePath(), first, true);
15489
+ object.GetWindow().Select(elem.GetTreePath(), first, true);
1561815490 first = false;
1561915491 }
1562015492 } else
1562115493 {
15622
- object.editWindow.Select(elem.GetTreePath(), first, true);
15494
+ object.GetWindow().Select(elem.GetTreePath(), first, true);
1562315495 }
1562415496
1562515497 first = false;
....@@ -15630,21 +15502,21 @@
1563015502 {
1563115503 //Composite group = (Composite) object;
1563215504 Object3D group = object;
15633
- group.editWindow.loadClipboard(true); // ClearSelection(false);
15505
+ group.GetWindow().loadClipboard(true); // ClearSelection(false);
1563415506 }
1563515507
1563615508 void ResetTransform(int mask)
1563715509 {
1563815510 //Composite group = (Composite) object;
1563915511 Object3D group = object;
15640
- group.editWindow.ResetTransform(mask);
15512
+ group.GetWindow().ResetTransform(mask);
1564115513 }
1564215514
1564315515 void FlipTransform()
1564415516 {
1564515517 //Composite group = (Composite) object;
1564615518 Object3D group = object;
15647
- group.editWindow.FlipTransform();
15519
+ group.GetWindow().FlipTransform();
1564815520 // group.editWindow.ReduceMesh(true);
1564915521 }
1565015522
....@@ -15652,7 +15524,7 @@
1565215524 {
1565315525 //Composite group = (Composite) object;
1565415526 Object3D group = object;
15655
- group.editWindow.PrintMemory();
15527
+ group.GetWindow().PrintMemory();
1565615528 // group.editWindow.ReduceMesh(true);
1565715529 }
1565815530
....@@ -15660,7 +15532,7 @@
1566015532 {
1566115533 //Composite group = (Composite) object;
1566215534 Object3D group = object;
15663
- group.editWindow.ResetCentroid();
15535
+ group.GetWindow().ResetCentroid();
1566415536 }
1566515537
1566615538 void IncDepth()
....@@ -16852,7 +16724,7 @@
1685216724 }
1685316725
1685416726 if (!movingcamera && !PAINTMODE)
16855
- object.editWindow.ScreenFitPoint(); // fev 2014
16727
+ object.GetWindow().ScreenFitPoint(); // fev 2014
1685616728
1685716729 if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
1685816730 {
....@@ -16864,17 +16736,17 @@
1686416736
1686516737 group.add(paintobj); // link
1686616738
16867
- object.editWindow.SnapObject(group);
16739
+ object.GetWindow().SnapObject(group);
1686816740
16869
- Object3D folder = object.editWindow.copy;
16741
+ Object3D folder = object.GetWindow().copy;
1687016742
16871
- if (object.editWindow.copy.selection.Size() > 0)
16872
- folder = object.editWindow.copy.selection.elementAt(0);
16743
+ if (object.GetWindow().copy.selection.Size() > 0)
16744
+ folder = object.GetWindow().copy.selection.elementAt(0);
1687316745
1687416746 folder.add(group);
1687516747
16876
- object.editWindow.ResetModel();
16877
- object.editWindow.refreshContents();
16748
+ object.GetWindow().ResetModel();
16749
+ object.GetWindow().refreshContents();
1687816750 }
1687916751 else
1688016752 paintcount = 0;