.. | .. |
---|
2065 | 2065 | //System.err.println("Oeil on"); |
---|
2066 | 2066 | OEIL = true; |
---|
2067 | 2067 | if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode) |
---|
2068 | | - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
| 2068 | + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
2069 | 2069 | //pingthread.StepToTarget(true); |
---|
2070 | 2070 | } |
---|
2071 | 2071 | |
---|
.. | .. |
---|
2396 | 2396 | public GL GetGL() // INTERFACE |
---|
2397 | 2397 | { |
---|
2398 | 2398 | 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 | | - |
---|
2521 | 2399 | } |
---|
2522 | 2400 | |
---|
2523 | 2401 | /**/ |
---|
.. | .. |
---|
11649 | 11527 | if ((TRACK || SHADOWTRACK) || zoomonce) |
---|
11650 | 11528 | { |
---|
11651 | 11529 | if ((TRACK || SHADOWTRACK) && trackedobject != null && DrawMode() == SHADOW) // && !lightMode) |
---|
11652 | | - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
| 11530 | + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
11653 | 11531 | pingthread.StepToTarget(true); // true); |
---|
11654 | 11532 | // zoomonce = false; |
---|
11655 | 11533 | } |
---|
.. | .. |
---|
14065 | 13943 | |
---|
14066 | 13944 | // fev 2014??? |
---|
14067 | 13945 | if ((TRACK || SHADOWTRACK) && trackedobject != null) // && DrawMode() == SHADOW) // && !lightMode) |
---|
14068 | | - object.editWindow.ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
| 13946 | + object.GetWindow().ScreenFit(trackedobject, SHADOWTRACK && !TRACK); |
---|
14069 | 13947 | pingthread.StepToTarget(true); // true); |
---|
14070 | 13948 | } |
---|
14071 | 13949 | // if (!LIVE) |
---|
.. | .. |
---|
15295 | 15173 | break; |
---|
15296 | 15174 | case '+': |
---|
15297 | 15175 | |
---|
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 | | - |
---|
15304 | 15176 | /* |
---|
15305 | 15177 | //fontsize += 1; |
---|
15306 | 15178 | bbzoom *= 2; |
---|
.. | .. |
---|
15318 | 15190 | case '=': |
---|
15319 | 15191 | IncDepth(); |
---|
15320 | 15192 | //fontsize += 1; |
---|
15321 | | - object.editWindow.refreshContents(true); |
---|
| 15193 | + object.GetWindow().refreshContents(true); |
---|
15322 | 15194 | maskbit = 6; |
---|
15323 | 15195 | break; |
---|
15324 | 15196 | case '-': //if (PixelThreshold>1) PixelThreshold /= 2; |
---|
15325 | 15197 | DecDepth(); |
---|
15326 | 15198 | maskbit = 5; |
---|
15327 | 15199 | //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); |
---|
15332 | 15204 | break; |
---|
15333 | 15205 | case '{': |
---|
15334 | 15206 | manipCamera.shaper_fovy /= 1.1; |
---|
.. | .. |
---|
15552 | 15424 | } |
---|
15553 | 15425 | */ |
---|
15554 | 15426 | |
---|
15555 | | - object.editWindow.EditSelection(false); |
---|
| 15427 | + object.GetWindow().EditSelection(false); |
---|
15556 | 15428 | } |
---|
15557 | 15429 | |
---|
15558 | 15430 | void SelectParent() |
---|
.. | .. |
---|
15569 | 15441 | { |
---|
15570 | 15442 | //selectees.remove(i); |
---|
15571 | 15443 | 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); |
---|
15573 | 15445 | } else |
---|
15574 | 15446 | { |
---|
15575 | | - group.editWindow.Select(elem.GetTreePath(), first, true); |
---|
| 15447 | + group.GetWindow().Select(elem.GetTreePath(), first, true); |
---|
15576 | 15448 | } |
---|
15577 | 15449 | |
---|
15578 | 15450 | first = false; |
---|
.. | .. |
---|
15614 | 15486 | for (int j = 0; j < group.children.size(); j++) |
---|
15615 | 15487 | { |
---|
15616 | 15488 | elem = (Object3D) group.children.elementAt(j); |
---|
15617 | | - object.editWindow.Select(elem.GetTreePath(), first, true); |
---|
| 15489 | + object.GetWindow().Select(elem.GetTreePath(), first, true); |
---|
15618 | 15490 | first = false; |
---|
15619 | 15491 | } |
---|
15620 | 15492 | } else |
---|
15621 | 15493 | { |
---|
15622 | | - object.editWindow.Select(elem.GetTreePath(), first, true); |
---|
| 15494 | + object.GetWindow().Select(elem.GetTreePath(), first, true); |
---|
15623 | 15495 | } |
---|
15624 | 15496 | |
---|
15625 | 15497 | first = false; |
---|
.. | .. |
---|
15630 | 15502 | { |
---|
15631 | 15503 | //Composite group = (Composite) object; |
---|
15632 | 15504 | Object3D group = object; |
---|
15633 | | - group.editWindow.loadClipboard(true); // ClearSelection(false); |
---|
| 15505 | + group.GetWindow().loadClipboard(true); // ClearSelection(false); |
---|
15634 | 15506 | } |
---|
15635 | 15507 | |
---|
15636 | 15508 | void ResetTransform(int mask) |
---|
15637 | 15509 | { |
---|
15638 | 15510 | //Composite group = (Composite) object; |
---|
15639 | 15511 | Object3D group = object; |
---|
15640 | | - group.editWindow.ResetTransform(mask); |
---|
| 15512 | + group.GetWindow().ResetTransform(mask); |
---|
15641 | 15513 | } |
---|
15642 | 15514 | |
---|
15643 | 15515 | void FlipTransform() |
---|
15644 | 15516 | { |
---|
15645 | 15517 | //Composite group = (Composite) object; |
---|
15646 | 15518 | Object3D group = object; |
---|
15647 | | - group.editWindow.FlipTransform(); |
---|
| 15519 | + group.GetWindow().FlipTransform(); |
---|
15648 | 15520 | // group.editWindow.ReduceMesh(true); |
---|
15649 | 15521 | } |
---|
15650 | 15522 | |
---|
.. | .. |
---|
15652 | 15524 | { |
---|
15653 | 15525 | //Composite group = (Composite) object; |
---|
15654 | 15526 | Object3D group = object; |
---|
15655 | | - group.editWindow.PrintMemory(); |
---|
| 15527 | + group.GetWindow().PrintMemory(); |
---|
15656 | 15528 | // group.editWindow.ReduceMesh(true); |
---|
15657 | 15529 | } |
---|
15658 | 15530 | |
---|
.. | .. |
---|
15660 | 15532 | { |
---|
15661 | 15533 | //Composite group = (Composite) object; |
---|
15662 | 15534 | Object3D group = object; |
---|
15663 | | - group.editWindow.ResetCentroid(); |
---|
| 15535 | + group.GetWindow().ResetCentroid(); |
---|
15664 | 15536 | } |
---|
15665 | 15537 | |
---|
15666 | 15538 | void IncDepth() |
---|
.. | .. |
---|
16852 | 16724 | } |
---|
16853 | 16725 | |
---|
16854 | 16726 | if (!movingcamera && !PAINTMODE) |
---|
16855 | | - object.editWindow.ScreenFitPoint(); // fev 2014 |
---|
| 16727 | + object.GetWindow().ScreenFitPoint(); // fev 2014 |
---|
16856 | 16728 | |
---|
16857 | 16729 | if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
16858 | 16730 | { |
---|
.. | .. |
---|
16864 | 16736 | |
---|
16865 | 16737 | group.add(paintobj); // link |
---|
16866 | 16738 | |
---|
16867 | | - object.editWindow.SnapObject(group); |
---|
| 16739 | + object.GetWindow().SnapObject(group); |
---|
16868 | 16740 | |
---|
16869 | | - Object3D folder = object.editWindow.copy; |
---|
| 16741 | + Object3D folder = object.GetWindow().copy; |
---|
16870 | 16742 | |
---|
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); |
---|
16873 | 16745 | |
---|
16874 | 16746 | folder.add(group); |
---|
16875 | 16747 | |
---|
16876 | | - object.editWindow.ResetModel(); |
---|
16877 | | - object.editWindow.refreshContents(); |
---|
| 16748 | + object.GetWindow().ResetModel(); |
---|
| 16749 | + object.GetWindow().refreshContents(); |
---|
16878 | 16750 | } |
---|
16879 | 16751 | else |
---|
16880 | 16752 | paintcount = 0; |
---|