Normand Briere
2019-05-05 f69d25e4682ca33edfc8cfad26187050f4eb558a
GroupEditor.java
....@@ -98,14 +98,14 @@
9898
9999 void CloneClipboard(boolean supports)
100100 {
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));
106106 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;
109109 }
110110
111111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -119,7 +119,7 @@
119119 // obj.support = null;
120120 if (!supports)
121121 obj.SaveSupports();
122
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
123123 obj.parent = parent;
124124 // obj.support = support;
125125 // clone.support = support; // aout 2013
....@@ -491,7 +491,7 @@
491491 liveCB.setToolTipText("Enabled animation");
492492 liveCB.addItemListener(this);
493493
494
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
494
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
495495 oneStepButton.setToolTipText("Animate one step forward");
496496 oneStepButton.addActionListener(this);
497497
....@@ -503,7 +503,7 @@
503503 trackCB.setToolTipText("Enable tracking");
504504 trackCB.addItemListener(this);
505505
506
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
506
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
507507 screenfitButton.setToolTipText("Screen fit");
508508 screenfitButton.addActionListener(this);
509509
....@@ -512,39 +512,39 @@
512512
513513 if (Globals.ADVANCED)
514514 {
515
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
515
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
516516 snapobjectButton.addActionListener(this);
517517 snapobjectButton.setToolTipText("Snap Object");
518518 }
519519
520
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
520
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
521521 flashSelectionButton.setToolTipText("Show selection");
522522 flashSelectionButton.addActionListener(this);
523523
524524 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525525
526
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
526
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
527527 twoButton.setToolTipText("Show center view only");
528528 twoButton.addActionListener(this);
529
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
529
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
530530 fourButton.addActionListener(this);
531531 fourButton.setToolTipText("Show left panel only");
532
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
532
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
533533 sixButton.setToolTipText("2-column layout left");
534534 sixButton.addActionListener(this);
535
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
535
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
536536 threeButton.setToolTipText("2-column layout right");
537537 threeButton.addActionListener(this);
538
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
538
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
539539 sevenButton.setToolTipText("3-column layout");
540540 sevenButton.addActionListener(this);
541541 //
542542
543
- 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);
544544 rootButton.setToolTipText("Edit selection in new tab");
545545 rootButton.addActionListener(this);
546546
547
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
547
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
548548 closeButton.setToolTipText("Close tab");
549549 closeButton.addActionListener(this);
550550 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -552,11 +552,11 @@
552552
553553 cGridBag commandsPanel = new cGridBag();
554554
555
- commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
555
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
556556 editButton.setToolTipText("Edit selection");
557557 editButton.addActionListener(this);
558558
559
- commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
559
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
560560 uneditButton.setToolTipText("Unedit selection");
561561 uneditButton.addActionListener(this);
562562
....@@ -564,11 +564,11 @@
564564 allParamsButton.setToolTipText("Edit all params");
565565 allParamsButton.addActionListener(this);
566566
567
- commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
567
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
568568 clearPanelButton.setToolTipText("Clear edit panel");
569569 clearPanelButton.addActionListener(this);
570570
571
- commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
571
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
572572 unselectButton.setToolTipText("Unselect");
573573 unselectButton.addActionListener(this);
574574
....@@ -969,7 +969,7 @@
969969
970970 flashIt = false;
971971 CameraPane pane = (CameraPane) target;
972
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
972
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
973973 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
974974
975975 if (group.selection.size() == 1)
....@@ -1542,9 +1542,9 @@
15421542
15431543 void Overwrite(int mask)
15441544 {
1545
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1545
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
15461546 {
1547
- Object3D content = GrafreeD.clipboard.get(0);
1547
+ Object3D content = Grafreed.clipboard.get(0);
15481548
15491549 if (content instanceof cGroup && ((cGroup)content).transientlink )
15501550 content = ((cGroup)content).get(0);
....@@ -1892,7 +1892,7 @@
18921892 if (source == invariantsItem)
18931893 {
18941894 System.out.println("Invariants:");
1895
- GrafreeD.grafreeD.universe.invariants();
1895
+ Grafreed.grafreeD.universe.invariants();
18961896 } else
18971897 if (source == memoryItem)
18981898 {
....@@ -1967,10 +1967,10 @@
19671967 } else
19681968 if (source == duplicateItem)
19691969 {
1970
- Object3D keep = GrafreeD.clipboard;
1970
+ Object3D keep = Grafreed.clipboard;
19711971 loadClipboard(false);
19721972 paste(false);
1973
- GrafreeD.clipboard = keep;
1973
+ Grafreed.clipboard = keep;
19741974 } else
19751975 if (source == cloneItem)
19761976 {
....@@ -2190,9 +2190,9 @@
21902190 // group.selection.get(0).setMasterThis(content); // should be identity
21912191 // refreshContents();
21922192 // }
2193
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2193
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21942194 {
2195
- Object3D content = GrafreeD.clipboard.get(0);
2195
+ Object3D content = Grafreed.clipboard.get(0);
21962196
21972197 if (content instanceof cGroup && ((cGroup)content).transientlink )
21982198 content = ((cGroup)content).get(0);
....@@ -2242,9 +2242,9 @@
22422242 } else
22432243 if (source == setMasterItem)
22442244 {
2245
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2245
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
22462246 {
2247
- Object3D content = GrafreeD.clipboard.get(0);
2247
+ Object3D content = Grafreed.clipboard.get(0);
22482248
22492249 if (content instanceof cGroup && ((cGroup)content).transientlink )
22502250 content = ((cGroup)content).get(0);
....@@ -2257,9 +2257,9 @@
22572257 {
22582258 if (group.selection.size() == 1)
22592259 {
2260
- if (GrafreeD.clipboard.size() == 1)
2260
+ if (Grafreed.clipboard.size() == 1)
22612261 {
2262
- Object3D content = GrafreeD.clipboard.get(0);
2262
+ Object3D content = Grafreed.clipboard.get(0);
22632263
22642264 if (content instanceof cGroup && ((cGroup)content).transientlink )
22652265 content = ((cGroup)content).get(0);
....@@ -3338,9 +3338,9 @@
33383338 obj = (Object3D)e.nextElement();
33393339
33403340 System.out.println("Object is: " + obj);
3341
- GrafreeD.AnalyzeObject(obj);
3341
+ Grafreed.AnalyzeObject(obj);
33423342 System.out.println("Boundary rep: " + obj.bRep);
3343
- GrafreeD.AnalyzeObject(obj.bRep);
3343
+ Grafreed.AnalyzeObject(obj.bRep);
33443344
33453345 // System.err.println((size/1024) + " KB is the size of " + obj);
33463346 }
....@@ -3554,8 +3554,8 @@
35543554
35553555 void ParseVertices()
35563556 {
3557
- boolean epsequal = GrafreeD.epsequal;
3558
- GrafreeD.epsequal = true;
3557
+ boolean epsequal = Grafreed.epsequal;
3558
+ Grafreed.epsequal = true;
35593559
35603560 for (int i=0; i<group.selection.size(); i++)
35613561 {
....@@ -3580,7 +3580,7 @@
35803580 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35813581 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35823582
3583
- g.add(GrafreeD.clipboard);
3583
+ g.add(Grafreed.clipboard);
35843584
35853585 buffer.add(g);
35863586 }
....@@ -3595,7 +3595,7 @@
35953595 makeSomething(buffer, i==group.selection.size()-1);
35963596 }
35973597
3598
- GrafreeD.epsequal = epsequal;
3598
+ Grafreed.epsequal = epsequal;
35993599
36003600 refreshContents();
36013601 }
....@@ -3745,7 +3745,7 @@
37453745 return;
37463746
37473747 Object3D poses = group.selection.get(0);
3748
- Object3D ref = GrafreeD.clipboard.get(0);
3748
+ Object3D ref = Grafreed.clipboard.get(0);
37493749
37503750 Object3D newgroup = new Object3D("Po:" + poses.name);
37513751
....@@ -3939,9 +3939,9 @@
39393939
39403940 void ClipMesh()
39413941 {
3942
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
3942
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
39433943 {
3944
- Object3D content = GrafreeD.clipboard.get(0);
3944
+ Object3D content = Grafreed.clipboard.get(0);
39453945
39463946 if (content instanceof cGroup && ((cGroup)content).transientlink )
39473947 content = ((cGroup)content).get(0);
....@@ -3950,7 +3950,7 @@
39503950 // {
39513951 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
39523952 // }
3953
- group.selection.ClipMesh(GrafreeD.clipboard);
3953
+ group.selection.ClipMesh(Grafreed.clipboard);
39543954 }
39553955 // group.selection.ClipMesh(GrafreeD.clipboard);
39563956 System.out.println("DONE.");
....@@ -4290,12 +4290,12 @@
42904290 {
42914291 if (group.selection.isEmpty())
42924292 return;
4293
- GrafreeD.clipboardIsTempGroup = false;
4293
+ Grafreed.clipboardIsTempGroup = false;
42944294 Composite tGroup = null;
42954295 if (group.selection.size() > 0) // 1)
42964296 {
42974297 tGroup = new cGroup();
4298
- GrafreeD.clipboardIsTempGroup = true;
4298
+ Grafreed.clipboardIsTempGroup = true;
42994299 }
43004300
43014301 if (cut)
....@@ -4335,16 +4335,16 @@
43354335 //System.out.println("cut " + child);
43364336 //System.out.println("parent = " + child.parent);
43374337 // tmp.addChild(child);
4338
- if (GrafreeD.clipboardIsTempGroup)
4338
+ if (Grafreed.clipboardIsTempGroup)
43394339 tGroup.add/*Child*/(tmp);
43404340 else
4341
- GrafreeD.clipboard = tmp;
4341
+ Grafreed.clipboard = tmp;
43424342 }
43434343 else
4344
- if (GrafreeD.clipboardIsTempGroup)
4344
+ if (Grafreed.clipboardIsTempGroup)
43454345 tGroup.add/*Child*/(child);
43464346 else
4347
- GrafreeD.clipboard = child;
4347
+ Grafreed.clipboard = child;
43484348 }
43494349
43504350 //ResetModel();
....@@ -4376,21 +4376,21 @@
43764376 //System.out.println("cut " + elem);
43774377 //System.out.println("parent = " + elem.parent);
43784378 // tmp.addChild(elem);
4379
- if (GrafreeD.clipboardIsTempGroup)
4379
+ if (Grafreed.clipboardIsTempGroup)
43804380 tGroup.add/*Child*/(tmp);
43814381 else
4382
- GrafreeD.clipboard = tmp;
4382
+ Grafreed.clipboard = tmp;
43834383 }
43844384 else
4385
- if (GrafreeD.clipboardIsTempGroup)
4385
+ if (Grafreed.clipboardIsTempGroup)
43864386 tGroup.add/*Child*/(child);
43874387 else
4388
- GrafreeD.clipboard = child;
4388
+ Grafreed.clipboard = child;
43894389 }
43904390
43914391 }
4392
- if (GrafreeD.clipboardIsTempGroup)
4393
- GrafreeD.clipboard = tGroup;
4392
+ if (Grafreed.clipboardIsTempGroup)
4393
+ Grafreed.clipboard = tGroup;
43944394 if (cut)
43954395 {
43964396 ResetModel();
....@@ -4404,7 +4404,7 @@
44044404 // return;
44054405 boolean first = true;
44064406
4407
- if (GrafreeD.clipboardIsTempGroup)
4407
+ if (Grafreed.clipboardIsTempGroup)
44084408 {
44094409 Composite temp;
44104410
....@@ -4415,7 +4415,7 @@
44154415 temp = (Composite)Applet3D.clipboard.deepCopy();
44164416 */
44174417 Object3D elem;
4418
- 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))
44194419 {
44204420 Object3D child = (Object3D)e.nextElement();
44214421
....@@ -4449,14 +4449,14 @@
44494449 //Object3D cb = Applet3D.clipboard;
44504450 //temp.addChild(cb);
44514451 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
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());
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());
44574457 else
4458
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4459
- GrafreeD.clipboard.get(0).parent = keepparent;
4458
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4459
+ Grafreed.clipboard.get(0).parent = keepparent;
44604460 }
44614461
44624462 ResetModel();
....@@ -4505,9 +4505,9 @@
45054505 {
45064506 boolean first = true;
45074507
4508
- if (GrafreeD.clipboardIsTempGroup)
4508
+ if (Grafreed.clipboardIsTempGroup)
45094509 {
4510
- Composite temp = (Composite)GrafreeD.clipboard;
4510
+ Composite temp = (Composite)Grafreed.clipboard;
45114511 Object3D copy;
45124512 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
45134513 {
....@@ -4517,7 +4517,7 @@
45174517 }
45184518 } else
45194519 {
4520
- linkSomething(GrafreeD.clipboard); //.get(0));
4520
+ linkSomething(Grafreed.clipboard); //.get(0));
45214521 }
45224522 }
45234523 }
....@@ -4962,7 +4962,7 @@
49624962
49634963 void ImportVRMLX3D()
49644964 {
4965
- if (GrafreeD.standAlone)
4965
+ if (Grafreed.standAlone)
49664966 {
49674967 /**/
49684968 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4979,7 +4979,7 @@
49794979
49804980 String GetFile(String dialogName)
49814981 {
4982
- if (GrafreeD.standAlone)
4982
+ if (Grafreed.standAlone)
49834983 {
49844984 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49854985 browser.show();