.. | .. |
---|
437 | 437 | oe.aConstraints.gridwidth = 1; |
---|
438 | 438 | oe.aConstraints.gridx = 0; |
---|
439 | 439 | |
---|
440 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints); |
---|
| 440 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints); |
---|
441 | 441 | liveCB.addItemListener(this); |
---|
442 | 442 | |
---|
443 | 443 | oe.aConstraints.gridx += 1; |
---|
.. | .. |
---|
449 | 449 | // localCB.addItemListener(this); |
---|
450 | 450 | |
---|
451 | 451 | oe.aConstraints.gridx += 1; |
---|
452 | | - oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints); |
---|
| 452 | + oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), oe.aConstraints); |
---|
453 | 453 | crowdCB.addItemListener(this); |
---|
454 | 454 | |
---|
455 | 455 | oe.aConstraints.gridx += 1; |
---|
.. | .. |
---|
649 | 649 | |
---|
650 | 650 | void EditObject(Object3D obj) |
---|
651 | 651 | { |
---|
652 | | - cRadio dummyButton = new cRadio(obj.name); |
---|
653 | | - dummyButton.SetObject(obj); |
---|
654 | | - dummyButton.layout = sevenButton; |
---|
655 | | - dummyButton.SetCamera(cameraView.renderCamera, false); |
---|
656 | | - dummyButton.addActionListener(this); |
---|
657 | | - radioPanel.add(dummyButton); |
---|
658 | | - buttonGroup.add(dummyButton); |
---|
659 | | - dummyButton.doClick(); |
---|
| 652 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 653 | + radioButton.SetObject(obj); |
---|
| 654 | + radioButton.layout = sevenButton; |
---|
| 655 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 656 | + radioButton.addActionListener(this); |
---|
| 657 | + radioPanel.add(radioButton); |
---|
| 658 | + buttonGroup.add(radioButton); |
---|
| 659 | + radioButton.doClick(); |
---|
660 | 660 | } |
---|
661 | 661 | void SetupViews(ObjEditor oe) |
---|
662 | 662 | { |
---|
.. | .. |
---|
1120 | 1120 | resetParentItem.addActionListener(this); |
---|
1121 | 1121 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1122 | 1122 | repairParentItem.addActionListener(this); |
---|
| 1123 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1124 | + repairShadowItem.addActionListener(this); |
---|
1123 | 1125 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1124 | 1126 | invariantsItem.addActionListener(this); |
---|
1125 | 1127 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1780 | 1782 | } else |
---|
1781 | 1783 | if (event.getSource() == computeAOItem) |
---|
1782 | 1784 | { |
---|
1783 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1784 | | - CameraPane.theRenderer.repaint(); |
---|
| 1785 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 1786 | + Globals.theRenderer.repaint(); |
---|
1785 | 1787 | } else |
---|
1786 | 1788 | if (event.getSource() == recompileItem) |
---|
1787 | 1789 | { |
---|
.. | .. |
---|
2092 | 2094 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2093 | 2095 | content = ((cGroup)content).get(0); |
---|
2094 | 2096 | |
---|
2095 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2097 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2096 | 2098 | for (int i=0; i<group.selection.size(); i++) |
---|
2097 | 2099 | { |
---|
2098 | 2100 | boolean random = CameraPane.RANDOM; |
---|
.. | .. |
---|
2101 | 2103 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2102 | 2104 | CameraPane.RANDOM = random; |
---|
2103 | 2105 | } |
---|
2104 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2106 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2105 | 2107 | refreshContents(); |
---|
2106 | 2108 | } |
---|
2107 | 2109 | } else |
---|
.. | .. |
---|
2545 | 2547 | |
---|
2546 | 2548 | refreshContents(); |
---|
2547 | 2549 | } else |
---|
| 2550 | + if (event.getSource() == repairShadowItem) |
---|
| 2551 | + { |
---|
| 2552 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2553 | + { |
---|
| 2554 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2555 | + obj.RepairShadow(); |
---|
| 2556 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2557 | +// { |
---|
| 2558 | +// obj.get(i).parent = obj; |
---|
| 2559 | +// } |
---|
| 2560 | + } |
---|
| 2561 | + |
---|
| 2562 | + refreshContents(); |
---|
| 2563 | + } else |
---|
2548 | 2564 | if (event.getSource() == sortbysizeItem) |
---|
2549 | 2565 | { |
---|
2550 | 2566 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2895 | 2911 | } |
---|
2896 | 2912 | |
---|
2897 | 2913 | copy = group; |
---|
2898 | | - //CameraPane.theRenderer.object = group; |
---|
| 2914 | + //Globals.theRenderer.object = group; |
---|
2899 | 2915 | if(!useclient) |
---|
2900 | 2916 | { |
---|
2901 | 2917 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2904 | 2920 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2905 | 2921 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2906 | 2922 | cameraView.object = group; |
---|
2907 | | - cameraView.lighttouched = true; |
---|
| 2923 | + //cameraView.lighttouched = true; |
---|
| 2924 | + Globals.lighttouched = true; |
---|
2908 | 2925 | topView.object = group; |
---|
2909 | 2926 | frontView.object = group; |
---|
2910 | 2927 | sideView.object = group; |
---|
.. | .. |
---|
2940 | 2957 | if (useclient) |
---|
2941 | 2958 | { |
---|
2942 | 2959 | cameraView.object = client; |
---|
2943 | | - cameraView.lighttouched = true; |
---|
| 2960 | + Globals.lighttouched = true; |
---|
2944 | 2961 | //topView.object = client; |
---|
2945 | 2962 | //frontView.object = client; |
---|
2946 | 2963 | //sideView.object = client; |
---|
.. | .. |
---|
2948 | 2965 | else |
---|
2949 | 2966 | { |
---|
2950 | 2967 | cameraView.object = group; |
---|
2951 | | - cameraView.lighttouched = true; |
---|
| 2968 | + Globals.lighttouched = true; |
---|
2952 | 2969 | //topView.object = group; |
---|
2953 | 2970 | //frontView.object = group; |
---|
2954 | 2971 | //sideView.object = group; |
---|
.. | .. |
---|
3456 | 3473 | String pigment = Object3D.GetPigment(tex); |
---|
3457 | 3474 | //String bump = Object3D.GetBump(tex); |
---|
3458 | 3475 | |
---|
3459 | | - com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3476 | + com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
3460 | 3477 | |
---|
3461 | 3478 | double s = v.s; |
---|
3462 | 3479 | |
---|
.. | .. |
---|
3757 | 3774 | group.selection.RelinkToSupport(); // july 2014 |
---|
3758 | 3775 | System.out.println("DONE."); |
---|
3759 | 3776 | refreshContents(); |
---|
3760 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 3777 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3761 | 3778 | } |
---|
3762 | 3779 | |
---|
3763 | 3780 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
4042 | 4059 | |
---|
4043 | 4060 | objEditor.SetText(); // jan 2014 |
---|
4044 | 4061 | |
---|
4045 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4062 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
4046 | 4063 | CameraPane.flash = true; |
---|
4047 | 4064 | |
---|
4048 | 4065 | if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
4049 | 4066 | // a camera |
---|
4050 | 4067 | { |
---|
4051 | 4068 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4052 | | - CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
4053 | | - // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera; |
---|
4054 | | - // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera; |
---|
| 4069 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4070 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4071 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4055 | 4072 | } |
---|
4056 | 4073 | |
---|
4057 | 4074 | refreshContents(); |
---|
.. | .. |
---|
5009 | 5026 | |
---|
5010 | 5027 | private MenuItem resetParentItem; |
---|
5011 | 5028 | private MenuItem repairParentItem; |
---|
| 5029 | + private MenuItem repairShadowItem; |
---|
5012 | 5030 | private MenuItem sortbysizeItem; |
---|
5013 | 5031 | private MenuItem sortbynameItem; |
---|
5014 | 5032 | |
---|