8 files modified
1 files added
.. | .. |
---|
37 | 37 | bRep.SetVertex(v, i); |
---|
38 | 38 | } |
---|
39 | 39 | |
---|
| 40 | + if (reset) |
---|
| 41 | + { |
---|
| 42 | + this.recalculate(); |
---|
| 43 | + reset = false; |
---|
| 44 | + } |
---|
| 45 | + |
---|
40 | 46 | super.DrawNode(display, root, selected); |
---|
41 | 47 | } |
---|
42 | 48 | |
---|
.. | .. |
---|
388 | 388 | locationBuf.y = location.y * K + locationBuf.y * (1 - K); |
---|
389 | 389 | lookAtBuf.y = lookAt.y * K + lookAtBuf.y * (1 - K); |
---|
390 | 390 | |
---|
| 391 | + int Y = 1; |
---|
| 392 | + |
---|
| 393 | + if (UP.y < 0) |
---|
| 394 | + Y = -1; |
---|
| 395 | + |
---|
391 | 396 | UP.x = 0 * K + UP.x * (1 - K); |
---|
392 | | - UP.y = 1 * K + UP.y * (1 - K); |
---|
| 397 | + UP.y = Y * K + UP.y * (1 - K); |
---|
393 | 398 | UP.z = 0 * K + UP.z * (1 - K); |
---|
394 | 399 | UP.normalize(); |
---|
395 | 400 | |
---|
.. | .. |
---|
15647 | 15647 | { |
---|
15648 | 15648 | // Set the blank cursor to the JFrame. |
---|
15649 | 15649 | //object.editWindow.frame. |
---|
15650 | | - setCursor(blankCursor); |
---|
| 15650 | + if (Globals.ADVANCED) |
---|
| 15651 | + setCursor(blankCursor); // Contaminates other apps! |
---|
15651 | 15652 | |
---|
15652 | 15653 | if (key >= '0' && key <= '5') |
---|
15653 | 15654 | clampbit = (key-'0'); |
---|
.. | .. |
---|
16112 | 16113 | } |
---|
16113 | 16114 | repaint(); |
---|
16114 | 16115 | break; |
---|
| 16116 | + case '.': |
---|
| 16117 | + Globals.ONESTEP = true; |
---|
| 16118 | + repaint(); |
---|
| 16119 | + break; |
---|
16115 | 16120 | case BACKSPACE: |
---|
16116 | 16121 | // almost working enablebackspace = true; |
---|
16117 | 16122 | Globals.WALK ^= true; |
---|
16118 | 16123 | |
---|
16119 | | - object.Step(); |
---|
16120 | | - object.Touch(); |
---|
16121 | 16124 | // SwitchCameras(false); |
---|
16122 | 16125 | repaint(); |
---|
16123 | 16126 | break; |
---|
.. | .. |
---|
543 | 543 | |
---|
544 | 544 | void SoftTouch() |
---|
545 | 545 | { |
---|
546 | | - super.SoftTouch(); |
---|
547 | | - for (int i = 0; i < Children().size(); i++) |
---|
| 546 | + if (blockloop) |
---|
548 | 547 | { |
---|
549 | | - Object3D obj = (Object3D) Children().reserve(i); |
---|
550 | | - |
---|
551 | | - if (obj == null) |
---|
552 | | - continue; |
---|
553 | | - |
---|
554 | | - if (obj.material == null) |
---|
555 | | - { |
---|
556 | | - obj.SoftTouch(); |
---|
557 | | - } |
---|
558 | | - Children().release(i); |
---|
| 548 | + return; |
---|
559 | 549 | } |
---|
| 550 | + |
---|
| 551 | + blockloop = true; |
---|
| 552 | + |
---|
| 553 | + super.SoftTouch(); |
---|
| 554 | + |
---|
| 555 | + for (int i = 0; i < Size(); i++) |
---|
| 556 | + { |
---|
| 557 | + Object3D child = (Object3D) get(i); |
---|
| 558 | + if (child == null) |
---|
| 559 | + continue; |
---|
| 560 | + if (child.material == null) |
---|
| 561 | + { |
---|
| 562 | + child.SoftTouch(); |
---|
| 563 | + } |
---|
| 564 | + } |
---|
| 565 | + |
---|
| 566 | + blockloop = false; |
---|
560 | 567 | } |
---|
561 | 568 | |
---|
562 | 569 | void HardTouch() |
---|
563 | 570 | { |
---|
564 | | - super.HardTouch(); |
---|
565 | | - for (int i = 0; i < Children().size(); i++) |
---|
| 571 | + if (blockloop) |
---|
566 | 572 | { |
---|
567 | | - Object3D child = (Object3D) Children().reserve(i); |
---|
| 573 | + return; |
---|
| 574 | + } |
---|
| 575 | + |
---|
| 576 | + blockloop = true; |
---|
| 577 | + |
---|
| 578 | + super.HardTouch(); |
---|
| 579 | + |
---|
| 580 | + for (int i = 0; i < Size(); i++) |
---|
| 581 | + { |
---|
| 582 | + Object3D child = (Object3D) get(i); |
---|
568 | 583 | if (child == null) |
---|
569 | 584 | continue; |
---|
570 | 585 | child.HardTouch(); |
---|
571 | | - Children().release(i); |
---|
572 | 586 | } |
---|
| 587 | + |
---|
| 588 | + blockloop = false; |
---|
573 | 589 | } |
---|
574 | 590 | |
---|
575 | 591 | // void ClearMaterial() |
---|
.. | .. |
---|
2042 | 2042 | animationItem.addItemListener(this); |
---|
2043 | 2043 | animationItem.setState(Globals.ANIMATION); |
---|
2044 | 2044 | |
---|
| 2045 | + if (Globals.ADVANCED) |
---|
| 2046 | + { |
---|
2045 | 2047 | menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
2046 | 2048 | archiveItem.addActionListener(this); |
---|
| 2049 | + } |
---|
2047 | 2050 | |
---|
2048 | 2051 | menu.add("-"); |
---|
2049 | 2052 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
.. | .. |
---|
5064 | 5064 | |
---|
5065 | 5065 | ResetModel(); |
---|
5066 | 5066 | objEditor.copy.HardTouch(); // recompile? |
---|
| 5067 | + Globals.lighttouched = true; |
---|
5067 | 5068 | |
---|
5068 | 5069 | cRadio ab; |
---|
5069 | 5070 | for (java.util.Enumeration e = objEditor.buttonGroup.getElements(); e.hasMoreElements();) |
---|
.. | .. |
---|
5711 | 5711 | { |
---|
5712 | 5712 | } |
---|
5713 | 5713 | // transient int displaylist = 0; // -1; |
---|
5714 | | - transient boolean touched = true; |
---|
5715 | | - transient boolean softtouched = true; |
---|
| 5714 | + transient boolean reset = false; // Recalculate |
---|
| 5715 | + transient boolean touched = true; // call list only |
---|
| 5716 | + transient boolean softtouched = true; // aucune idee |
---|
5716 | 5717 | |
---|
5717 | 5718 | void Touch() |
---|
5718 | 5719 | { |
---|
.. | .. |
---|
5765 | 5766 | { |
---|
5766 | 5767 | //System.out.println("HardTouch " + this); // new Exception().printStackTrace(); |
---|
5767 | 5768 | //new Exception().printStackTrace(); |
---|
| 5769 | + reset = true; |
---|
5768 | 5770 | touched = true; |
---|
5769 | 5771 | CameraPane.touched = true; |
---|
5770 | 5772 | //if (parent != null) |
---|
.. | .. |
---|
6624 | 6626 | } |
---|
6625 | 6627 | } |
---|
6626 | 6628 | |
---|
6627 | | - assert (!(this instanceof Composite)); |
---|
| 6629 | + // Bezier surface: assert (!(this instanceof Composite)); |
---|
6628 | 6630 | { |
---|
6629 | 6631 | // CRASH MOCAP!! for (int i = 0; i < size(); i++) |
---|
6630 | 6632 | // { |
---|
.. | .. |
---|
6905 | 6907 | |
---|
6906 | 6908 | if (display.DrawMode() == iCameraPane.SELECTION && dontselect) |
---|
6907 | 6909 | return; |
---|
6908 | | - |
---|
6909 | | - if (hide) |
---|
6910 | | - return; |
---|
6911 | 6910 | } |
---|
6912 | 6911 | |
---|
| 6912 | + if (hide) |
---|
| 6913 | + return; |
---|
| 6914 | + |
---|
6913 | 6915 | if (scriptnode != null) |
---|
6914 | 6916 | { |
---|
6915 | 6917 | scriptnode.DrawNode(display, root, selected); |
---|
.. | .. |
---|
52 | 52 | northPanel = new cGridBag(); |
---|
53 | 53 | |
---|
54 | 54 | northPanel.add(northLabel = new JLabel("XY factor")); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
55 | | - northPanel.add(northField = new cNumberSlider(this, 0.0001,20, -1)); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 55 | + northPanel.add(northField = new cNumberSlider(this, 0.0001,3, 1.1)); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
56 | 56 | oe.ctrlPanel.add(northPanel); |
---|
57 | 57 | |
---|
58 | 58 | oe.ctrlPanel.Return(); |
---|
59 | 59 | eastPanel = new cGridBag(); |
---|
60 | 60 | eastPanel.add(eastLabel = new JLabel("Z factor")); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
61 | | - eastPanel.add(eastField = new cNumberSlider(this, 0.0001,20, -1)); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 61 | + eastPanel.add(eastField = new cNumberSlider(this, 0.0001,3, 1.1)); //, ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
62 | 62 | oe.ctrlPanel.add(eastPanel); |
---|
63 | 63 | |
---|
64 | 64 | oe.ctrlPanel.Return(); |
---|
.. | .. |
---|
171 | 171 | public void applySelf() |
---|
172 | 172 | { |
---|
173 | 173 | super.applySelf(); |
---|
174 | | - superE.north = northField.getFloat(); |
---|
175 | | - superE.east = eastField.getFloat(); |
---|
| 174 | + superE.north = northField.getFloat() * 2; |
---|
| 175 | + superE.east = eastField.getFloat() * 2; |
---|
176 | 176 | superE.recalculate(); |
---|
177 | 177 | } |
---|
178 | 178 | |
---|