| Biparam.java | ●●●●● patch | view | raw | blame | history | |
| CameraPane.java | ●●●●● patch | view | raw | blame | history | |
| Cone.java | ●●●●● patch | view | raw | blame | history | |
| Globals.java | ●●●●● patch | view | raw | blame | history | |
| Grid.java | ●●●●● patch | view | raw | blame | history | |
| GroupEditor.java | ●●●●● patch | view | raw | blame | history | |
| ObjEditor.java | ●●●●● patch | view | raw | blame | history | |
| Object3D.java | ●●●●● patch | view | raw | blame | history | |
| Sphere.java | ●●●●● patch | view | raw | blame | history | |
| Superellipsoid.java | ●●●●● patch | view | raw | blame | history | |
| SwitchNode.java | ●●●●● patch | view | raw | blame | history | |
| Torus.java | ●●●●● patch | view | raw | blame | history | |
| cMesh.java | ●●●●● patch | view | raw | blame | history | |
| icons/collapse.png | patch | view | raw | blame | history | |
| icons/shadericons/shadow.png | patch | view | raw | blame | history | 
Biparam.java
.. .. @@ -98,6 +98,11 @@ 98 98 // recalculate(); 99 99 } 100 100 101  + double uStretch()102  + {103  + return 1;104  + }105  +101 106 void recalculate() 102 107 { 103 108 //System.out.println("BREP TRIMMED? 3 " + bRep.trimmed); .. .. @@ -115,7 +120,7 @@ 115 120 int p = iu * (vDivs + 1) + iv; 116 121 if (touched) 117 122 { 118  - vert.s = u;123  + vert.s = u * uStretch();119 124 vert.t = v; 120 125 } 121 126 else CameraPane.java
.. .. @@ -16667,6 +16667,7 @@ 16667 16667 private void DrawSkyBox(GL gl, float ratio) 16668 16668 { 16669 16669 if (//envyoff || 16670  + WIREFRAME ||16670 16671 cubemap == null) 16671 16672 { 16672 16673 gl.glClearColor(BGcolor, BGcolor, BGcolor, 1); Cone.java
.. .. @@ -193,6 +193,11 @@ 193 193 return inside; 194 194 } 195 195 196  + double uStretch()197  + {198  + return 6; // Actually 6.28 (I think)199  + }200  +196 201 Vertex biparamFunction(double u, double v) 197 202 { 198 203 cVector tPos; Globals.java
.. .. @@ -8,6 +8,8 @@ 8 8 9 9 private static boolean LIVE = false; 10 10 11  + // Option to set saturation to 1 when choosing a color first12  + public static boolean AUTOSATURATE = true;11 13 public static boolean MINSHADER = false; 12 14 public static boolean COMPUTESHADOWWHENLIVE = true; 13 15 public static boolean RENDERSHADOW = true; Grid.java
.. .. @@ -62,6 +62,11 @@ 62 62 */ 63 63 } 64 64 65  + double uStretch()66  + {67  + return 1;68  + }69  +65 70 Vertex biparamFunction(double u, double v) 66 71 { 67 72 Vertex temp = new Vertex((2*v-1)*radius*4, 0 /*-radius,*/, (2*u-1)*radius*4); GroupEditor.java
.. .. @@ -359,6 +359,16 @@ 359 359 refreshContents(); 360 360 } 361 361 362  + public void Show3DView()363  + {364  + // bug365  + //gridPanel.setDividerLocation(1.0);366  + //bigPanel.setDividerLocation(0.0);367  + bigThree.ClearUI();368  + bigThree.add(centralPanel);369  + bigThree.FlushUI();370  + }371  +362 372 //ObjEditor objEditor; 363 373 public void closeUI2() 364 374 { .. .. @@ -984,11 +994,6 @@ 984 994 //new Exception().printStackTrace(); 985 995 986 996 oe.radioPanel = new JPanel(new GridBagLayout()); 987  - oe.aConstraints.weightx = 1;988  - oe.aConstraints.weighty = 0;989  - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;990  - oe.aConstraints.gridwidth = 100;991  - oe.aConstraints.gridheight = 1;992 997 // oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); 993 998 994 999 oe.buttonGroup = new ButtonGroup(); .. .. @@ -1025,6 +1030,45 @@ 1025 1030 maxButton.setToolTipText("Maximize window"); 1026 1031 maxButton.addActionListener(this); 1027 1032 } 1033  +1034  + cButton gcButton;1035  +1036  + oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1037  + gcButton.setToolTipText("Garbage collect");1038  + gcButton.addActionListener(new ActionListener()1039  + {1040  + public void actionPerformed(ActionEvent e)1041  + {1042  + System.gc();1043  + }1044  + });1045  +1046  + oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1047  + collapseButton.setToolTipText("Collapse toolbar");1048  + collapseButton.addActionListener(this);1049  +1050  + oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1051  + maximize3DButton.setToolTipText("Maximize 3D view");1052  + maximize3DButton.addActionListener(this);1053  +1054  + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1055  + twoButton.setToolTipText("Show 3D view only");1056  + twoButton.addActionListener(this);1057  + this.fullscreenLayout = twoButton;1058  +1059  + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1060  + threeButton.setToolTipText("Show controls and 3D view");1061  + threeButton.addActionListener(this);1062  + if (Globals.ADVANCED)1063  + {1064  + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1065  + sixButton.setToolTipText("Show 3D view and controls");1066  + sixButton.addActionListener(this);1067  + }1068  +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1069  +// sevenButton.setToolTipText("3-column layout");1070  +// sevenButton.addActionListener(this);1071  + //1028 1072 1029 1073 oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); 1030 1074 fullButton.setToolTipText("Full-screen window"); .. .. @@ -1069,14 +1113,14 @@ 1069 1113 nextVersionButton.addActionListener(this); 1070 1114 nextVersionButton.setEnabled(false); 1071 1115 1072  - oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);1073  - liveCB.setToolTipText("Enable animation");1074  - liveCB.addItemListener(this);1075  -1076 1116 oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); 1077 1117 oneStepButton.setToolTipText("Animate one step forward"); 1078 1118 oneStepButton.addActionListener(this); 1079 1119 1120  + oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);1121  + liveCB.setToolTipText("Enable animation");1122  + liveCB.addItemListener(this);1123  +1080 1124 oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); 1081 1125 fastCB.setToolTipText("Fast mode"); 1082 1126 fastCB.addItemListener(this); .. .. @@ -1103,21 +1147,6 @@ 1103 1147 1104 1148 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); 1105 1149 1106  - oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1107  - twoButton.setToolTipText("Show 3D view only");1108  - twoButton.addActionListener(this);1109  - this.fullscreenLayout = twoButton;1110  -1111  - oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1112  - threeButton.setToolTipText("Show controls and 3D view");1113  - threeButton.addActionListener(this);1114  - oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1115  - sixButton.setToolTipText("Show 3D view and controls");1116  - sixButton.addActionListener(this);1117  -// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);1118  -// sevenButton.setToolTipText("3-column layout");1119  -// sevenButton.addActionListener(this);1120  - //1121 1150 1122 1151 oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); 1123 1152 rootButton.setToolTipText("Open selection in new tab"); .. .. @@ -1815,7 +1844,12 @@ 1815 1844 TreePath path; 1816 1845 1817 1846 public TransferableTreePath(TreePath tp) { 1818  - path = tp;1847  + Object[] objs = new Object[tp.getPathCount()];1848  + for (int i=0; i<objs.length; i++)1849  + {1850  + objs[i] = ((Object3D)tp.getPathComponent(i)).GetUUID();1851  + }1852  + path = new TreePath(objs);1819 1853 } 1820 1854 1821 1855 public synchronized DataFlavor[] getTransferDataFlavors() { .. .. @@ -2708,6 +2742,18 @@ 2708 2742 if (source == fullButton) 2709 2743 { 2710 2744 ToggleFullScreen(); 2745  + } else2746  + if (source == collapseButton)2747  + {2748  + this.expandedLayout = radio.layout;2749  + CollapseToolbar();2750  + } else2751  + if (source == maximize3DButton)2752  + {2753  + this.expandedLayout = radio.layout;2754  + radio.layout = twoButton;2755  + Show3DView();2756  + CollapseToolbar();2711 2757 } else 2712 2758 if (source == previousVersionButton) 2713 2759 { .. .. @@ -3660,38 +3706,7 @@ 3660 3706 if (CameraPane.FULLSCREEN) 3661 3707 fullscreenLayout = radio.layout; 3662 3708 3663  - // bug3664  - //gridPanel.setDividerLocation(1.0);3665  - //bigPanel.setDividerLocation(0.0);3666  -// bigThree.remove(scenePanel);3667  -// bigThree.remove(centralPanel);3668  -// bigThree.remove(XYZPanel);3669  -// aWindowConstraints.gridx = 0;3670  -// aWindowConstraints.gridy = 0;3671  -// aWindowConstraints.gridwidth = 1;3672  -// // aConstraints.gridheight = 3;3673  -// aWindowConstraints.fill = GridBagConstraints.VERTICAL;3674  -// aWindowConstraints.weightx = 0;3675  -// aWindowConstraints.weighty = 1;3676  -// //bigThree.add(jtp, aWindowConstraints);3677  -// aWindowConstraints.weightx = 1;3678  -// aWindowConstraints.gridwidth = 3;3679  -// // aConstraints.gridheight = 3;3680  -// aWindowConstraints.gridx = 1;3681  -// aWindowConstraints.fill = GridBagConstraints.BOTH;3682  -// bigThree.add(centralPanel, aWindowConstraints);3683  -// aWindowConstraints.weightx = 0;3684  -// aWindowConstraints.gridx = 4;3685  -// aWindowConstraints.gridwidth = 1;3686  -// // aConstraints.gridheight = 3;3687  -// aWindowConstraints.fill = GridBagConstraints.VERTICAL;3688  -// //bigThree.add(XYZPanel, aWindowConstraints);3689  -// scenePanel.setVisible(false);3690  -// centralPanel.setVisible(true);3691  -// XYZPanel.setVisible(false);3692  - bigThree.ClearUI();3693  - bigThree.add(centralPanel);3694  - bigThree.FlushUI();3709  + Show3DView();3695 3710 3696 3711 cameraView.requestFocusInWindow(); 3697 3712 .. .. @@ -5290,7 +5305,7 @@ 5290 5305 Object3D child = (Object3D) group.selection.get(i); 5291 5306 5292 5307 objEditor.AddInfo(child, this, true); 5293  - System.err.println("info : " + child.GetPath());5308  +// System.err.println("info : " + child.GetPath());5294 5309 } 5295 5310 5296 5311 objEditor.SetText(); // jan 2014 ObjEditor.java
.. .. @@ -754,6 +754,7 @@ 754 754 boolean maximized; 755 755 756 756 cButton fullscreenLayout; 757  + cButton expandedLayout;757 758 758 759 void Minimize() 759 760 { .. .. @@ -793,10 +794,12 @@ 793 794 cButton minButton; 794 795 cButton maxButton; 795 796 cButton fullButton; 797  + cButton collapseButton;798  + cButton maximize3DButton;796 799 797 800 void ToggleFullScreen() 798 801 { 799  -GraphicsDevice device = frame.getGraphicsConfiguration().getDevice();802  + GraphicsDevice device = frame.getGraphicsConfiguration().getDevice();800 803 801 804 cameraView.ToggleFullScreen(); 802 805 .. .. @@ -817,13 +820,13 @@ 817 820 // X frame.getContentPane().remove(/*"Center",*/bigThree); 818 821 // X framePanel.add(bigThree); 819 822 // X frame.getContentPane().add(/*"Center",*/framePanel); 820  - framePanel.setDividerLocation(46);823  +// framePanel.setDividerLocation(46); // icons are 24x24821 824 822 825 //frame.setVisible(true); 823  - radio.layout = keepButton;826  +// radio.layout = keepButton;824 827 //theFrame = null; 825 828 keepButton = null; 826  - radio.layout.doClick();829  +// radio.layout.doClick();827 830 828 831 } else 829 832 { .. .. @@ -844,10 +847,10 @@ 844 847 // X frame.getContentPane().remove(/*"Center",*/framePanel); 845 848 // X framePanel.remove(bigThree); 846 849 // X frame.getContentPane().add(/*"Center",*/bigThree); 847  - framePanel.setDividerLocation(0);850  +// framePanel.setDividerLocation(0);848 851 849  - radio.layout = fullscreenLayout;850  - radio.layout.doClick();852  +// radio.layout = fullscreenLayout;853  +// radio.layout.doClick();851 854 //frame.setVisible(true); 852 855 } 853 856 frame.validate(); .. .. @@ -855,23 +858,31 @@ 855 858 cameraView.requestFocusInWindow(); 856 859 } 857 860 858  - private Object3D CompressCopy()861  + void CollapseToolbar()862  + {863  + framePanel.setDividerLocation(0);864  + //frame.validate();865  +866  + cameraView.requestFocusInWindow();867  + }868  +869  + private Object3D Duplicate(Object3D object)859 870 { 860 871 boolean temp = CameraPane.SWITCH; 861 872 CameraPane.SWITCH = false; 862 873 863  - copy.ExtractBigData(versiontable);874  + object.ExtractBigData(versiontable);864 875 // if (copy == client) 865 876 866  - Object3D versions[] = copy.versionlist;867  - copy.versionlist = null;877  + Object3D versions[] = object.versionlist;878  + object.versionlist = null;868 879 869 880 //byte[] compress = Compress(copy); 870  - Object3D compress = (Object3D)Grafreed.clone(copy);881  + Object3D compress = (Object3D)Grafreed.clone(object);871 882 872  - copy.versionlist = versions;883  + object.versionlist = versions;873 884 874  - copy.RestoreBigData(versiontable);885  + object.RestoreBigData(versiontable);875 886 876 887 CameraPane.SWITCH = temp; 877 888 .. .. @@ -1702,6 +1713,23 @@ 1702 1713 // aConstraints.gridheight = 1; 1703 1714 1704 1715 framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree); 1716  +1717  + framePanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY,1718  + new java.beans.PropertyChangeListener()1719  + {1720  + public void propertyChange(java.beans.PropertyChangeEvent pce)1721  + {1722  + if ((Integer)pce.getOldValue() == 1)1723  + {1724  + if (radio.layout != expandedLayout)1725  + {1726  + radio.layout = expandedLayout;1727  + radio.layout.doClick();1728  + }1729  + }1730  + }1731  + });1732  +1705 1733 framePanel.setContinuousLayout(false); 1706 1734 framePanel.setOneTouchExpandable(false); 1707 1735 //.setDividerLocation(0.8); .. .. @@ -2120,6 +2148,25 @@ 2120 2148 } 2121 2149 }); 2122 2150 presetpanel.add(candle); 2151  +2152  + cLabel shadowShader = GetLabel("icons/shadericons/shadow.png", !Grafreed.NIMBUSLAF);2153  + shadowShader.setToolTipText("Shadow");2154  + shadowShader.addMouseListener(new MouseAdapter()2155  + {2156  + public void mouseClicked(MouseEvent e)2157  + {2158  + diffuseField.setFloat(0.001);2159  + ambientField.setFloat(0.001);2160  + cameraField.setFloat(0.001);2161  + specularField.setFloat(0.001);2162  + fakedepthField.setFloat(0.001);2163  + opacityField.setFloat(0.6);2164  +2165  + materialtouched = true;2166  + applySelf();2167  + }2168  + });2169  + presetpanel.add(shadowShader);2123 2170 2124 2171 cGridBag panel = new cGridBag().setVertical(true); 2125 2172 .. .. @@ -4112,11 +4159,11 @@ 4112 4159 public boolean Save(boolean user) 4113 4160 { 4114 4161 System.err.println("Save"); 4115  - //Replace();4162  + Replace();4116 4163 4117 4164 cRadio tab = GetCurrentTab(); 4118 4165 4119  - Object3D compress = CompressCopy(); // Saved version. No need for "Replace"?4166  + Object3D compress = Duplicate(copy); // Saved version. No need for "Replace"?4120 4167 4121 4168 boolean thesame = false; 4122 4169 .. .. @@ -4210,7 +4257,7 @@ 4210 4257 4211 4258 void CopyChanged() 4212 4259 { 4213  - Object3D obj = copy.versionlist[copy.versionindex];4260  + Object3D obj = (Object3D)Grafreed.clone(copy.versionlist[copy.versionindex]);4214 4261 4215 4262 SetUndoStates(); 4216 4263 .. .. @@ -4363,7 +4410,7 @@ 4363 4410 return false; 4364 4411 } 4365 4412 4366  - copy.versionlist[copy.versionindex] = CompressCopy();4413  + copy.versionlist[copy.versionindex] = Duplicate(copy);4367 4414 4368 4415 return true; 4369 4416 } .. .. @@ -4738,7 +4785,7 @@ 4738 4785 //System.out.println("stateChanged = " + this); 4739 4786 materialtouched = true; 4740 4787 4741  - if (e.getSource() == colorField && saturationField.getFloat() == 0.001)4788  + if (Globals.AUTOSATURATE && e.getSource() == colorField && saturationField.getFloat() == 0.001)4742 4789 { 4743 4790 saturationField.setFloat(1); 4744 4791 } .. .. @@ -5882,6 +5929,7 @@ 5882 5929 cNumberSlider anisoField; 5883 5930 JLabel anisoVLabel; 5884 5931 cNumberSlider anisoVField; 5932  +5885 5933 JLabel cameraLabel; 5886 5934 cNumberSlider cameraField; 5887 5935 JLabel selfshadowLabel; .. .. @@ -5896,6 +5944,7 @@ 5896 5944 cNumberSlider fakedepthField; 5897 5945 JLabel shadowbiasLabel; 5898 5946 cNumberSlider shadowbiasField; 5947  +5899 5948 JLabel bumpLabel; 5900 5949 cNumberSlider bumpField; 5901 5950 JLabel noiseLabel; Object3D.java
.. .. @@ -2468,7 +2468,11 @@ 2468 2468 else 2469 2469 { 2470 2470 //((ObjEditor)editWindow).SetupUI2(null); 2471  - ((ObjEditor)objectUI).pinButton.setSelected(pinned);2471  + if (objectUI != null)2472  + ((ObjEditor)objectUI).pinButton.setSelected(pinned);2473  + else2474  + //new Exception().printStackTrace();2475  + System.err.println("objectUI is null");2472 2476 } 2473 2477 } 2474 2478  Sphere.java
.. .. @@ -49,7 +49,7 @@ 49 49 minUDivs = 3; 50 50 minVDivs = 2; 51 51 //center = new cVector(); 52  - radius = 1;52  + radius = 0.5;53 53 if (recalc) 54 54 { 55 55 retile(); .. .. @@ -121,6 +121,11 @@ 121 121 buffer.append("}\n"); 122 122 } 123 123 124  + double uStretch()125  + {126  + return 2;127  + }128  +124 129 Vertex biparamFunction(double u, double v) 125 130 { 126 131 double uAng = LA.toRadians(u * 360); .. .. @@ -137,6 +142,8 @@ 137 142 LA.vecCopy(temp.norm, temp/*.pos*/); 138 143 LA.vecNormalize(temp.norm); 139 144 145  + temp.y += radius;146  +140 147 return temp; 141 148 } 142 149  Superellipsoid.java
.. .. @@ -1,6 +1,7 @@ 1 1 class Superellipsoid extends Biparam /*Sphere*/ implements java.io.Serializable 2 2 { 3  -3  + static final long serialVersionUID = -251688182693574378L;4  +4 5 Superellipsoid() 5 6 { 6 7 super(); // false); .. .. @@ -147,6 +148,11 @@ 147 148 cVector du; // = new cVector(); 148 149 cVector dv; // = new cVector(); 149 150 151  + double uStretch()152  + {153  + return 2;154  + }155  +150 156 Vertex biparamFunction(double u, double v) 151 157 { 152 158 //System.out.println("U = " + u + "; V = " + v); .. .. @@ -177,7 +183,7 @@ 177 183 double sv = signPower(msv, east); 178 184 double z = radius * cv * cu; 179 185 double x = radius * cv * su; 180  - double y = radius * sv;186  + double y = radius * sv + radius;181 187 182 188 double dcu = DsignPower(mcu, north) * -msu; 183 189 double dsu = DsignPower(msu, north) * mcu; .. .. @@ -315,6 +321,6 @@ 315 321 316 322 double east; 317 323 double north; 318  - double radius = 1;324  + double radius = 0.5;319 325 private cVector inPnt; 320 326 } SwitchNode.java
.. .. @@ -97,7 +97,8 @@ 97 97 98 98 if (bRep == null) 99 99 { 100  - bRep = (BoundaryRep) Grafreed.clone(switchobject.get(0).bRep);100  + // The switch mesh will be used to interpolate poaes (maybe).101  + bRep = (BoundaryRep)Grafreed.clone(switchobject.get(0).bRep);101 102 } 102 103 103 104 if (CameraPane.SUPPORT && display.DrawMode() == display.SHADOW) Torus.java
.. .. @@ -56,6 +56,11 @@ 56 56 buffer.append("}\n"); 57 57 } 58 58 59  + double uStretch()60  + {61  + return 6; // Actually 6.28 (I think)62  + }63  +59 64 Vertex biparamFunction(double u, double v) 60 65 { 61 66 if (u == 1) .. .. @@ -87,6 +92,9 @@ 87 92 //temp.pos = tPos; // useless new 88 93 temp.norm = tNorm; 89 94 LA.vecNormalize(temp.norm); 95  +96  + temp.y += minor;97  +90 98 return temp; 91 99 } 92 100  cMesh.java
.. .. @@ -49,7 +49,7 @@ 49 49 50 50 cMesh(Object3D bRep) 51 51 { 52  - this("Me:" + bRep.name, bRep);52  + this("Mesh:" + bRep.name, bRep);53 53 } 54 54 55 55 cMesh(String name, Object3D bRep) icons/collapse.pngBinary files differ
icons/shadericons/shadow.pngBinary files differ