.. | .. |
---|
98 | 98 | |
---|
99 | 99 | void CloneClipboard(boolean supports) |
---|
100 | 100 | { |
---|
101 | | - assert(GrafreeD.clipboard.parent == null); |
---|
102 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
103 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
104 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
105 | | - makeSomething(CloneObject(GrafreeD.clipboard.get(0), false)); |
---|
| 101 | + assert(Grafreed.clipboard.parent == null); |
---|
| 102 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 103 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 104 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 105 | + makeSomething(CloneObject(Grafreed.clipboard.get(0), false)); |
---|
106 | 106 | else |
---|
107 | | - makeSomething(CloneObject(GrafreeD.clipboard, false)); |
---|
108 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 107 | + makeSomething(CloneObject(Grafreed.clipboard, false)); |
---|
| 108 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
109 | 109 | } |
---|
110 | 110 | |
---|
111 | 111 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
119 | 119 | // obj.support = null; |
---|
120 | 120 | if (!supports) |
---|
121 | 121 | obj.SaveSupports(); |
---|
122 | | - Object3D clone = (Object3D)GrafreeD.clone(obj); |
---|
| 122 | + Object3D clone = (Object3D)Grafreed.clone(obj); |
---|
123 | 123 | obj.parent = parent; |
---|
124 | 124 | // obj.support = support; |
---|
125 | 125 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
171 | 171 | //editItem.addActionListener(this); |
---|
172 | 172 | duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
173 | 173 | duplicateItem.addActionListener(this); |
---|
| 174 | + cloneItem = menu.add(new MenuItem("Clone")); |
---|
| 175 | + cloneItem.addActionListener(this); |
---|
| 176 | + if (Globals.ADVANCED) |
---|
| 177 | + { |
---|
| 178 | + cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
| 179 | + cloneSupportItem.addActionListener(this); |
---|
| 180 | + } |
---|
| 181 | + menu.add("-"); |
---|
174 | 182 | cutItem = menu.add(new MenuItem("Cut")); |
---|
175 | 183 | cutItem.addActionListener(this); |
---|
176 | 184 | copyItem = menu.add(new MenuItem("Copy")); |
---|
.. | .. |
---|
178 | 186 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
179 | 187 | pasteItem.addActionListener(this); |
---|
180 | 188 | menu.add("-"); |
---|
181 | | - cloneItem = menu.add(new MenuItem("Clone")); |
---|
182 | | - cloneItem.addActionListener(this); |
---|
183 | | - cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
184 | | - cloneSupportItem.addActionListener(this); |
---|
| 189 | + |
---|
185 | 190 | menu.add("-"); |
---|
186 | 191 | pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
187 | 192 | pasteIntoItem.addActionListener(this); |
---|
.. | .. |
---|
272 | 277 | |
---|
273 | 278 | if (Globals.ADVANCED) |
---|
274 | 279 | { |
---|
| 280 | + menu.add("-"); |
---|
275 | 281 | physicsItem = menu.add(new MenuItem("Physics")); |
---|
276 | 282 | physicsItem.addActionListener(this); |
---|
277 | 283 | frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
.. | .. |
---|
297 | 303 | shadowZItem.addActionListener(this); |
---|
298 | 304 | if (Globals.ADVANCED) |
---|
299 | 305 | { |
---|
| 306 | + menu.add("-"); |
---|
300 | 307 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
301 | 308 | linkerItem.addActionListener(this); |
---|
302 | 309 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
.. | .. |
---|
305 | 312 | templateItem.addActionListener(this); |
---|
306 | 313 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
307 | 314 | pointflowItem.addActionListener(this); |
---|
308 | | - menu.add("-"); |
---|
309 | 315 | } |
---|
| 316 | + menu.add("-"); |
---|
310 | 317 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
311 | 318 | resetTransformItem.addActionListener(this); |
---|
312 | 319 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
.. | .. |
---|
432 | 439 | buildCreateMenu(menu); |
---|
433 | 440 | |
---|
434 | 441 | oe.menuBar.add(menu = new Menu("Include")); |
---|
435 | | - importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
436 | | - importGFDItem.addActionListener(this); |
---|
437 | | - importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
438 | | - importVRMLX3DItem.addActionListener(this); |
---|
439 | | - importOBJItem = menu.add(new MenuItem("OBJ Object...")); |
---|
| 442 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
440 | 443 | importOBJItem.addActionListener(this); |
---|
441 | | - import3DSItem = menu.add(new MenuItem("3DS Object...")); |
---|
| 444 | + menu.add("-"); |
---|
| 445 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
442 | 446 | import3DSItem.addActionListener(this); |
---|
| 447 | + menu.add("-"); |
---|
| 448 | + importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
| 449 | + importVRMLX3DItem.addActionListener(this); |
---|
| 450 | + menu.add("-"); |
---|
| 451 | + importGFDItem = menu.add(new MenuItem("GrafreeD file...")); |
---|
| 452 | + importGFDItem.addActionListener(this); |
---|
443 | 453 | |
---|
444 | 454 | oe.menuBar.add(menu = new Menu("Tools")); |
---|
445 | 455 | buildToolsMenu(menu); |
---|
.. | .. |
---|
481 | 491 | liveCB.setToolTipText("Enabled animation"); |
---|
482 | 492 | liveCB.addItemListener(this); |
---|
483 | 493 | |
---|
484 | | - oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 494 | + oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
485 | 495 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
486 | 496 | oneStepButton.addActionListener(this); |
---|
487 | 497 | |
---|
.. | .. |
---|
493 | 503 | trackCB.setToolTipText("Enable tracking"); |
---|
494 | 504 | trackCB.addItemListener(this); |
---|
495 | 505 | |
---|
496 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 506 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
497 | 507 | screenfitButton.setToolTipText("Screen fit"); |
---|
498 | 508 | screenfitButton.addActionListener(this); |
---|
499 | 509 | |
---|
.. | .. |
---|
502 | 512 | |
---|
503 | 513 | if (Globals.ADVANCED) |
---|
504 | 514 | { |
---|
505 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 515 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
506 | 516 | snapobjectButton.addActionListener(this); |
---|
507 | 517 | snapobjectButton.setToolTipText("Snap Object"); |
---|
508 | 518 | } |
---|
509 | 519 | |
---|
510 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 520 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
511 | 521 | flashSelectionButton.setToolTipText("Show selection"); |
---|
512 | 522 | flashSelectionButton.addActionListener(this); |
---|
513 | 523 | |
---|
514 | 524 | oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
515 | 525 | |
---|
516 | | - oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 526 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
517 | 527 | twoButton.setToolTipText("Show center view only"); |
---|
518 | 528 | twoButton.addActionListener(this); |
---|
519 | | - oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 529 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
520 | 530 | fourButton.addActionListener(this); |
---|
521 | 531 | fourButton.setToolTipText("Show left panel only"); |
---|
522 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 532 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
523 | 533 | sixButton.setToolTipText("2-column layout left"); |
---|
524 | 534 | sixButton.addActionListener(this); |
---|
525 | | - oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 535 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
526 | 536 | threeButton.setToolTipText("2-column layout right"); |
---|
527 | 537 | threeButton.addActionListener(this); |
---|
528 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 538 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
529 | 539 | sevenButton.setToolTipText("3-column layout"); |
---|
530 | 540 | sevenButton.addActionListener(this); |
---|
531 | 541 | // |
---|
532 | 542 | |
---|
533 | | - oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 543 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
534 | 544 | rootButton.setToolTipText("Edit selection in new tab"); |
---|
535 | 545 | rootButton.addActionListener(this); |
---|
536 | 546 | |
---|
537 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 547 | + oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
538 | 548 | closeButton.setToolTipText("Close tab"); |
---|
539 | 549 | closeButton.addActionListener(this); |
---|
540 | 550 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
.. | .. |
---|
542 | 552 | |
---|
543 | 553 | cGridBag commandsPanel = new cGridBag(); |
---|
544 | 554 | |
---|
545 | | - commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 555 | + commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
546 | 556 | editButton.setToolTipText("Edit selection"); |
---|
547 | 557 | editButton.addActionListener(this); |
---|
548 | 558 | |
---|
549 | | - commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 559 | + commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
550 | 560 | uneditButton.setToolTipText("Unedit selection"); |
---|
551 | 561 | uneditButton.addActionListener(this); |
---|
552 | 562 | |
---|
.. | .. |
---|
554 | 564 | allParamsButton.setToolTipText("Edit all params"); |
---|
555 | 565 | allParamsButton.addActionListener(this); |
---|
556 | 566 | |
---|
557 | | - commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 567 | + commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
558 | 568 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
559 | 569 | clearPanelButton.addActionListener(this); |
---|
560 | 570 | |
---|
561 | | - commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 571 | + commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
562 | 572 | unselectButton.setToolTipText("Unselect"); |
---|
563 | 573 | unselectButton.addActionListener(this); |
---|
564 | 574 | |
---|
.. | .. |
---|
930 | 940 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
931 | 941 | // return; |
---|
932 | 942 | // } |
---|
933 | | - if (string.charAt(0) == '/') |
---|
| 943 | + |
---|
| 944 | + // File path for Mac and Windows |
---|
| 945 | + if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
934 | 946 | { |
---|
935 | 947 | // file(s) |
---|
936 | 948 | String[] names = string.split("\n"); |
---|
.. | .. |
---|
957 | 969 | |
---|
958 | 970 | flashIt = false; |
---|
959 | 971 | CameraPane pane = (CameraPane) target; |
---|
960 | | - pane.clickStart(objEditor.location.x, objEditor.location.y, 0); |
---|
| 972 | + pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0); |
---|
961 | 973 | pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true); |
---|
962 | 974 | |
---|
963 | 975 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
1164 | 1176 | parseverticesItem.addActionListener(this); |
---|
1165 | 1177 | textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
1166 | 1178 | textureFieldItem.addActionListener(this); |
---|
1167 | | - alignItem = menu.add(new MenuItem("Align Object")); |
---|
| 1179 | + alignItem = menu.add(new MenuItem("Align Objects")); |
---|
1168 | 1180 | alignItem.addActionListener(this); |
---|
1169 | 1181 | reduceMorphItem = menu.add(new MenuItem("Reduce Morphs")); |
---|
1170 | 1182 | reduceMorphItem.addActionListener(this); |
---|
1171 | 1183 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1172 | 1184 | reduce34MorphItem.addActionListener(this); |
---|
1173 | | - |
---|
| 1185 | + menu.add("-"); |
---|
1174 | 1186 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1175 | 1187 | computeAOItem.addActionListener(this); |
---|
1176 | 1188 | |
---|
.. | .. |
---|
1530 | 1542 | |
---|
1531 | 1543 | void Overwrite(int mask) |
---|
1532 | 1544 | { |
---|
1533 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 1545 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
1534 | 1546 | { |
---|
1535 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 1547 | + Object3D content = Grafreed.clipboard.get(0); |
---|
1536 | 1548 | |
---|
1537 | 1549 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1538 | 1550 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1852 | 1864 | } else |
---|
1853 | 1865 | if (source == importOBJItem) |
---|
1854 | 1866 | { |
---|
1855 | | - objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 1867 | + //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 1868 | + FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
| 1869 | + browser.setVisible(true); |
---|
| 1870 | + String filename = browser.getFile(); |
---|
| 1871 | + if (filename != null && filename.length() > 0) |
---|
| 1872 | + { |
---|
| 1873 | + String fullname = browser.getDirectory() + filename; |
---|
| 1874 | + makeSomething(ReadOBJ(fullname), true); |
---|
| 1875 | + } |
---|
1856 | 1876 | } else |
---|
1857 | 1877 | if (source == computeAOItem) |
---|
1858 | 1878 | { |
---|
.. | .. |
---|
1872 | 1892 | if (source == invariantsItem) |
---|
1873 | 1893 | { |
---|
1874 | 1894 | System.out.println("Invariants:"); |
---|
1875 | | - GrafreeD.grafreeD.universe.invariants(); |
---|
| 1895 | + Grafreed.grafreeD.universe.invariants(); |
---|
1876 | 1896 | } else |
---|
1877 | 1897 | if (source == memoryItem) |
---|
1878 | 1898 | { |
---|
.. | .. |
---|
1947 | 1967 | } else |
---|
1948 | 1968 | if (source == duplicateItem) |
---|
1949 | 1969 | { |
---|
1950 | | - Object3D keep = GrafreeD.clipboard; |
---|
| 1970 | + Object3D keep = Grafreed.clipboard; |
---|
1951 | 1971 | loadClipboard(false); |
---|
1952 | 1972 | paste(false); |
---|
1953 | | - GrafreeD.clipboard = keep; |
---|
| 1973 | + Grafreed.clipboard = keep; |
---|
1954 | 1974 | } else |
---|
1955 | 1975 | if (source == cloneItem) |
---|
1956 | 1976 | { |
---|
.. | .. |
---|
2170 | 2190 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2171 | 2191 | // refreshContents(); |
---|
2172 | 2192 | // } |
---|
2173 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 2193 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
2174 | 2194 | { |
---|
2175 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2195 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2176 | 2196 | |
---|
2177 | 2197 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2178 | 2198 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2222 | 2242 | } else |
---|
2223 | 2243 | if (source == setMasterItem) |
---|
2224 | 2244 | { |
---|
2225 | | - if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
| 2245 | + if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1) |
---|
2226 | 2246 | { |
---|
2227 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2247 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2228 | 2248 | |
---|
2229 | 2249 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2230 | 2250 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2237 | 2257 | { |
---|
2238 | 2258 | if (group.selection.size() == 1) |
---|
2239 | 2259 | { |
---|
2240 | | - if (GrafreeD.clipboard.size() == 1) |
---|
| 2260 | + if (Grafreed.clipboard.size() == 1) |
---|
2241 | 2261 | { |
---|
2242 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 2262 | + Object3D content = Grafreed.clipboard.get(0); |
---|
2243 | 2263 | |
---|
2244 | 2264 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2245 | 2265 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3318 | 3338 | obj = (Object3D)e.nextElement(); |
---|
3319 | 3339 | |
---|
3320 | 3340 | System.out.println("Object is: " + obj); |
---|
3321 | | - GrafreeD.AnalyzeObject(obj); |
---|
| 3341 | + Grafreed.AnalyzeObject(obj); |
---|
3322 | 3342 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3323 | | - GrafreeD.AnalyzeObject(obj.bRep); |
---|
| 3343 | + Grafreed.AnalyzeObject(obj.bRep); |
---|
3324 | 3344 | |
---|
3325 | 3345 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3326 | 3346 | } |
---|
.. | .. |
---|
3534 | 3554 | |
---|
3535 | 3555 | void ParseVertices() |
---|
3536 | 3556 | { |
---|
3537 | | - boolean epsequal = GrafreeD.epsequal; |
---|
3538 | | - GrafreeD.epsequal = true; |
---|
| 3557 | + boolean epsequal = Grafreed.epsequal; |
---|
| 3558 | + Grafreed.epsequal = true; |
---|
3539 | 3559 | |
---|
3540 | 3560 | for (int i=0; i<group.selection.size(); i++) |
---|
3541 | 3561 | { |
---|
.. | .. |
---|
3560 | 3580 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3561 | 3581 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3562 | 3582 | |
---|
3563 | | - g.add(GrafreeD.clipboard); |
---|
| 3583 | + g.add(Grafreed.clipboard); |
---|
3564 | 3584 | |
---|
3565 | 3585 | buffer.add(g); |
---|
3566 | 3586 | } |
---|
.. | .. |
---|
3575 | 3595 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3576 | 3596 | } |
---|
3577 | 3597 | |
---|
3578 | | - GrafreeD.epsequal = epsequal; |
---|
| 3598 | + Grafreed.epsequal = epsequal; |
---|
3579 | 3599 | |
---|
3580 | 3600 | refreshContents(); |
---|
3581 | 3601 | } |
---|
.. | .. |
---|
3725 | 3745 | return; |
---|
3726 | 3746 | |
---|
3727 | 3747 | Object3D poses = group.selection.get(0); |
---|
3728 | | - Object3D ref = GrafreeD.clipboard.get(0); |
---|
| 3748 | + Object3D ref = Grafreed.clipboard.get(0); |
---|
3729 | 3749 | |
---|
3730 | 3750 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3731 | 3751 | |
---|
.. | .. |
---|
3919 | 3939 | |
---|
3920 | 3940 | void ClipMesh() |
---|
3921 | 3941 | { |
---|
3922 | | - if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
| 3942 | + if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1) |
---|
3923 | 3943 | { |
---|
3924 | | - Object3D content = GrafreeD.clipboard.get(0); |
---|
| 3944 | + Object3D content = Grafreed.clipboard.get(0); |
---|
3925 | 3945 | |
---|
3926 | 3946 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3927 | 3947 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
3930 | 3950 | // { |
---|
3931 | 3951 | // group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3932 | 3952 | // } |
---|
3933 | | - group.selection.ClipMesh(GrafreeD.clipboard); |
---|
| 3953 | + group.selection.ClipMesh(Grafreed.clipboard); |
---|
3934 | 3954 | } |
---|
3935 | 3955 | // group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3936 | 3956 | System.out.println("DONE."); |
---|
.. | .. |
---|
4270 | 4290 | { |
---|
4271 | 4291 | if (group.selection.isEmpty()) |
---|
4272 | 4292 | return; |
---|
4273 | | - GrafreeD.clipboardIsTempGroup = false; |
---|
| 4293 | + Grafreed.clipboardIsTempGroup = false; |
---|
4274 | 4294 | Composite tGroup = null; |
---|
4275 | 4295 | if (group.selection.size() > 0) // 1) |
---|
4276 | 4296 | { |
---|
4277 | 4297 | tGroup = new cGroup(); |
---|
4278 | | - GrafreeD.clipboardIsTempGroup = true; |
---|
| 4298 | + Grafreed.clipboardIsTempGroup = true; |
---|
4279 | 4299 | } |
---|
4280 | 4300 | |
---|
4281 | 4301 | if (cut) |
---|
.. | .. |
---|
4315 | 4335 | //System.out.println("cut " + child); |
---|
4316 | 4336 | //System.out.println("parent = " + child.parent); |
---|
4317 | 4337 | // tmp.addChild(child); |
---|
4318 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4338 | + if (Grafreed.clipboardIsTempGroup) |
---|
4319 | 4339 | tGroup.add/*Child*/(tmp); |
---|
4320 | 4340 | else |
---|
4321 | | - GrafreeD.clipboard = tmp; |
---|
| 4341 | + Grafreed.clipboard = tmp; |
---|
4322 | 4342 | } |
---|
4323 | 4343 | else |
---|
4324 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4344 | + if (Grafreed.clipboardIsTempGroup) |
---|
4325 | 4345 | tGroup.add/*Child*/(child); |
---|
4326 | 4346 | else |
---|
4327 | | - GrafreeD.clipboard = child; |
---|
| 4347 | + Grafreed.clipboard = child; |
---|
4328 | 4348 | } |
---|
4329 | 4349 | |
---|
4330 | 4350 | //ResetModel(); |
---|
.. | .. |
---|
4356 | 4376 | //System.out.println("cut " + elem); |
---|
4357 | 4377 | //System.out.println("parent = " + elem.parent); |
---|
4358 | 4378 | // tmp.addChild(elem); |
---|
4359 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4379 | + if (Grafreed.clipboardIsTempGroup) |
---|
4360 | 4380 | tGroup.add/*Child*/(tmp); |
---|
4361 | 4381 | else |
---|
4362 | | - GrafreeD.clipboard = tmp; |
---|
| 4382 | + Grafreed.clipboard = tmp; |
---|
4363 | 4383 | } |
---|
4364 | 4384 | else |
---|
4365 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4385 | + if (Grafreed.clipboardIsTempGroup) |
---|
4366 | 4386 | tGroup.add/*Child*/(child); |
---|
4367 | 4387 | else |
---|
4368 | | - GrafreeD.clipboard = child; |
---|
| 4388 | + Grafreed.clipboard = child; |
---|
4369 | 4389 | } |
---|
4370 | 4390 | |
---|
4371 | 4391 | } |
---|
4372 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
4373 | | - GrafreeD.clipboard = tGroup; |
---|
| 4392 | + if (Grafreed.clipboardIsTempGroup) |
---|
| 4393 | + Grafreed.clipboard = tGroup; |
---|
4374 | 4394 | if (cut) |
---|
4375 | 4395 | { |
---|
4376 | 4396 | ResetModel(); |
---|
.. | .. |
---|
4384 | 4404 | // return; |
---|
4385 | 4405 | boolean first = true; |
---|
4386 | 4406 | |
---|
4387 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4407 | + if (Grafreed.clipboardIsTempGroup) |
---|
4388 | 4408 | { |
---|
4389 | 4409 | Composite temp; |
---|
4390 | 4410 | |
---|
.. | .. |
---|
4395 | 4415 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4396 | 4416 | */ |
---|
4397 | 4417 | Object3D elem; |
---|
4398 | | - for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4418 | + for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4399 | 4419 | { |
---|
4400 | 4420 | Object3D child = (Object3D)e.nextElement(); |
---|
4401 | 4421 | |
---|
.. | .. |
---|
4429 | 4449 | //Object3D cb = Applet3D.clipboard; |
---|
4430 | 4450 | //temp.addChild(cb); |
---|
4431 | 4451 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4432 | | - assert(GrafreeD.clipboard.parent == null); |
---|
4433 | | - Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
4434 | | - GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4435 | | - if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
4436 | | - makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
| 4452 | + assert(Grafreed.clipboard.parent == null); |
---|
| 4453 | + Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent; |
---|
| 4454 | + Grafreed.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4455 | + if (LA.isIdentity(Grafreed.clipboard.toParent)) |
---|
| 4456 | + makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy()); |
---|
4437 | 4457 | else |
---|
4438 | | - makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
4439 | | - GrafreeD.clipboard.get(0).parent = keepparent; |
---|
| 4458 | + makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy()); |
---|
| 4459 | + Grafreed.clipboard.get(0).parent = keepparent; |
---|
4440 | 4460 | } |
---|
4441 | 4461 | |
---|
4442 | 4462 | ResetModel(); |
---|
.. | .. |
---|
4485 | 4505 | { |
---|
4486 | 4506 | boolean first = true; |
---|
4487 | 4507 | |
---|
4488 | | - if (GrafreeD.clipboardIsTempGroup) |
---|
| 4508 | + if (Grafreed.clipboardIsTempGroup) |
---|
4489 | 4509 | { |
---|
4490 | | - Composite temp = (Composite)GrafreeD.clipboard; |
---|
| 4510 | + Composite temp = (Composite)Grafreed.clipboard; |
---|
4491 | 4511 | Object3D copy; |
---|
4492 | 4512 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4493 | 4513 | { |
---|
.. | .. |
---|
4497 | 4517 | } |
---|
4498 | 4518 | } else |
---|
4499 | 4519 | { |
---|
4500 | | - linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
| 4520 | + linkSomething(Grafreed.clipboard); //.get(0)); |
---|
4501 | 4521 | } |
---|
4502 | 4522 | } |
---|
4503 | 4523 | } |
---|
.. | .. |
---|
4942 | 4962 | |
---|
4943 | 4963 | void ImportVRMLX3D() |
---|
4944 | 4964 | { |
---|
4945 | | - if (GrafreeD.standAlone) |
---|
| 4965 | + if (Grafreed.standAlone) |
---|
4946 | 4966 | { |
---|
4947 | 4967 | /**/ |
---|
4948 | 4968 | FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
.. | .. |
---|
4959 | 4979 | |
---|
4960 | 4980 | String GetFile(String dialogName) |
---|
4961 | 4981 | { |
---|
4962 | | - if (GrafreeD.standAlone) |
---|
| 4982 | + if (Grafreed.standAlone) |
---|
4963 | 4983 | { |
---|
4964 | 4984 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4965 | 4985 | browser.show(); |
---|