.. | .. |
---|
83 | 83 | |
---|
84 | 84 | void CloneSelection(boolean supports) |
---|
85 | 85 | { |
---|
86 | | - // Object3D keep = GraphreeD.clipboard; |
---|
| 86 | + // Object3D keep = GrafreeD.clipboard; |
---|
87 | 87 | //Object3D obj; |
---|
88 | 88 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
89 | 89 | { |
---|
.. | .. |
---|
97 | 97 | |
---|
98 | 98 | void CloneClipboard(boolean supports) |
---|
99 | 99 | { |
---|
100 | | - assert(GraphreeD.clipboard.parent == null); |
---|
101 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
102 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
103 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
104 | | - makeSomething(CloneObject(GraphreeD.clipboard.get(0), false)); |
---|
| 100 | + assert(GrafreeD.clipboard.parent == null); |
---|
| 101 | + Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
| 102 | + GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 103 | + if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
| 104 | + makeSomething(CloneObject(GrafreeD.clipboard.get(0), false)); |
---|
105 | 105 | else |
---|
106 | | - makeSomething(CloneObject(GraphreeD.clipboard, false)); |
---|
107 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 106 | + makeSomething(CloneObject(GrafreeD.clipboard, false)); |
---|
| 107 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
108 | 108 | } |
---|
109 | 109 | |
---|
110 | 110 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
118 | 118 | // obj.support = null; |
---|
119 | 119 | if (!supports) |
---|
120 | 120 | obj.SaveSupports(); |
---|
121 | | - Object3D clone = (Object3D)GraphreeD.clone(obj); |
---|
| 121 | + Object3D clone = (Object3D)GrafreeD.clone(obj); |
---|
122 | 122 | obj.parent = parent; |
---|
123 | 123 | // obj.support = support; |
---|
124 | 124 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
219 | 219 | resetsupportItem.addActionListener(this); |
---|
220 | 220 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
221 | 221 | linkverticesItem.addActionListener(this); |
---|
| 222 | + relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
| 223 | + relinkverticesItem.addActionListener(this); |
---|
222 | 224 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
223 | 225 | setMasterItem.addActionListener(this); |
---|
224 | 226 | |
---|
225 | 227 | oe.menuBar.add(menu = new Menu("Group")); |
---|
226 | 228 | grabItem = menu.add(new MenuItem("Grab")); |
---|
227 | 229 | grabItem.addActionListener(this); |
---|
228 | | - frontItem = menu.add(new MenuItem("Front")); |
---|
229 | | - frontItem.addActionListener(this); |
---|
230 | 230 | backItem = menu.add(new MenuItem("Back")); |
---|
231 | 231 | backItem.addActionListener(this); |
---|
| 232 | + frontItem = menu.add(new MenuItem("Front")); |
---|
| 233 | + frontItem.addActionListener(this); |
---|
232 | 234 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
233 | 235 | compositeItem.addActionListener(this); |
---|
| 236 | + hideItem = menu.add(new MenuItem("Hide")); |
---|
| 237 | + hideItem.addActionListener(this); |
---|
| 238 | + ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
| 239 | + ungroupItem.addActionListener(this); |
---|
234 | 240 | menu.add("-"); |
---|
235 | 241 | randomItem = menu.add(new MenuItem("Random")); |
---|
236 | 242 | randomItem.addActionListener(this); |
---|
.. | .. |
---|
252 | 258 | oe.menuBar.add(menu = new Menu("Object")); |
---|
253 | 259 | textureItem = menu.add(new MenuItem("Texture")); |
---|
254 | 260 | textureItem.addActionListener(this); |
---|
| 261 | + billboardItem = menu.add(new MenuItem("Billboard")); |
---|
| 262 | + billboardItem.addActionListener(this); |
---|
255 | 263 | csgItem = menu.add(new MenuItem("CSG")); |
---|
256 | 264 | csgItem.addActionListener(this); |
---|
257 | 265 | shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
.. | .. |
---|
269 | 277 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
270 | 278 | pointflowItem.addActionListener(this); |
---|
271 | 279 | menu.add("-"); |
---|
272 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
273 | | - transformgeometryItem.addActionListener(this); |
---|
274 | 280 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
275 | 281 | resetTransformItem.addActionListener(this); |
---|
276 | 282 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
277 | 283 | resetCentroidItem.addActionListener(this); |
---|
278 | | - ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
279 | | - ungroupItem.addActionListener(this); |
---|
| 284 | + transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
| 285 | + transformgeometryItem.addActionListener(this); |
---|
280 | 286 | |
---|
281 | 287 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
282 | 288 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
285 | 291 | genNormalsORGANItem.addActionListener(this); |
---|
286 | 292 | genNormalsCADItem = menu.add(new MenuItem("CAD Normals")); |
---|
287 | 293 | genNormalsCADItem.addActionListener(this); |
---|
| 294 | + genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
| 295 | + genNormalsMESHItem.addActionListener(this); |
---|
| 296 | + genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 297 | + genNormalsMINEItem.addActionListener(this); |
---|
288 | 298 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
289 | 299 | stripifyItem.addActionListener(this); |
---|
290 | 300 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
380 | 390 | |
---|
381 | 391 | |
---|
382 | 392 | oe.menuBar.add(menu = new Menu("Include")); |
---|
383 | | - importGFDItem = menu.add(new MenuItem("GraphreeD Object...")); |
---|
| 393 | + importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
384 | 394 | importGFDItem.addActionListener(this); |
---|
385 | 395 | importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
386 | 396 | importVRMLX3DItem.addActionListener(this); |
---|
.. | .. |
---|
510 | 520 | |
---|
511 | 521 | oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
512 | 522 | flashSelectionButton.addActionListener(this); |
---|
| 523 | + |
---|
| 524 | + oe.toolbarPanel.add(new cButton(" ", false)); |
---|
| 525 | + |
---|
513 | 526 | oe.aConstraints.gridx += 1; |
---|
514 | 527 | oe.aConstraints.weighty = 0; |
---|
515 | 528 | oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
705 | 718 | dropAttributes |= Object3D.TEXTURE; |
---|
706 | 719 | else |
---|
707 | 720 | dropAttributes &= ~Object3D.TEXTURE; |
---|
708 | | - } |
---|
709 | | - else if(e.getSource() == liveCB) |
---|
| 721 | + } else if(e.getSource() == liveCB) |
---|
710 | 722 | { |
---|
711 | 723 | cameraView.ToggleLive(); |
---|
712 | 724 | } |
---|
.. | .. |
---|
1033 | 1045 | torusItem.addActionListener(this); |
---|
1034 | 1046 | superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1035 | 1047 | superItem.addActionListener(this); |
---|
| 1048 | + kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
| 1049 | + kleinItem.addActionListener(this); |
---|
1036 | 1050 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1037 | 1051 | particleItem.addActionListener(this); |
---|
1038 | 1052 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1441 | 1455 | |
---|
1442 | 1456 | void Overwrite(int mask) |
---|
1443 | 1457 | { |
---|
1444 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1458 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1445 | 1459 | { |
---|
1446 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1460 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
1447 | 1461 | |
---|
1448 | 1462 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1449 | 1463 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1592 | 1606 | if (event.getSource() == superItem) |
---|
1593 | 1607 | { |
---|
1594 | 1608 | makeSomething(new Superellipsoid()); |
---|
| 1609 | + } else |
---|
| 1610 | + if (event.getSource() == kleinItem) |
---|
| 1611 | + { |
---|
| 1612 | + makeSomething(new Klein()); |
---|
1595 | 1613 | } else |
---|
1596 | 1614 | if (event.getSource() == blobItem) |
---|
1597 | 1615 | { |
---|
.. | .. |
---|
1778 | 1796 | if (event.getSource() == invariantsItem) |
---|
1779 | 1797 | { |
---|
1780 | 1798 | System.out.println("Invariants:"); |
---|
1781 | | - GraphreeD.theApplet3D.universe.invariants(); |
---|
| 1799 | + GrafreeD.grafreeD.universe.invariants(); |
---|
1782 | 1800 | } else |
---|
1783 | 1801 | if (event.getSource() == memoryItem) |
---|
1784 | 1802 | { |
---|
.. | .. |
---|
1848 | 1866 | } else |
---|
1849 | 1867 | if (event.getSource() == duplicateItem) |
---|
1850 | 1868 | { |
---|
1851 | | - Object3D keep = GraphreeD.clipboard; |
---|
| 1869 | + Object3D keep = GrafreeD.clipboard; |
---|
1852 | 1870 | loadClipboard(false); |
---|
1853 | 1871 | paste(false); |
---|
1854 | | - GraphreeD.clipboard = keep; |
---|
| 1872 | + GrafreeD.clipboard = keep; |
---|
1855 | 1873 | } else |
---|
1856 | 1874 | if (event.getSource() == cloneItem) |
---|
1857 | 1875 | { |
---|
.. | .. |
---|
1895 | 1913 | } else |
---|
1896 | 1914 | if (event.getSource() == overwriteMatItem) |
---|
1897 | 1915 | { |
---|
| 1916 | + /* july 2015 |
---|
1898 | 1917 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
1899 | | - Overwrite(Object3D.MATERIAL); |
---|
| 1918 | + Overwrite(Object3D.MATERIAL | Object3D.COLOR); |
---|
1900 | 1919 | else |
---|
1901 | 1920 | { |
---|
1902 | 1921 | if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0) |
---|
.. | .. |
---|
1908 | 1927 | Overwrite(Object3D.MATERIAL | Object3D.TEXTURE); |
---|
1909 | 1928 | } |
---|
1910 | 1929 | } |
---|
| 1930 | + */ |
---|
| 1931 | + |
---|
| 1932 | + Overwrite(dropAttributes); |
---|
1911 | 1933 | } |
---|
1912 | 1934 | if (event.getSource() == overwriteGeoItem) |
---|
1913 | 1935 | { |
---|
1914 | 1936 | Overwrite(Object3D.GEOMETRY); |
---|
1915 | | -// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1937 | +// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1916 | 1938 | // { |
---|
1917 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1939 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
1918 | 1940 | // |
---|
1919 | 1941 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1920 | 1942 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1997 | 2019 | if (group.selection.size() == 1) |
---|
1998 | 2020 | one = true; |
---|
1999 | 2021 | |
---|
| 2022 | + Object3D merge = null; |
---|
| 2023 | + |
---|
2000 | 2024 | Object3D content = new cGroup(); |
---|
2001 | 2025 | |
---|
2002 | 2026 | for (int i=0; i<group.selection.size(); i++) |
---|
2003 | 2027 | { |
---|
2004 | | - Object3D sel = new Merge(group.selection.get(i)); |
---|
| 2028 | + merge = new Merge(group.selection.get(i)); |
---|
2005 | 2029 | |
---|
2006 | 2030 | if (one) |
---|
2007 | | - makeSomething(sel, false); |
---|
| 2031 | + makeSomething(merge, false); |
---|
2008 | 2032 | else |
---|
2009 | | - content.addChild(sel); |
---|
| 2033 | + content.addChild(merge); |
---|
2010 | 2034 | } |
---|
2011 | 2035 | |
---|
2012 | 2036 | if (!one) |
---|
2013 | | - makeSomething(content, false); |
---|
2014 | | - |
---|
2015 | | - ResetModel(); |
---|
2016 | | - refreshContents(); |
---|
| 2037 | + makeSomething(content, true); |
---|
| 2038 | + else |
---|
| 2039 | + { |
---|
| 2040 | + ResetModel(); |
---|
| 2041 | + Select(merge.GetTreePath(), true, false); // unselect... false); |
---|
| 2042 | + refreshContents(); |
---|
| 2043 | + } |
---|
2017 | 2044 | } else |
---|
2018 | 2045 | if (event.getSource() == mergeGeometriesItem) |
---|
2019 | 2046 | { |
---|
.. | .. |
---|
2047 | 2074 | } else |
---|
2048 | 2075 | if (event.getSource() == linkverticesItem) |
---|
2049 | 2076 | { |
---|
2050 | | -// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2077 | +// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2051 | 2078 | // { |
---|
2052 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2079 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
2053 | 2080 | // |
---|
2054 | 2081 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2055 | 2082 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2058 | 2085 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2059 | 2086 | // refreshContents(); |
---|
2060 | 2087 | // } |
---|
2061 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2088 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
2062 | 2089 | { |
---|
2063 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2090 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2064 | 2091 | |
---|
2065 | 2092 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2066 | 2093 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2090 | 2117 | |
---|
2091 | 2118 | refreshContents(); |
---|
2092 | 2119 | } else |
---|
| 2120 | + if (event.getSource() == relinkverticesItem) |
---|
| 2121 | + { |
---|
| 2122 | + boolean random = CameraPane.RANDOM; |
---|
| 2123 | + CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2124 | + group.selection.RelinkToSupport(); |
---|
| 2125 | + CameraPane.RANDOM = random; |
---|
| 2126 | + |
---|
| 2127 | + refreshContents(); |
---|
| 2128 | + } else |
---|
2093 | 2129 | if (event.getSource() == resetreferencesItem) |
---|
2094 | 2130 | { |
---|
2095 | 2131 | for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
2101 | 2137 | } else |
---|
2102 | 2138 | if (event.getSource() == setMasterItem) |
---|
2103 | 2139 | { |
---|
2104 | | - if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2140 | + if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2105 | 2141 | { |
---|
2106 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2142 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2107 | 2143 | |
---|
2108 | 2144 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2109 | 2145 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2116 | 2152 | { |
---|
2117 | 2153 | if (group.selection.size() == 1) |
---|
2118 | 2154 | { |
---|
2119 | | - if (GraphreeD.clipboard.size() == 1) |
---|
| 2155 | + if (GrafreeD.clipboard.size() == 1) |
---|
2120 | 2156 | { |
---|
2121 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2157 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2122 | 2158 | |
---|
2123 | 2159 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2124 | 2160 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2158 | 2194 | if (event.getSource() == grabItem) |
---|
2159 | 2195 | { |
---|
2160 | 2196 | group(new cGroup(), true); |
---|
| 2197 | + } else |
---|
| 2198 | + if (event.getSource() == hideItem) |
---|
| 2199 | + { |
---|
| 2200 | + group(new HiddenObject()); |
---|
2161 | 2201 | } else |
---|
2162 | 2202 | if (event.getSource() == frontItem) |
---|
2163 | 2203 | { |
---|
.. | .. |
---|
2281 | 2321 | { |
---|
2282 | 2322 | group(new TextureNode()); |
---|
2283 | 2323 | } else |
---|
| 2324 | + if (event.getSource() == billboardItem) |
---|
| 2325 | + { |
---|
| 2326 | + group(new BillboardNode()); |
---|
| 2327 | + } else |
---|
2284 | 2328 | if (event.getSource() == shadowXItem) |
---|
2285 | 2329 | { |
---|
2286 | 2330 | CastShadow(0); |
---|
.. | .. |
---|
2295 | 2339 | } else |
---|
2296 | 2340 | if (event.getSource() == ungroupItem) |
---|
2297 | 2341 | { |
---|
2298 | | - ungroup(); |
---|
| 2342 | + //ungroup(); |
---|
| 2343 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2344 | + { |
---|
| 2345 | + Ungroup(group.selection.get(i)); |
---|
| 2346 | + } |
---|
| 2347 | + |
---|
| 2348 | + ClearSelection(false); |
---|
| 2349 | + |
---|
| 2350 | + refreshContents(); |
---|
2299 | 2351 | } else |
---|
2300 | 2352 | if (event.getSource() == genUVItem) |
---|
2301 | 2353 | { |
---|
.. | .. |
---|
2305 | 2357 | { |
---|
2306 | 2358 | GenNormals(true); |
---|
2307 | 2359 | } else |
---|
| 2360 | + if (event.getSource() == genNormalsMESHItem) |
---|
| 2361 | + { |
---|
| 2362 | + GenNormals(true); // TODO |
---|
| 2363 | + } else |
---|
2308 | 2364 | if (event.getSource() == genNormalsORGANItem) |
---|
2309 | 2365 | { |
---|
2310 | 2366 | GenNormals(false); |
---|
| 2367 | + } else |
---|
| 2368 | + if (event.getSource() == genNormalsMINEItem) |
---|
| 2369 | + { |
---|
| 2370 | + GenNormalsMINE(); |
---|
2311 | 2371 | } else |
---|
2312 | 2372 | if (event.getSource() == stripifyItem) |
---|
2313 | 2373 | { |
---|
.. | .. |
---|
2580 | 2640 | // bug |
---|
2581 | 2641 | //gridPanel.setDividerLocation(1.0); |
---|
2582 | 2642 | //bigPanel.setDividerLocation(0.0); |
---|
2583 | | - bigThree.remove(jtp); |
---|
2584 | | - bigThree.remove(cameraPanel); |
---|
| 2643 | + bigThree.remove(scenePanel); |
---|
| 2644 | + bigThree.remove(centralPanel); |
---|
2585 | 2645 | bigThree.remove(XYZPanel); |
---|
2586 | 2646 | aWindowConstraints.gridx = 0; |
---|
2587 | 2647 | aWindowConstraints.gridy = 0; |
---|
.. | .. |
---|
2596 | 2656 | // aConstraints.gridheight = 3; |
---|
2597 | 2657 | aWindowConstraints.gridx = 1; |
---|
2598 | 2658 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2599 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2659 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
2600 | 2660 | aWindowConstraints.weightx = 0; |
---|
2601 | 2661 | aWindowConstraints.gridx = 4; |
---|
2602 | 2662 | aWindowConstraints.gridwidth = 1; |
---|
.. | .. |
---|
2608 | 2668 | if (event.getSource() == threeButton) |
---|
2609 | 2669 | { |
---|
2610 | 2670 | radio.layout = threeButton; |
---|
2611 | | - bigThree.remove(jtp); |
---|
2612 | | - bigThree.remove(cameraPanel); |
---|
| 2671 | + bigThree.remove(scenePanel); |
---|
| 2672 | + bigThree.remove(centralPanel); |
---|
2613 | 2673 | bigThree.remove(XYZPanel); |
---|
2614 | 2674 | aWindowConstraints.gridx = 0; |
---|
2615 | 2675 | aWindowConstraints.gridy = 0; |
---|
.. | .. |
---|
2624 | 2684 | // aConstraints.gridheight = 3; |
---|
2625 | 2685 | aWindowConstraints.gridx = 1; |
---|
2626 | 2686 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2627 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2687 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
2628 | 2688 | aWindowConstraints.weightx = 0; |
---|
2629 | 2689 | aWindowConstraints.gridx = 4; |
---|
2630 | 2690 | aWindowConstraints.gridwidth = 1; |
---|
.. | .. |
---|
2636 | 2696 | if (event.getSource() == fourButton) |
---|
2637 | 2697 | { |
---|
2638 | 2698 | radio.layout = fourButton; |
---|
2639 | | - bigThree.remove(jtp); |
---|
2640 | | - bigThree.remove(cameraPanel); |
---|
| 2699 | + bigThree.remove(scenePanel); |
---|
| 2700 | + bigThree.remove(centralPanel); |
---|
2641 | 2701 | bigThree.remove(XYZPanel); |
---|
2642 | 2702 | aWindowConstraints.gridx = 0; |
---|
2643 | 2703 | aWindowConstraints.gridy = 0; |
---|
.. | .. |
---|
2646 | 2706 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2647 | 2707 | aWindowConstraints.weightx = 1; |
---|
2648 | 2708 | aWindowConstraints.weighty = 1; |
---|
2649 | | - bigThree.add(jtp, aWindowConstraints); |
---|
| 2709 | + bigThree.add(scenePanel, aWindowConstraints); |
---|
2650 | 2710 | aWindowConstraints.weightx = 1; |
---|
2651 | 2711 | aWindowConstraints.gridwidth = 3; |
---|
2652 | 2712 | // aConstraints.gridheight = 3; |
---|
.. | .. |
---|
2664 | 2724 | if (event.getSource() == sixButton) |
---|
2665 | 2725 | { |
---|
2666 | 2726 | radio.layout = sixButton; |
---|
2667 | | - bigThree.remove(jtp); |
---|
2668 | | - bigThree.remove(cameraPanel); |
---|
| 2727 | + bigThree.remove(scenePanel); |
---|
| 2728 | + bigThree.remove(centralPanel); |
---|
2669 | 2729 | bigThree.remove(XYZPanel); |
---|
2670 | 2730 | aWindowConstraints.gridx = 0; |
---|
2671 | 2731 | aWindowConstraints.gridy = 0; |
---|
.. | .. |
---|
2674 | 2734 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2675 | 2735 | aWindowConstraints.weightx = 0; |
---|
2676 | 2736 | aWindowConstraints.weighty = 1; |
---|
2677 | | - bigThree.add(jtp, aWindowConstraints); |
---|
| 2737 | + bigThree.add(scenePanel, aWindowConstraints); |
---|
2678 | 2738 | aWindowConstraints.weightx = 1; |
---|
2679 | 2739 | aWindowConstraints.gridwidth = 3; |
---|
2680 | 2740 | // aWindowConstraints.gridheight = 3; |
---|
2681 | 2741 | aWindowConstraints.gridx = 1; |
---|
2682 | 2742 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2683 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2743 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
2684 | 2744 | aWindowConstraints.weightx = 0; |
---|
2685 | 2745 | aWindowConstraints.gridx = 4; |
---|
2686 | 2746 | aWindowConstraints.gridwidth = 1; |
---|
.. | .. |
---|
2692 | 2752 | if (event.getSource() == sevenButton) |
---|
2693 | 2753 | { |
---|
2694 | 2754 | radio.layout = sevenButton; |
---|
2695 | | - bigThree.remove(jtp); |
---|
2696 | | - bigThree.remove(cameraPanel); |
---|
| 2755 | + bigThree.remove(scenePanel); |
---|
| 2756 | + bigThree.remove(centralPanel); |
---|
2697 | 2757 | bigThree.remove(XYZPanel); |
---|
2698 | 2758 | aWindowConstraints.gridx = 0; |
---|
2699 | 2759 | aWindowConstraints.gridy = 0; |
---|
.. | .. |
---|
2702 | 2762 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2703 | 2763 | aWindowConstraints.weightx = 0; |
---|
2704 | 2764 | aWindowConstraints.weighty = 1; |
---|
2705 | | - bigThree.add(jtp, aWindowConstraints); |
---|
| 2765 | + bigThree.add(scenePanel, aWindowConstraints); |
---|
2706 | 2766 | aWindowConstraints.weightx = 1; |
---|
2707 | 2767 | aWindowConstraints.gridwidth = 3; |
---|
2708 | 2768 | // aWindowConstraints.gridheight = 3; |
---|
2709 | 2769 | aWindowConstraints.gridx = 1; |
---|
2710 | 2770 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2711 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2771 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
2712 | 2772 | aWindowConstraints.weightx = 0; |
---|
2713 | 2773 | aWindowConstraints.gridx = 4; |
---|
2714 | 2774 | aWindowConstraints.gridwidth = 1; |
---|
.. | .. |
---|
2806 | 2866 | if (event.getSource() == unselectButton) |
---|
2807 | 2867 | { |
---|
2808 | 2868 | objEditor.jTree.clearSelection(); |
---|
2809 | | - // ?? oct 2012 GraphreeD.clipboard.clear(); |
---|
| 2869 | + // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2810 | 2870 | objEditor.ResetSliders(); |
---|
2811 | 2871 | refreshContents(true); |
---|
2812 | 2872 | } else |
---|
.. | .. |
---|
3121 | 3181 | obj = (Object3D)e.nextElement(); |
---|
3122 | 3182 | |
---|
3123 | 3183 | System.out.println("Object is: " + obj); |
---|
3124 | | - GraphreeD.AnalyzeObject(obj); |
---|
| 3184 | + GrafreeD.AnalyzeObject(obj); |
---|
3125 | 3185 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3126 | | - GraphreeD.AnalyzeObject(obj.bRep); |
---|
| 3186 | + GrafreeD.AnalyzeObject(obj.bRep); |
---|
3127 | 3187 | |
---|
3128 | 3188 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3129 | 3189 | } |
---|
.. | .. |
---|
3165 | 3225 | void GenNormals(boolean crease) |
---|
3166 | 3226 | { |
---|
3167 | 3227 | group.GenNormalsS(crease); |
---|
| 3228 | + |
---|
| 3229 | + refreshContents(); |
---|
| 3230 | + } |
---|
| 3231 | + |
---|
| 3232 | + void GenNormalsMINE() |
---|
| 3233 | + { |
---|
| 3234 | + group.selection.GenNormalsMINE(); |
---|
3168 | 3235 | |
---|
3169 | 3236 | refreshContents(); |
---|
3170 | 3237 | } |
---|
.. | .. |
---|
3250 | 3317 | // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3251 | 3318 | // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3252 | 3319 | // |
---|
3253 | | -// g.add(GraphreeD.clipboard); |
---|
| 3320 | +// g.add(GrafreeD.clipboard); |
---|
3254 | 3321 | // |
---|
3255 | 3322 | // buffer.add(g); |
---|
3256 | 3323 | // } |
---|
.. | .. |
---|
3269 | 3336 | // nodes = new Object3D(); |
---|
3270 | 3337 | // vertices = new Vector<Vertex>(); |
---|
3271 | 3338 | // |
---|
3272 | | -// boolean epsequal = GraphreeD.epsequal; |
---|
3273 | | -// GraphreeD.epsequal = true; |
---|
| 3339 | +// boolean epsequal = GrafreeD.epsequal; |
---|
| 3340 | +// GrafreeD.epsequal = true; |
---|
3274 | 3341 | // |
---|
3275 | 3342 | // for (int i=0; i<group.selection.size(); i++) |
---|
3276 | 3343 | // { |
---|
.. | .. |
---|
3311 | 3378 | // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3312 | 3379 | // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3313 | 3380 | // |
---|
3314 | | -// g.add(GraphreeD.clipboard); |
---|
| 3381 | +// g.add(GrafreeD.clipboard); |
---|
3315 | 3382 | // |
---|
3316 | 3383 | // buffer.add(g); |
---|
3317 | 3384 | // } |
---|
.. | .. |
---|
3319 | 3386 | // makeSomething(buffer, i==group.selection.size()-1); |
---|
3320 | 3387 | // } |
---|
3321 | 3388 | // |
---|
3322 | | -// GraphreeD.epsequal = epsequal; |
---|
| 3389 | +// GrafreeD.epsequal = epsequal; |
---|
3323 | 3390 | // |
---|
3324 | 3391 | // //buffer = null; |
---|
3325 | 3392 | // temprep = null; |
---|
.. | .. |
---|
3330 | 3397 | |
---|
3331 | 3398 | void ParseVertices() |
---|
3332 | 3399 | { |
---|
3333 | | - boolean epsequal = GraphreeD.epsequal; |
---|
3334 | | - GraphreeD.epsequal = true; |
---|
| 3400 | + boolean epsequal = GrafreeD.epsequal; |
---|
| 3401 | + GrafreeD.epsequal = true; |
---|
3335 | 3402 | |
---|
3336 | 3403 | for (int i=0; i<group.selection.size(); i++) |
---|
3337 | 3404 | { |
---|
.. | .. |
---|
3356 | 3423 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3357 | 3424 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3358 | 3425 | |
---|
3359 | | - g.add(GraphreeD.clipboard); |
---|
| 3426 | + g.add(GrafreeD.clipboard); |
---|
3360 | 3427 | |
---|
3361 | 3428 | buffer.add(g); |
---|
3362 | 3429 | } |
---|
.. | .. |
---|
3371 | 3438 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3372 | 3439 | } |
---|
3373 | 3440 | |
---|
3374 | | - GraphreeD.epsequal = epsequal; |
---|
| 3441 | + GrafreeD.epsequal = epsequal; |
---|
3375 | 3442 | |
---|
3376 | 3443 | refreshContents(); |
---|
3377 | 3444 | } |
---|
.. | .. |
---|
3416 | 3483 | scale /= 3; |
---|
3417 | 3484 | |
---|
3418 | 3485 | scale /= 0xFF; |
---|
3419 | | - scale /= 4; |
---|
| 3486 | + // c'est quoi ca? scale /= 4; |
---|
3420 | 3487 | |
---|
3421 | 3488 | //v.AO = scale; |
---|
3422 | 3489 | |
---|
.. | .. |
---|
3437 | 3504 | |
---|
3438 | 3505 | void Align() |
---|
3439 | 3506 | { |
---|
| 3507 | + if (group.selection.size() == 0) |
---|
| 3508 | + return; |
---|
| 3509 | + |
---|
| 3510 | + cVector bbmin = new cVector(); |
---|
| 3511 | + cVector bbmax = new cVector(); |
---|
| 3512 | + |
---|
| 3513 | + group.selection.get(0).getBounds(bbmin, bbmax, true); |
---|
| 3514 | + |
---|
| 3515 | + double dx = bbmax.x - bbmin.x; |
---|
| 3516 | + double dy = bbmax.y - bbmin.y; |
---|
| 3517 | + double dz = bbmax.z - bbmin.z; |
---|
| 3518 | + |
---|
| 3519 | + double scale = Math.sqrt(dx*dx + dy*dy + dz*dz); |
---|
| 3520 | + |
---|
3440 | 3521 | for (int i=0; i<group.selection.size(); i++) |
---|
3441 | 3522 | { |
---|
3442 | 3523 | Object3D obj = group.selection.get(i); |
---|
3443 | 3524 | |
---|
3444 | | - LA.matTranslate(obj.toParent, i/2f, 0, 0); |
---|
3445 | | - LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0); |
---|
| 3525 | + LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
| 3526 | + LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
3446 | 3527 | } |
---|
3447 | 3528 | |
---|
3448 | 3529 | refreshContents(); |
---|
.. | .. |
---|
3455 | 3536 | // ref.SaveSupports(); |
---|
3456 | 3537 | // Object3D par = ref.parent; |
---|
3457 | 3538 | // ref.parent = null; |
---|
3458 | | -// Object3D lowres = (Object3D) GraphreeD.clone(ref); |
---|
| 3539 | +// Object3D lowres = (Object3D) GrafreeD.clone(ref); |
---|
3459 | 3540 | // ref.parent = par; |
---|
3460 | 3541 | // ref.RestoreSupports(); |
---|
3461 | 3542 | |
---|
.. | .. |
---|
3485 | 3566 | // lowres.SaveSupports(); |
---|
3486 | 3567 | // par = lowres.parent; |
---|
3487 | 3568 | // lowres.parent = null; |
---|
3488 | | -// Object3D newlow = (Object3D) GraphreeD.clone(lowres); |
---|
| 3569 | +// Object3D newlow = (Object3D) GrafreeD.clone(lowres); |
---|
3489 | 3570 | Object3D newlow = CloneObject(lowres, false); |
---|
3490 | 3571 | newlow.name = sn.switchobject.get(i).name; |
---|
3491 | 3572 | System.out.println(" pose#" + i + " = " + newlow); |
---|
.. | .. |
---|
3507 | 3588 | return; |
---|
3508 | 3589 | |
---|
3509 | 3590 | Object3D poses = group.selection.get(0); |
---|
3510 | | - Object3D ref = GraphreeD.clipboard.get(0); |
---|
| 3591 | + Object3D ref = GrafreeD.clipboard.get(0); |
---|
3511 | 3592 | |
---|
3512 | 3593 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3513 | 3594 | |
---|
.. | .. |
---|
3701 | 3782 | |
---|
3702 | 3783 | void ClipMesh() |
---|
3703 | 3784 | { |
---|
3704 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 3785 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
3705 | 3786 | { |
---|
3706 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 3787 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
3707 | 3788 | |
---|
3708 | 3789 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3709 | 3790 | content = ((cGroup)content).get(0); |
---|
3710 | 3791 | |
---|
3711 | 3792 | // for (int i=0; i<group.selection.size(); i++) |
---|
3712 | 3793 | // { |
---|
3713 | | -// group.selection.get(i).ClipMesh(GraphreeD.clipboard); |
---|
| 3794 | +// group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3714 | 3795 | // } |
---|
3715 | | - group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3796 | + group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3716 | 3797 | } |
---|
3717 | | -// group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3798 | +// group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3718 | 3799 | System.out.println("DONE."); |
---|
3719 | 3800 | refreshContents(); |
---|
3720 | 3801 | } |
---|
.. | .. |
---|
4052 | 4133 | { |
---|
4053 | 4134 | if (group.selection.isEmpty()) |
---|
4054 | 4135 | return; |
---|
4055 | | - GraphreeD.clipboardIsTempGroup = false; |
---|
| 4136 | + GrafreeD.clipboardIsTempGroup = false; |
---|
4056 | 4137 | Composite tGroup = null; |
---|
4057 | 4138 | if (group.selection.size() > 0) // 1) |
---|
4058 | 4139 | { |
---|
4059 | 4140 | tGroup = new cGroup(); |
---|
4060 | | - GraphreeD.clipboardIsTempGroup = true; |
---|
| 4141 | + GrafreeD.clipboardIsTempGroup = true; |
---|
4061 | 4142 | } |
---|
4062 | 4143 | |
---|
4063 | 4144 | if (cut) |
---|
.. | .. |
---|
4097 | 4178 | //System.out.println("cut " + child); |
---|
4098 | 4179 | //System.out.println("parent = " + child.parent); |
---|
4099 | 4180 | // tmp.addChild(child); |
---|
4100 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4181 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4101 | 4182 | tGroup.add/*Child*/(tmp); |
---|
4102 | 4183 | else |
---|
4103 | | - GraphreeD.clipboard = tmp; |
---|
| 4184 | + GrafreeD.clipboard = tmp; |
---|
4104 | 4185 | } |
---|
4105 | 4186 | else |
---|
4106 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4187 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4107 | 4188 | tGroup.add/*Child*/(child); |
---|
4108 | 4189 | else |
---|
4109 | | - GraphreeD.clipboard = child; |
---|
| 4190 | + GrafreeD.clipboard = child; |
---|
4110 | 4191 | } |
---|
4111 | 4192 | |
---|
4112 | 4193 | //ResetModel(); |
---|
.. | .. |
---|
4138 | 4219 | //System.out.println("cut " + elem); |
---|
4139 | 4220 | //System.out.println("parent = " + elem.parent); |
---|
4140 | 4221 | // tmp.addChild(elem); |
---|
4141 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4222 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4142 | 4223 | tGroup.add/*Child*/(tmp); |
---|
4143 | 4224 | else |
---|
4144 | | - GraphreeD.clipboard = tmp; |
---|
| 4225 | + GrafreeD.clipboard = tmp; |
---|
4145 | 4226 | } |
---|
4146 | 4227 | else |
---|
4147 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4228 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4148 | 4229 | tGroup.add/*Child*/(child); |
---|
4149 | 4230 | else |
---|
4150 | | - GraphreeD.clipboard = child; |
---|
| 4231 | + GrafreeD.clipboard = child; |
---|
4151 | 4232 | } |
---|
4152 | 4233 | |
---|
4153 | 4234 | } |
---|
4154 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
4155 | | - GraphreeD.clipboard = tGroup; |
---|
| 4235 | + if (GrafreeD.clipboardIsTempGroup) |
---|
| 4236 | + GrafreeD.clipboard = tGroup; |
---|
4156 | 4237 | if (cut) |
---|
4157 | 4238 | { |
---|
4158 | 4239 | ResetModel(); |
---|
.. | .. |
---|
4162 | 4243 | |
---|
4163 | 4244 | void paste(boolean expand) |
---|
4164 | 4245 | { |
---|
4165 | | - // if (GraphreeD.clipboard == null) |
---|
| 4246 | + // if (GrafreeD.clipboard == null) |
---|
4166 | 4247 | // return; |
---|
4167 | 4248 | boolean first = true; |
---|
4168 | 4249 | |
---|
4169 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4250 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4170 | 4251 | { |
---|
4171 | 4252 | Composite temp; |
---|
4172 | 4253 | |
---|
.. | .. |
---|
4177 | 4258 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4178 | 4259 | */ |
---|
4179 | 4260 | Object3D elem; |
---|
4180 | | - for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4261 | + for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4181 | 4262 | { |
---|
4182 | 4263 | Object3D child = (Object3D)e.nextElement(); |
---|
4183 | 4264 | |
---|
.. | .. |
---|
4191 | 4272 | else |
---|
4192 | 4273 | elem = child.deepCopy(); // ? |
---|
4193 | 4274 | child.parent = keepparent; |
---|
4194 | | - //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
| 4275 | + //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
4195 | 4276 | // elem = elem.get(0); |
---|
4196 | 4277 | makeSomething(elem, true); // ?? first); |
---|
4197 | 4278 | //group.addChild(elem); |
---|
.. | .. |
---|
4211 | 4292 | //Object3D cb = Applet3D.clipboard; |
---|
4212 | 4293 | //temp.addChild(cb); |
---|
4213 | 4294 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4214 | | - assert(GraphreeD.clipboard.parent == null); |
---|
4215 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
4216 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4217 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
4218 | | - makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy()); |
---|
| 4295 | + assert(GrafreeD.clipboard.parent == null); |
---|
| 4296 | + Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
| 4297 | + GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4298 | + if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
| 4299 | + makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
4219 | 4300 | else |
---|
4220 | | - makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy()); |
---|
4221 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 4301 | + makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
| 4302 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
4222 | 4303 | } |
---|
4223 | 4304 | |
---|
4224 | 4305 | ResetModel(); |
---|
.. | .. |
---|
4227 | 4308 | |
---|
4228 | 4309 | void pasteInto(boolean copyit) |
---|
4229 | 4310 | { |
---|
4230 | | -// if (GraphreeD.clipboard == null) |
---|
| 4311 | +// if (GrafreeD.clipboard == null) |
---|
4231 | 4312 | // return; |
---|
4232 | 4313 | |
---|
4233 | 4314 | if (group.selection.size() != 1) |
---|
.. | .. |
---|
4260 | 4341 | { |
---|
4261 | 4342 | boolean first = true; |
---|
4262 | 4343 | |
---|
4263 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4344 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4264 | 4345 | { |
---|
4265 | | - Composite temp = (Composite)GraphreeD.clipboard; |
---|
| 4346 | + Composite temp = (Composite)GrafreeD.clipboard; |
---|
4266 | 4347 | Object3D copy; |
---|
4267 | 4348 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4268 | 4349 | { |
---|
.. | .. |
---|
4272 | 4353 | } |
---|
4273 | 4354 | } else |
---|
4274 | 4355 | { |
---|
4275 | | - linkSomething(GraphreeD.clipboard); //.get(0)); |
---|
| 4356 | + linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
4276 | 4357 | } |
---|
4277 | 4358 | } |
---|
4278 | 4359 | } |
---|
.. | .. |
---|
4464 | 4545 | makeSomething(csg); |
---|
4465 | 4546 | } |
---|
4466 | 4547 | |
---|
| 4548 | + void Ungroup(Object3D g) |
---|
| 4549 | + { |
---|
| 4550 | + if (g instanceof HiddenObject) |
---|
| 4551 | + { |
---|
| 4552 | + HiddenObject h = (HiddenObject) g; |
---|
| 4553 | + |
---|
| 4554 | + for (int i=0; i<h.ActualSize(); i++) |
---|
| 4555 | + { |
---|
| 4556 | + objEditor.makeSomething(h.get(i), false); |
---|
| 4557 | + } |
---|
| 4558 | + } |
---|
| 4559 | + else |
---|
| 4560 | + { |
---|
| 4561 | + for (int i=0; i<g.Size(); i++) |
---|
| 4562 | + { |
---|
| 4563 | + objEditor.makeSomething(g.get(i), false); |
---|
| 4564 | + } |
---|
| 4565 | + } |
---|
| 4566 | + } |
---|
| 4567 | + |
---|
4467 | 4568 | void ungroup() |
---|
4468 | 4569 | { |
---|
4469 | 4570 | /* |
---|
.. | .. |
---|
4659 | 4760 | |
---|
4660 | 4761 | void ImportGFD() |
---|
4661 | 4762 | { |
---|
4662 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD); |
---|
| 4763 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4663 | 4764 | browser.show(); |
---|
4664 | 4765 | String filename = browser.getFile(); |
---|
4665 | 4766 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4697 | 4798 | |
---|
4698 | 4799 | void ImportVRMLX3D() |
---|
4699 | 4800 | { |
---|
4700 | | - if (GraphreeD.standAlone) |
---|
| 4801 | + if (GrafreeD.standAlone) |
---|
4701 | 4802 | { |
---|
4702 | 4803 | /**/ |
---|
4703 | 4804 | FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
.. | .. |
---|
4714 | 4815 | |
---|
4715 | 4816 | String GetFile(String dialogName) |
---|
4716 | 4817 | { |
---|
4717 | | - if (GraphreeD.standAlone) |
---|
| 4818 | + if (GrafreeD.standAlone) |
---|
4718 | 4819 | { |
---|
4719 | 4820 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4720 | 4821 | browser.show(); |
---|
.. | .. |
---|
4823 | 4924 | private MenuItem resetsupportItem; |
---|
4824 | 4925 | private MenuItem resetreferencesItem; |
---|
4825 | 4926 | private MenuItem linkverticesItem; |
---|
| 4927 | + private MenuItem relinkverticesItem; |
---|
4826 | 4928 | private MenuItem setMasterItem; |
---|
4827 | 4929 | private MenuItem resetMeshItem; |
---|
4828 | 4930 | private MenuItem stepAllItem; |
---|
.. | .. |
---|
4841 | 4943 | private MenuItem clearItem; |
---|
4842 | 4944 | private MenuItem clearAllItem; |
---|
4843 | 4945 | private MenuItem genUVItem; |
---|
| 4946 | + private MenuItem genNormalsMESHItem; |
---|
4844 | 4947 | private MenuItem genNormalsCADItem; |
---|
4845 | 4948 | private MenuItem genNormalsORGANItem; |
---|
| 4949 | + private MenuItem genNormalsMINEItem; |
---|
4846 | 4950 | private MenuItem stripifyItem; |
---|
4847 | 4951 | private MenuItem unstripifyItem; |
---|
4848 | 4952 | private MenuItem trimItem; |
---|
.. | .. |
---|
4884 | 4988 | private MenuItem resetCentroidItem; |
---|
4885 | 4989 | private MenuItem transformgeometryItem; |
---|
4886 | 4990 | private MenuItem resetTransformItem; |
---|
| 4991 | + private MenuItem hideItem; |
---|
4887 | 4992 | private MenuItem grabItem; |
---|
4888 | 4993 | private MenuItem backItem; |
---|
4889 | 4994 | private MenuItem frontItem; |
---|
.. | .. |
---|
4924 | 5029 | private MenuItem coneItem; |
---|
4925 | 5030 | private MenuItem torusItem; |
---|
4926 | 5031 | private MenuItem superItem; |
---|
| 5032 | + private MenuItem kleinItem; |
---|
4927 | 5033 | private MenuItem blobItem; |
---|
4928 | 5034 | private MenuItem latheItem; |
---|
4929 | 5035 | private MenuItem bezierItem; |
---|
.. | .. |
---|
4936 | 5042 | private MenuItem csgItem; |
---|
4937 | 5043 | private MenuItem templateItem; |
---|
4938 | 5044 | private MenuItem textureItem; |
---|
| 5045 | + private MenuItem billboardItem; |
---|
4939 | 5046 | private MenuItem shadowXItem; |
---|
4940 | 5047 | private MenuItem shadowYItem; |
---|
4941 | 5048 | private MenuItem shadowZItem; |
---|