Normand Briere
2019-05-01 25cef97465f0bfa8959663754e9243006324c81c
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -83,7 +84,7 @@
8384
8485 void CloneSelection(boolean supports)
8586 {
86
- // Object3D keep = GraphreeD.clipboard;
87
+ // Object3D keep = GrafreeD.clipboard;
8788 //Object3D obj;
8889 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
8990 {
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
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));
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));
105106 else
106
- makeSomething(CloneObject(GraphreeD.clipboard, false));
107
- GraphreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(GrafreeD.clipboard, false));
108
+ GrafreeD.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GraphreeD.clone(obj);
122
+ Object3D clone = (Object3D)GrafreeD.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -219,18 +220,24 @@
219220 resetsupportItem.addActionListener(this);
220221 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221222 linkverticesItem.addActionListener(this);
223
+ relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
224
+ relinkverticesItem.addActionListener(this);
222225 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
223226 setMasterItem.addActionListener(this);
224227
225228 oe.menuBar.add(menu = new Menu("Group"));
226229 grabItem = menu.add(new MenuItem("Grab"));
227230 grabItem.addActionListener(this);
228
- frontItem = menu.add(new MenuItem("Front"));
229
- frontItem.addActionListener(this);
230231 backItem = menu.add(new MenuItem("Back"));
231232 backItem.addActionListener(this);
233
+ frontItem = menu.add(new MenuItem("Front"));
234
+ frontItem.addActionListener(this);
232235 compositeItem = menu.add(new MenuItem("Composite"));
233236 compositeItem.addActionListener(this);
237
+ hideItem = menu.add(new MenuItem("Hide"));
238
+ hideItem.addActionListener(this);
239
+ ungroupItem = menu.add(new MenuItem("Ungroup"));
240
+ ungroupItem.addActionListener(this);
234241 menu.add("-");
235242 randomItem = menu.add(new MenuItem("Random"));
236243 randomItem.addActionListener(this);
....@@ -252,6 +259,8 @@
252259 oe.menuBar.add(menu = new Menu("Object"));
253260 textureItem = menu.add(new MenuItem("Texture"));
254261 textureItem.addActionListener(this);
262
+ billboardItem = menu.add(new MenuItem("Billboard"));
263
+ billboardItem.addActionListener(this);
255264 csgItem = menu.add(new MenuItem("CSG"));
256265 csgItem.addActionListener(this);
257266 shadowXItem = menu.add(new MenuItem("Shadow X"));
....@@ -269,14 +278,12 @@
269278 pointflowItem = menu.add(new MenuItem("Point Flow"));
270279 pointflowItem.addActionListener(this);
271280 menu.add("-");
272
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
273
- transformgeometryItem.addActionListener(this);
274281 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
275282 resetTransformItem.addActionListener(this);
276283 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
277284 resetCentroidItem.addActionListener(this);
278
- ungroupItem = menu.add(new MenuItem("Ungroup"));
279
- ungroupItem.addActionListener(this);
285
+ transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
286
+ transformgeometryItem.addActionListener(this);
280287
281288 oe.menuBar.add(menu = new Menu("Geometry"));
282289 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -285,6 +292,10 @@
285292 genNormalsORGANItem.addActionListener(this);
286293 genNormalsCADItem = menu.add(new MenuItem("CAD Normals"));
287294 genNormalsCADItem.addActionListener(this);
295
+ genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
296
+ genNormalsMESHItem.addActionListener(this);
297
+ genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
298
+ genNormalsMINEItem.addActionListener(this);
288299 stripifyItem = menu.add(new MenuItem("Stripify"));
289300 stripifyItem.addActionListener(this);
290301 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -380,7 +391,7 @@
380391
381392
382393 oe.menuBar.add(menu = new Menu("Include"));
383
- importGFDItem = menu.add(new MenuItem("GraphreeD Object..."));
394
+ importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
384395 importGFDItem.addActionListener(this);
385396 importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
386397 importVRMLX3DItem.addActionListener(this);
....@@ -423,84 +434,26 @@
423434 oe.radioPanel.add(dummyButton);
424435 oe.buttonGroup.add(dummyButton);
425436 */
426
- aConstraints.gridy += 1;
427
- oe.aConstraints.gridwidth = 1;
428
- oe.aConstraints.gridx = 0;
437
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
429438
430
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
439
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
440
+ liveCB.setToolTipText("Enabled animation");
431441 liveCB.addItemListener(this);
432442
433
- oe.aConstraints.gridx += 1;
434
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
435
- supportCB.addItemListener(this);
436
-
437
- // oe.aConstraints.gridx += 1;
438
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
439
- // localCB.addItemListener(this);
440
-
441
- oe.aConstraints.gridx += 1;
442
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
443
- crowdCB.addItemListener(this);
444
-
445
- oe.aConstraints.gridx += 1;
446
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
447
- smoothCB.addItemListener(this);
448
-
449
- oe.aConstraints.gridx += 1;
450
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
451
- fastCB.addItemListener(this);
452
- oe.aConstraints.gridx += 1;
453
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
454
- slowCB.addItemListener(this);
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
457
- boxCB.addItemListener(this);
458
-
459
-// oe.aConstraints.gridx += 1;
460
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
461
-// speakerMocapCB.addItemListener(this);
462
-
463
- if (false)
464
- {
465
- // handled in scripts
466
- oe.aConstraints.gridx += 1;
467
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
468
- speakerCameraCB.addItemListener(this);
469
-
470
- oe.aConstraints.gridx += 1;
471
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
472
- speakerFocusCB.addItemListener(this);
473
-
474
- oe.aConstraints.gridx += 1;
475
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
476
- smoothfocusCB.addItemListener(this);
477
- }
478
-
479
-//oe.aConstraints.gridx += 1;
480
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
481
-// debugCB.addItemListener(this);
482
-
483
- oe.aConstraints.gridx += 1;
484
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
485
- oeilCB.addItemListener(this);
486
-
487
- oe.aConstraints.gridx += 1;
488
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
489
- lookAtCB.addItemListener(this);
490
-
491
- oe.aConstraints.gridx += 1;
492
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
443
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
444
+ trackCB.setToolTipText("Enable tracking");
493445 trackCB.addItemListener(this);
494446
495
- oe.aConstraints.gridx += 1;
496
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
447
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
448
+ screenfitButton.setToolTipText("Screen fit");
497449 screenfitButton.addActionListener(this);
498
- oe.aConstraints.gridx += 1;
450
+
499451 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
500452 // screenfitpointButton.addActionListener(this);
501453 // oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
454
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
503455 snapobjectButton.addActionListener(this);
456
+ snapobjectButton.setToolTipText("Snap Object");
504457 oe.aConstraints.gridx += 1;
505458
506459 //aConstraints.gridx = 0;
....@@ -508,29 +461,35 @@
508461 oe.aConstraints.weighty = 0;
509462 oe.aConstraints.gridwidth = 1;
510463
511
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
464
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
465
+ flashSelectionButton.setToolTipText("Show selection");
512466 flashSelectionButton.addActionListener(this);
513
- oe.aConstraints.gridx += 1;
514
- oe.aConstraints.weighty = 0;
515
- oe.aConstraints.gridwidth = 1;
516467
517
- //
518
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
468
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
469
+
470
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
471
+ twoButton.setToolTipText("Show center view only");
519472 twoButton.addActionListener(this);
520
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
473
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
521474 fourButton.addActionListener(this);
522
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
475
+ fourButton.setToolTipText("Show left panel only");
476
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
477
+ sixButton.setToolTipText("2-column layout left");
523478 sixButton.addActionListener(this);
524
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
479
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
480
+ threeButton.setToolTipText("2-column layout right");
525481 threeButton.addActionListener(this);
526
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
482
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
483
+ sevenButton.setToolTipText("3-column layout");
527484 sevenButton.addActionListener(this);
528485 //
529486
530
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
487
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
488
+ rootButton.setToolTipText("Edit object in new tab");
531489 rootButton.addActionListener(this);
532490 oe.aConstraints.gridx += 1;
533
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
491
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492
+ closeButton.setToolTipText("Close tab");
534493 closeButton.addActionListener(this);
535494 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
536495 //clearButton.addActionListener(this);
....@@ -633,17 +592,91 @@
633592 radio.layout = sevenButton;
634593 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
635594 }
595
+
596
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
597
+ {
598
+ //constraints.gridx = 0;
599
+ //constraints.gridy = 0;
600
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
601
+ fastCB.setToolTipText("Fast mode");
602
+ fastCB.addItemListener(this);
603
+ //constraints.gridy += 1;
604
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
605
+ supportCB.setToolTipText("Enabled rigging");
606
+ supportCB.addItemListener(this);
607
+
608
+ // constraints.gridy += 1;
609
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
610
+ // localCB.addItemListener(this);
611
+
612
+ //constraints.gridy += 1;
613
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
614
+ crowdCB.setToolTipText("Used for crowds");
615
+ crowdCB.addItemListener(this);
616
+
617
+ //constraints.gridy += 1;
618
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
619
+ smoothCB.setToolTipText("Snapping delay");
620
+ smoothCB.addItemListener(this);
621
+
622
+ //constraints.gridy += 1;
623
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
624
+ slowCB.setToolTipText("Smooth interpolation");
625
+ slowCB.addItemListener(this);
626
+ //constraints.gridy += 1;
627
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
628
+ boxCB.setToolTipText("Display bounding boxes");
629
+ boxCB.addItemListener(this);
630
+ //constraints.gridy += 1;
631
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
632
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
633
+ zoomBoxCB.addItemListener(this);
634
+
635
+// constraints.gridy += 1;
636
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
637
+// speakerMocapCB.addItemListener(this);
638
+
639
+ if (false)
640
+ {
641
+ // handled in scripts
642
+ //constraints.gridy += 1;
643
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
644
+ speakerCameraCB.addItemListener(this);
645
+
646
+ //constraints.gridy += 1;
647
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
648
+ speakerFocusCB.addItemListener(this);
649
+
650
+ //constraints.gridy += 1;
651
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
652
+ smoothfocusCB.addItemListener(this);
653
+ }
654
+
655
+//constraints.gridx += 1;
656
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
657
+// debugCB.addItemListener(this);
658
+
659
+ //constraints.gridy += 1;
660
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
661
+ oeilCB.addItemListener(this);
662
+
663
+ //constraints.gridy += 1;
664
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
665
+ lookAtCB.setToolTipText("Look-at target");
666
+ lookAtCB.addItemListener(this);
667
+
668
+ }
636669
637670 void EditObject(Object3D obj)
638671 {
639
- cRadio dummyButton = new cRadio(obj.name);
640
- dummyButton.SetObject(obj);
641
- dummyButton.layout = sevenButton;
642
- dummyButton.SetCamera(cameraView.renderCamera, false);
643
- dummyButton.addActionListener(this);
644
- radioPanel.add(dummyButton);
645
- buttonGroup.add(dummyButton);
646
- dummyButton.doClick();
672
+ cRadio radioButton = new cRadio(obj.name);
673
+ radioButton.SetObject(obj);
674
+ radioButton.layout = sevenButton;
675
+ radioButton.SetCamera(cameraView.renderCamera, false);
676
+ radioButton.addActionListener(this);
677
+ radioPanel.add(radioButton);
678
+ buttonGroup.add(radioButton);
679
+ radioButton.doClick();
647680 }
648681 void SetupViews(ObjEditor oe)
649682 {
....@@ -663,6 +696,7 @@
663696 JCheckBox fastCB;
664697 JCheckBox slowCB;
665698 JCheckBox boxCB;
699
+ JCheckBox zoomBoxCB;
666700 JCheckBox trackCB;
667701 JCheckBox smoothfocusCB;
668702 // JCheckBox speakerMocapCB;
....@@ -705,8 +739,7 @@
705739 dropAttributes |= Object3D.TEXTURE;
706740 else
707741 dropAttributes &= ~Object3D.TEXTURE;
708
- }
709
- else if(e.getSource() == liveCB)
742
+ } else if(e.getSource() == liveCB)
710743 {
711744 cameraView.ToggleLive();
712745 }
....@@ -743,6 +776,10 @@
743776 Recompile();
744777 cameraView.repaint();
745778 // refreshContents();
779
+ }
780
+ else if(e.getSource() == zoomBoxCB)
781
+ {
782
+ cameraView.ToggleZoomBoxMode();
746783 }
747784 else if(e.getSource() == smoothfocusCB)
748785 {
....@@ -1033,6 +1070,8 @@
10331070 torusItem.addActionListener(this);
10341071 superItem = menu.add(new MenuItem("Superellipsoid"));
10351072 superItem.addActionListener(this);
1073
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1074
+ kleinItem.addActionListener(this);
10361075 particleItem = menu.add(new MenuItem("Particle system"));
10371076 particleItem.addActionListener(this);
10381077 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1106,6 +1145,8 @@
11061145 resetParentItem.addActionListener(this);
11071146 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11081147 repairParentItem.addActionListener(this);
1148
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1149
+ repairShadowItem.addActionListener(this);
11091150 menu.add(invariantsItem = new MenuItem("Invariants"));
11101151 invariantsItem.addActionListener(this);
11111152 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1441,9 +1482,9 @@
14411482
14421483 void Overwrite(int mask)
14431484 {
1444
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1485
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
14451486 {
1446
- Object3D content = GraphreeD.clipboard.get(0);
1487
+ Object3D content = GrafreeD.clipboard.get(0);
14471488
14481489 if (content instanceof cGroup && ((cGroup)content).transientlink )
14491490 content = ((cGroup)content).get(0);
....@@ -1466,6 +1507,7 @@
14661507 //
14671508 public void actionPerformed(ActionEvent event) // , Object arg)
14681509 {
1510
+ Object source = event.getSource();
14691511 /*
14701512 if (event.getSource() == nameField)
14711513 {
....@@ -1477,11 +1519,11 @@
14771519 }
14781520 else
14791521 */
1480
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1522
+ if (source == lookAtItem || source == lookFromItem)
14811523 {
14821524 ScreenFit();
14831525 } else
1484
- if (event.getSource() == switchItem)
1526
+ if (source == switchItem)
14851527 {
14861528 cVector v1 = new cVector();
14871529 cVector v2 = new cVector();
....@@ -1490,11 +1532,11 @@
14901532 objEditor.cameraView.renderCamera.setAim(v2, v1);
14911533 objEditor.cameraView.repaint();
14921534 } else
1493
- if (event.getSource() == rectoidItem)
1535
+ if (source == rectoidItem)
14941536 {
14951537 makeSomething(new Box());
14961538 } else
1497
- if (event.getSource() == particleItem)
1539
+ if (source == particleItem)
14981540 {
14991541 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15001542 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1515,9 +1557,9 @@
15151557 applyExample(particleGeom, "SMOKE");
15161558 makeSomething(particleGeom);
15171559 } else
1518
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1560
+ if (source == ragdollItem || source == ragdoll2Item)
15191561 {
1520
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1562
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15211563
15221564 ragdoll.toParent = LA.newMatrix();
15231565 ragdoll.fromParent = LA.newMatrix();
....@@ -1535,7 +1577,7 @@
15351577 } else
15361578 /*
15371579 */
1538
- if (event.getSource() == heightFieldItem)
1580
+ if (source == heightFieldItem)
15391581 {
15401582 Object3D obj = new Object3D();
15411583
....@@ -1573,27 +1615,31 @@
15731615
15741616 makeSomething(obj);
15751617 } else
1576
- if (event.getSource() == gridItem)
1618
+ if (source == gridItem)
15771619 {
15781620 makeSomething(new Grid());
15791621 } else
1580
- if (event.getSource() == ellipsoidItem)
1622
+ if (source == ellipsoidItem)
15811623 {
15821624 makeSomething(new Sphere());
15831625 } else
1584
- if (event.getSource() == coneItem)
1626
+ if (source == coneItem)
15851627 {
15861628 makeSomething(new Cone());
15871629 } else
1588
- if (event.getSource() == torusItem)
1630
+ if (source == torusItem)
15891631 {
15901632 makeSomething(new Torus());
15911633 } else
1592
- if (event.getSource() == superItem)
1634
+ if (source == superItem)
15931635 {
15941636 makeSomething(new Superellipsoid());
15951637 } else
1596
- if (event.getSource() == blobItem)
1638
+ if (source == kleinItem)
1639
+ {
1640
+ makeSomething(new Klein());
1641
+ } else
1642
+ if (source == blobItem)
15971643 {
15981644 Blob blob = new Blob();
15991645 BlobComponent comp = new BlobComponent();
....@@ -1601,15 +1647,15 @@
16011647 //blob.retile();
16021648 makeSomething(blob);
16031649 } else
1604
- if (event.getSource() == latheItem)
1650
+ if (source == latheItem)
16051651 {
16061652 makeSomething(new Lathe());
16071653 } else
1608
- if (event.getSource() == bezierItem)
1654
+ if (source == bezierItem)
16091655 {
16101656 makeSomething(new BezierSurface());
16111657 } else
1612
- if (event.getSource() == checkerItem)
1658
+ if (source == checkerItem)
16131659 {
16141660 /*
16151661 Object3D obj = new BezierSurface(5,8);
....@@ -1624,7 +1670,7 @@
16241670 */
16251671 makeSomething(new Checker());
16261672 } else
1627
- if (event.getSource() == meshItem)
1673
+ if (source == meshItem)
16281674 {
16291675 Object3D itemtomake = new Object3D();
16301676 Object3D child;
....@@ -1645,35 +1691,35 @@
16451691 makeSomething(child);
16461692 }
16471693 } else
1648
- if (event.getSource() == springItem)
1694
+ if (source == springItem)
16491695 {
16501696 cSpring s = new cSpring();
16511697 s.setup();
16521698 makeSomething(s);
16531699 } else
1654
- if (event.getSource() == flagItem)
1700
+ if (source == flagItem)
16551701 {
16561702 cSpring s = new cFlag();
16571703 s.setup();
16581704 makeSomething(s);
16591705 } else
1660
- if (event.getSource() == lightItem)
1706
+ if (source == lightItem)
16611707 {
16621708 makeSomething(new Light());
16631709 } else
1664
- if (event.getSource() == csgItem)
1710
+ if (source == csgItem)
16651711 {
16661712 group(new CSG());
16671713 } else
1668
- if (event.getSource() == templateItem)
1714
+ if (source == templateItem)
16691715 {
16701716 group(new cTemplate());
16711717 } else
1672
- if (event.getSource() == attributeItem)
1718
+ if (source == attributeItem)
16731719 {
16741720 makeSomething(new Attribute());
16751721 } else
1676
- if (event.getSource() == pointflowItem)
1722
+ if (source == pointflowItem)
16771723 {
16781724 makeSomething(new PointFlow());
16791725 } else
....@@ -1685,7 +1731,7 @@
16851731 } else
16861732 */
16871733
1688
- if (event.getSource() == superLoopItem)
1734
+ if (source == superLoopItem)
16891735 {
16901736 Composite g = new cGroup();
16911737 for (int i=0; i<15; i++)
....@@ -1707,7 +1753,7 @@
17071753
17081754 group(g);
17091755 } else
1710
- if (event.getSource() == loopItem)
1756
+ if (source == loopItem)
17111757 {
17121758 Composite csg = new GroupLeaf();
17131759 csg.count = 5;
....@@ -1716,7 +1762,7 @@
17161762 csg.addChild(child);
17171763 child.addChild(csg);
17181764 } else
1719
- if (event.getSource() == doubleItem)
1765
+ if (source == doubleItem)
17201766 {
17211767 Composite csg = new GroupLeaf();
17221768 csg.count = 5;
....@@ -1728,7 +1774,7 @@
17281774 csg.addChild(child);
17291775 child.addChild(csg);
17301776 } else
1731
- if (event.getSource() == tripleItem)
1777
+ if (source == tripleItem)
17321778 {
17331779 Composite csg = new GroupLeaf();
17341780 csg.count = 4;
....@@ -1744,70 +1790,70 @@
17441790 child.addChild(csg);
17451791 } else
17461792
1747
- if (event.getSource() == importGFDItem)
1793
+ if (source == importGFDItem)
17481794 {
17491795 ImportGFD();
17501796 } else
1751
- if (event.getSource() == importVRMLX3DItem)
1797
+ if (source == importVRMLX3DItem)
17521798 {
17531799 ImportVRMLX3D();
17541800 } else
1755
- if (event.getSource() == import3DSItem)
1801
+ if (source == import3DSItem)
17561802 {
17571803 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17581804 } else
1759
- if (event.getSource() == importOBJItem)
1805
+ if (source == importOBJItem)
17601806 {
17611807 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17621808 } else
1763
- if (event.getSource() == computeAOItem)
1809
+ if (source == computeAOItem)
17641810 {
1765
- CameraPane.drawMode = CameraPane.OCCLUSION;
1766
- CameraPane.theRenderer.repaint();
1811
+ Globals.drawMode = CameraPane.OCCLUSION;
1812
+ Globals.theRenderer.repaint();
17671813 } else
1768
- if (event.getSource() == recompileItem)
1814
+ if (source == recompileItem)
17691815 {
17701816 Recompile();
17711817 refreshContents();
17721818 } else
1773
- if (event.getSource() == editScriptItem)
1819
+ if (source == editScriptItem)
17741820 {
17751821 OpenDialog();
17761822 refreshContents();
17771823 } else
1778
- if (event.getSource() == invariantsItem)
1824
+ if (source == invariantsItem)
17791825 {
17801826 System.out.println("Invariants:");
1781
- GraphreeD.theApplet3D.universe.invariants();
1827
+ GrafreeD.grafreeD.universe.invariants();
17821828 } else
1783
- if (event.getSource() == memoryItem)
1829
+ if (source == memoryItem)
17841830 {
17851831 //System.out.println("Invariants:");
17861832 PrintMemory();
17871833 } else
1788
- if (event.getSource() == pathItem)
1834
+ if (source == pathItem)
17891835 {
17901836 PrintPath();
17911837 } else
1792
- if (event.getSource() == analyzeItem)
1838
+ if (source == analyzeItem)
17931839 {
17941840 AnalyzeObject();
17951841 } else
1796
- if (event.getSource() == dumpItem)
1842
+ if (source == dumpItem)
17971843 {
17981844 DumpObject();
17991845 } else
1800
- if (event.getSource() == screenfitButton)
1846
+ if (source == screenfitButton)
18011847 {
18021848 //Reload(lastConverter, lastFilename, true);
18031849 ScreenFit();
18041850 } else
1805
- if (event.getSource() == screenfitpointButton)
1851
+ if (source == screenfitpointButton)
18061852 {
18071853 //Reload(lastConverter, lastFilename, true);
18081854 ScreenFitPoint();
18091855 } else
1810
- if (event.getSource() == snapobjectButton)
1856
+ if (source == snapobjectButton)
18111857 {
18121858 //Reload(lastConverter, lastFilename, true);
18131859 SnapObject();
....@@ -1818,13 +1864,13 @@
18181864 // Recompile();
18191865 // refreshContents();
18201866 // } else
1821
- if (event.getSource() == gcButton)
1867
+ if (source == gcButton)
18221868 {
18231869 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18241870 System.gc();
18251871 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261872 } else
1827
- if (event.getSource() == editLeafItem)
1873
+ if (source == editLeafItem)
18281874 {
18291875 Object3D obj;
18301876 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1838,65 +1884,66 @@
18381884 }
18391885 refreshContents(true);
18401886 } else
1841
- if (event.getSource() == openWindowItem)
1887
+ if (source == openWindowItem)
18421888 {
18431889 EditSelection(true);
18441890 } else
1845
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1891
+ if (source == cutItem || source == clearButton)
18461892 {
18471893 loadClipboard(true);
18481894 } else
1849
- if (event.getSource() == duplicateItem)
1895
+ if (source == duplicateItem)
18501896 {
1851
- Object3D keep = GraphreeD.clipboard;
1897
+ Object3D keep = GrafreeD.clipboard;
18521898 loadClipboard(false);
18531899 paste(false);
1854
- GraphreeD.clipboard = keep;
1900
+ GrafreeD.clipboard = keep;
18551901 } else
1856
- if (event.getSource() == cloneItem)
1902
+ if (source == cloneItem)
18571903 {
18581904 CloneSelection(false);
18591905 } else
1860
- if (event.getSource() == cloneSupportItem)
1906
+ if (source == cloneSupportItem)
18611907 {
18621908 CloneSelection(true);
18631909 } else
1864
- if (event.getSource() == copyItem)
1910
+ if (source == copyItem)
18651911 {
18661912 loadClipboard(false);
18671913 } else
1868
- if (event.getSource() == pasteItem)
1914
+ if (source == pasteItem)
18691915 {
18701916 paste(false);
18711917 } else
1872
- if (event.getSource() == pasteLinkItem)
1918
+ if (source == pasteLinkItem)
18731919 {
18741920 pasteInto(false);
18751921 } else
1876
- if (event.getSource() == pasteCloneItem)
1922
+ if (source == pasteCloneItem)
18771923 {
18781924 pasteInto(true);
18791925 } else
1880
- if (event.getSource() == pasteExpandItem)
1926
+ if (source == pasteExpandItem)
18811927 {
18821928 paste(true);
18831929 } else
1884
- if (event.getSource() == synchronizeItem)
1930
+ if (source == synchronizeItem)
18851931 {
18861932 Overwrite(Object3D.TRANSFORM);
18871933 } else
1888
- if (event.getSource() == overwriteNameItem)
1934
+ if (source == overwriteNameItem)
18891935 {
18901936 Overwrite(Object3D.NAME);
18911937 } else
1892
- if (event.getSource() == overwriteUVItem)
1938
+ if (source == overwriteUVItem)
18931939 {
18941940 Overwrite(Object3D.UV);
18951941 } else
1896
- if (event.getSource() == overwriteMatItem)
1942
+ if (source == overwriteMatItem)
18971943 {
1944
+ /* july 2015
18981945 if ((dropAttributes & Object3D.TEXTURE) == 0)
1899
- Overwrite(Object3D.MATERIAL);
1946
+ Overwrite(Object3D.MATERIAL | Object3D.COLOR);
19001947 else
19011948 {
19021949 if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0)
....@@ -1908,13 +1955,16 @@
19081955 Overwrite(Object3D.MATERIAL | Object3D.TEXTURE);
19091956 }
19101957 }
1958
+ */
1959
+
1960
+ Overwrite(dropAttributes);
19111961 }
1912
- if (event.getSource() == overwriteGeoItem)
1962
+ if (source == overwriteGeoItem)
19131963 {
19141964 Overwrite(Object3D.GEOMETRY);
1915
-// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1965
+// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
19161966 // {
1917
-// Object3D content = GraphreeD.clipboard.get(0);
1967
+// Object3D content = GrafreeD.clipboard.get(0);
19181968 //
19191969 // if (content instanceof cGroup && ((cGroup)content).transientlink )
19201970 // content = ((cGroup)content).get(0);
....@@ -1926,7 +1976,7 @@
19261976 // refreshContents();
19271977 // }
19281978 } else
1929
- if (event.getSource() == generateMeshItem)
1979
+ if (source == generateMeshItem)
19301980 {
19311981 //if (group.selection.size() == 1)
19321982 // for (int i=0; i<group.selection.size(); i++)
....@@ -1937,7 +1987,7 @@
19371987 ResetModel();
19381988 refreshContents();
19391989 } else
1940
- if (event.getSource() == extractGeometriesItem)
1990
+ if (source == extractGeometriesItem)
19411991 {
19421992 boolean one = false;
19431993
....@@ -1964,7 +2014,7 @@
19642014 ResetModel();
19652015 refreshContents();
19662016 } else
1967
- if (event.getSource() == cloneGeometriesItem)
2017
+ if (source == cloneGeometriesItem)
19682018 {
19692019 boolean one = false;
19702020
....@@ -1990,32 +2040,37 @@
19902040 ResetModel();
19912041 refreshContents();
19922042 } else
1993
- if (event.getSource() == shareGeometriesItem)
2043
+ if (source == shareGeometriesItem)
19942044 {
19952045 boolean one = false;
19962046
19972047 if (group.selection.size() == 1)
19982048 one = true;
19992049
2050
+ Object3D merge = null;
2051
+
20002052 Object3D content = new cGroup();
20012053
20022054 for (int i=0; i<group.selection.size(); i++)
20032055 {
2004
- Object3D sel = new Merge(group.selection.get(i));
2056
+ merge = new Merge(group.selection.get(i));
20052057
20062058 if (one)
2007
- makeSomething(sel, false);
2059
+ makeSomething(merge, false);
20082060 else
2009
- content.addChild(sel);
2061
+ content.addChild(merge);
20102062 }
20112063
20122064 if (!one)
2013
- makeSomething(content, false);
2014
-
2015
- ResetModel();
2016
- refreshContents();
2065
+ makeSomething(content, true);
2066
+ else
2067
+ {
2068
+ ResetModel();
2069
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2070
+ refreshContents();
2071
+ }
20172072 } else
2018
- if (event.getSource() == mergeGeometriesItem)
2073
+ if (source == mergeGeometriesItem)
20192074 {
20202075 boolean one = false;
20212076
....@@ -2045,11 +2100,11 @@
20452100 ResetModel();
20462101 refreshContents();
20472102 } else
2048
- if (event.getSource() == linkverticesItem)
2103
+ if (source == linkverticesItem)
20492104 {
2050
-// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2105
+// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20512106 // {
2052
-// Object3D content = GraphreeD.clipboard.get(0);
2107
+// Object3D content = GrafreeD.clipboard.get(0);
20532108 //
20542109 // if (content instanceof cGroup && ((cGroup)content).transientlink )
20552110 // content = ((cGroup)content).get(0);
....@@ -2058,14 +2113,14 @@
20582113 // group.selection.get(0).setMasterThis(content); // should be identity
20592114 // refreshContents();
20602115 // }
2061
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2116
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
20622117 {
2063
- Object3D content = GraphreeD.clipboard.get(0);
2118
+ Object3D content = GrafreeD.clipboard.get(0);
20642119
20652120 if (content instanceof cGroup && ((cGroup)content).transientlink )
20662121 content = ((cGroup)content).get(0);
20672122
2068
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2123
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20692124 for (int i=0; i<group.selection.size(); i++)
20702125 {
20712126 boolean random = CameraPane.RANDOM;
....@@ -2074,11 +2129,11 @@
20742129 // group.selection.get(i).setMasterThis(content); // should be identity
20752130 CameraPane.RANDOM = random;
20762131 }
2077
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2132
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20782133 refreshContents();
20792134 }
20802135 } else
2081
- if (event.getSource() == resetsupportItem)
2136
+ if (source == resetsupportItem)
20822137 {
20832138 for (int i=0; i<group.selection.size(); i++)
20842139 {
....@@ -2090,7 +2145,16 @@
20902145
20912146 refreshContents();
20922147 } else
2093
- if (event.getSource() == resetreferencesItem)
2148
+ if (source == relinkverticesItem)
2149
+ {
2150
+ boolean random = CameraPane.RANDOM;
2151
+ CameraPane.RANDOM = false; // parse all random nodes
2152
+ group.selection.RelinkToSupport();
2153
+ CameraPane.RANDOM = random;
2154
+
2155
+ refreshContents();
2156
+ } else
2157
+ if (source == resetreferencesItem)
20942158 {
20952159 for (int i=0; i<group.selection.size(); i++)
20962160 {
....@@ -2099,11 +2163,11 @@
20992163
21002164 refreshContents();
21012165 } else
2102
- if (event.getSource() == setMasterItem)
2166
+ if (source == setMasterItem)
21032167 {
2104
- if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2168
+ if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21052169 {
2106
- Object3D content = GraphreeD.clipboard.get(0);
2170
+ Object3D content = GrafreeD.clipboard.get(0);
21072171
21082172 if (content instanceof cGroup && ((cGroup)content).transientlink )
21092173 content = ((cGroup)content).get(0);
....@@ -2112,13 +2176,13 @@
21122176 refreshContents();
21132177 }
21142178 } else
2115
- if (event.getSource() == poseMeshItem)
2179
+ if (source == poseMeshItem)
21162180 {
21172181 if (group.selection.size() == 1)
21182182 {
2119
- if (GraphreeD.clipboard.size() == 1)
2183
+ if (GrafreeD.clipboard.size() == 1)
21202184 {
2121
- Object3D content = GraphreeD.clipboard.get(0);
2185
+ Object3D content = GrafreeD.clipboard.get(0);
21222186
21232187 if (content instanceof cGroup && ((cGroup)content).transientlink )
21242188 content = ((cGroup)content).get(0);
....@@ -2131,19 +2195,19 @@
21312195 }
21322196
21332197 } else
2134
- if (event.getSource() == revertMeshItem)
2198
+ if (source == revertMeshItem)
21352199 {
21362200 RevertMeshes();
21372201 } else
2138
- if (event.getSource() == resetMeshItem)
2202
+ if (source == resetMeshItem)
21392203 {
21402204 ResetAll();
21412205 } else
2142
- if (event.getSource() == stepAllItem)
2206
+ if (source == stepAllItem)
21432207 {
21442208 StepAll();
21452209 } else
2146
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2210
+ if (source == clearItem) // || event.getSource() == clearButton)
21472211 {
21482212 //int indices[] = jList.getSelectedIndices();
21492213 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2151,42 +2215,46 @@
21512215
21522216 ClearSelection(false);
21532217 } else
2154
- if (event.getSource() == clearAllItem)
2218
+ if (source == clearAllItem)
21552219 {
21562220 ClearSelection(true);
21572221 } else
2158
- if (event.getSource() == grabItem)
2222
+ if (source == grabItem)
21592223 {
21602224 group(new cGroup(), true);
21612225 } else
2162
- if (event.getSource() == frontItem)
2226
+ if (source == hideItem)
2227
+ {
2228
+ group(new HiddenObject());
2229
+ } else
2230
+ if (source == frontItem)
21632231 {
21642232 front();
21652233 } else
2166
- if (event.getSource() == backItem)
2234
+ if (source == backItem)
21672235 {
21682236 back();
21692237 } else
2170
- if (event.getSource() == cameraItem)
2238
+ if (source == cameraItem)
21712239 {
21722240 makeSomething(new Camera());
21732241 } else
2174
- if (event.getSource() == compositeItem)
2242
+ if (source == compositeItem)
21752243 {
21762244 group(new Composite());
21772245 } else
2178
- if (event.getSource() == randomItem)
2246
+ if (source == randomItem)
21792247 {
21802248 RandomNode random = new RandomNode();
21812249 group(random);
21822250 if (random.size() > 0)
21832251 random.name = random.get(0).name + "Rnd";
21842252 } else
2185
- if (event.getSource() == physicsItem)
2253
+ if (source == physicsItem)
21862254 {
21872255 group(new PhysicsNode());
21882256 } else
2189
- if (event.getSource() == frameselectorItem)
2257
+ if (source == frameselectorItem)
21902258 {
21912259 for (int i=0; i<group.selection.size(); i++)
21922260 {
....@@ -2198,7 +2266,7 @@
21982266 ResetModel();
21992267 refreshContents();
22002268 } else
2201
- if (event.getSource() == switchGeoItem)
2269
+ if (source == switchGeoItem)
22022270 {
22032271 for (int i=0; i<group.selection.size(); i++)
22042272 {
....@@ -2210,7 +2278,7 @@
22102278 ResetModel();
22112279 refreshContents();
22122280 } else
2213
- if (event.getSource() == switchTransfoItem)
2281
+ if (source == switchTransfoItem)
22142282 {
22152283 for (int i=0; i<group.selection.size(); i++)
22162284 {
....@@ -2222,7 +2290,7 @@
22222290 ResetModel();
22232291 refreshContents();
22242292 } else
2225
- if (event.getSource() == morphItem)
2293
+ if (source == morphItem)
22262294 {
22272295 for (int i=0; i<group.selection.size(); i++)
22282296 {
....@@ -2234,7 +2302,7 @@
22342302 ResetModel();
22352303 refreshContents();
22362304 } else
2237
- if (event.getSource() == scriptNodeItem)
2305
+ if (source == scriptNodeItem)
22382306 {
22392307 boolean atleastone = false;
22402308
....@@ -2273,195 +2341,215 @@
22732341 }
22742342 }
22752343 } else
2276
- if (event.getSource() == linkerItem)
2344
+ if (source == linkerItem)
22772345 {
22782346 group(new cLinker());
22792347 } else
2280
- if (event.getSource() == textureItem)
2348
+ if (source == textureItem)
22812349 {
22822350 group(new TextureNode());
22832351 } else
2284
- if (event.getSource() == shadowXItem)
2352
+ if (source == billboardItem)
2353
+ {
2354
+ group(new BillboardNode());
2355
+ } else
2356
+ if (source == shadowXItem)
22852357 {
22862358 CastShadow(0);
22872359 } else
2288
- if (event.getSource() == shadowYItem)
2360
+ if (source == shadowYItem)
22892361 {
22902362 CastShadow(1);
22912363 } else
2292
- if (event.getSource() == shadowZItem)
2364
+ if (source == shadowZItem)
22932365 {
22942366 CastShadow(2);
22952367 } else
2296
- if (event.getSource() == ungroupItem)
2368
+ if (source == ungroupItem)
22972369 {
2298
- ungroup();
2370
+ //ungroup();
2371
+ for (int i=0; i<group.selection.size(); i++)
2372
+ {
2373
+ Ungroup(group.selection.get(i));
2374
+ }
2375
+
2376
+ ClearSelection(false);
2377
+
2378
+ refreshContents();
22992379 } else
2300
- if (event.getSource() == genUVItem)
2380
+ if (source == genUVItem)
23012381 {
23022382 GenUV();
23032383 } else
2304
- if (event.getSource() == genNormalsCADItem)
2384
+ if (source == genNormalsCADItem)
23052385 {
23062386 GenNormals(true);
23072387 } else
2308
- if (event.getSource() == genNormalsORGANItem)
2388
+ if (source == genNormalsMESHItem)
2389
+ {
2390
+ GenNormals(true); // TODO
2391
+ } else
2392
+ if (source == genNormalsORGANItem)
23092393 {
23102394 GenNormals(false);
23112395 } else
2312
- if (event.getSource() == stripifyItem)
2396
+ if (source == genNormalsMINEItem)
2397
+ {
2398
+ GenNormalsMINE();
2399
+ } else
2400
+ if (source == stripifyItem)
23132401 {
23142402 Stripify();
23152403 } else
2316
- if (event.getSource() == unstripifyItem)
2404
+ if (source == unstripifyItem)
23172405 {
23182406 Unstripify();
23192407 } else
2320
- if (event.getSource() == trimItem)
2408
+ if (source == trimItem)
23212409 {
23222410 Trim();
23232411 } else
2324
- if (event.getSource() == untrimItem)
2412
+ if (source == untrimItem)
23252413 {
23262414 Untrim();
23272415 } else
2328
- if (event.getSource() == clearColorsItem)
2416
+ if (source == clearColorsItem)
23292417 {
23302418 ClearColors();
23312419 } else
2332
- if (event.getSource() == clearMaterialsItem)
2420
+ if (source == clearMaterialsItem)
23332421 {
23342422 ClearMaterials();
23352423 } else
2336
- if (event.getSource() == liveleavesItem)
2424
+ if (source == liveleavesItem)
23372425 {
23382426 LiveLeaves(true);
23392427 } else
2340
- if (event.getSource() == unliveleavesItem)
2428
+ if (source == unliveleavesItem)
23412429 {
23422430 LiveLeaves(false);
23432431 } else
2344
- if (event.getSource() == supportleavesItem)
2432
+ if (source == supportleavesItem)
23452433 {
23462434 SupportLeaves(true);
23472435 } else
2348
- if (event.getSource() == unsupportleavesItem)
2436
+ if (source == unsupportleavesItem)
23492437 {
23502438 SupportLeaves(false);
23512439 } else
2352
- if (event.getSource() == hideleavesItem)
2440
+ if (source == hideleavesItem)
23532441 {
23542442 HideLeaves(true);
23552443 } else
2356
- if (event.getSource() == showleavesItem)
2444
+ if (source == showleavesItem)
23572445 {
23582446 HideLeaves(false);
23592447 } else
2360
- if (event.getSource() == markleavesItem)
2448
+ if (source == markleavesItem)
23612449 {
23622450 MarkLeaves(true);
23632451 } else
2364
- if (event.getSource() == unmarkleavesItem)
2452
+ if (source == unmarkleavesItem)
23652453 {
23662454 MarkLeaves(false);
23672455 } else
2368
- if (event.getSource() == flipVItem)
2456
+ if (source == flipVItem)
23692457 {
23702458 FlipV(true);
23712459 } else
2372
- if (event.getSource() == unflipVItem)
2460
+ if (source == unflipVItem)
23732461 {
23742462 FlipV(false);
23752463 } else
2376
- if (event.getSource() == lowTexturesItem)
2464
+ if (source == lowTexturesItem)
23772465 {
23782466 SetTexRes(0);
23792467 } else
2380
- if (event.getSource() == normalTexturesItem)
2468
+ if (source == normalTexturesItem)
23812469 {
23822470 SetTexRes(1);
23832471 } else
2384
- if (event.getSource() == highTexturesItem)
2472
+ if (source == highTexturesItem)
23852473 {
23862474 SetTexRes(2);
23872475 } else
2388
- if (event.getSource() == veryhighTexturesItem)
2476
+ if (source == veryhighTexturesItem)
23892477 {
23902478 SetTexRes(3);
23912479 } else
2392
- if (event.getSource() == maxTexturesItem)
2480
+ if (source == maxTexturesItem)
23932481 {
23942482 SetTexRes(4);
23952483 } else
2396
- if (event.getSource() == panoTexturesItem)
2484
+ if (source == panoTexturesItem)
23972485 {
23982486 SetTexRes(5);
23992487 } else
2400
- if (event.getSource() == reverseNormalsItem)
2488
+ if (source == reverseNormalsItem)
24012489 {
24022490 ReverseNormals();
24032491 } else
2404
- if (event.getSource() == parseverticesItem)
2492
+ if (source == parseverticesItem)
24052493 {
24062494 ParseVertices();
24072495 } else
2408
- if (event.getSource() == textureFieldItem)
2496
+ if (source == textureFieldItem)
24092497 {
24102498 TextureVertices();
24112499 } else
2412
- if (event.getSource() == alignItem)
2500
+ if (source == alignItem)
24132501 {
24142502 Align();
24152503 } else
2416
- if (event.getSource() == mirrorItem)
2504
+ if (source == mirrorItem)
24172505 {
24182506 MirrorPoses();
24192507 } else
2420
- if (event.getSource() == reduceMorphItem)
2508
+ if (source == reduceMorphItem)
24212509 {
24222510 MeshReduction(false);
24232511 } else
2424
- if (event.getSource() == reduce34MorphItem)
2512
+ if (source == reduce34MorphItem)
24252513 {
24262514 MeshReduction(true);
24272515 } else
2428
- if (event.getSource() == reverseTrianglesItem)
2516
+ if (source == reverseTrianglesItem)
24292517 {
24302518 ReverseTriangles();
24312519 } else
2432
- if (event.getSource() == reduceMeshItem)
2520
+ if (source == reduceMeshItem)
24332521 {
24342522 ReduceMesh(false);
24352523 } else
2436
- if (event.getSource() == reduce34MeshItem)
2524
+ if (source == reduce34MeshItem)
24372525 {
24382526 ReduceMesh(true);
24392527 } else
2440
- if (event.getSource() == increaseMeshItem)
2528
+ if (source == increaseMeshItem)
24412529 {
24422530 IncreaseMesh();
24432531 } else
2444
- if (event.getSource() == clipMeshItem)
2532
+ if (source == clipMeshItem)
24452533 {
24462534 ClipMesh();
24472535 } else
2448
- if (event.getSource() == smoothMeshItem)
2536
+ if (source == smoothMeshItem)
24492537 {
24502538 SmoothMesh();
24512539 } else
2452
- if (event.getSource() == transformgeometryItem)
2540
+ if (source == transformgeometryItem)
24532541 {
24542542 TransformGeometry();
24552543 } else
2456
- if (event.getSource() == resetTransformItem)
2544
+ if (source == resetTransformItem)
24572545 {
24582546 ResetTransform();
24592547 } else
2460
- if (event.getSource() == resetCentroidItem)
2548
+ if (source == resetCentroidItem)
24612549 {
24622550 ResetCentroid();
24632551 } else
2464
- if (event.getSource() == resetParentItem)
2552
+ if (source == resetParentItem)
24652553 {
24662554 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24672555 {
....@@ -2471,7 +2559,7 @@
24712559
24722560 refreshContents();
24732561 } else
2474
- if (event.getSource() == repairParentItem)
2562
+ if (source == repairParentItem)
24752563 {
24762564 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24772565 {
....@@ -2485,7 +2573,21 @@
24852573
24862574 refreshContents();
24872575 } else
2488
- if (event.getSource() == sortbysizeItem)
2576
+ if (source == repairShadowItem)
2577
+ {
2578
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2579
+ {
2580
+ Object3D obj = (Object3D)e.nextElement();
2581
+ obj.RepairShadow();
2582
+// for (int i=0; i<obj.size(); i++)
2583
+// {
2584
+// obj.get(i).parent = obj;
2585
+// }
2586
+ }
2587
+
2588
+ refreshContents();
2589
+ } else
2590
+ if (source == sortbysizeItem)
24892591 {
24902592 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24912593 {
....@@ -2497,7 +2599,7 @@
24972599 ResetModel();
24982600 refreshContents();
24992601 } else
2500
- if (event.getSource() == sortbynameItem)
2602
+ if (source == sortbynameItem)
25012603 {
25022604 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25032605 {
....@@ -2509,7 +2611,7 @@
25092611 ResetModel();
25102612 refreshContents();
25112613 } else
2512
- if (event.getSource() == attachPigmentItem)
2614
+ if (source == attachPigmentItem)
25132615 {
25142616 String texture = GetFile("Attach pigment");
25152617 Object3D obj;
....@@ -2521,7 +2623,7 @@
25212623
25222624 refreshContents();
25232625 } else
2524
- if (event.getSource() == detachPigmentItem)
2626
+ if (source == detachPigmentItem)
25252627 {
25262628 Object3D obj;
25272629 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2532,7 +2634,7 @@
25322634
25332635 refreshContents();
25342636 } else
2535
- if (event.getSource() == attachBumpItem)
2637
+ if (source == attachBumpItem)
25362638 {
25372639 String texture = GetFile("Attach bump");
25382640 Object3D obj;
....@@ -2544,7 +2646,7 @@
25442646
25452647 refreshContents();
25462648 } else
2547
- if (event.getSource() == detachBumpItem)
2649
+ if (source == detachBumpItem)
25482650 {
25492651 Object3D obj;
25502652 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2555,7 +2657,7 @@
25552657
25562658 refreshContents();
25572659 } else
2558
- if (event.getSource() == pigmentBumpItem)
2660
+ if (source == pigmentBumpItem)
25592661 {
25602662 Object3D obj;
25612663 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2566,158 +2668,195 @@
25662668
25672669 refreshContents();
25682670 } else
2569
- if (event.getSource() == flashSelectionButton)
2671
+ if (source == flashSelectionButton)
25702672 {
25712673 CameraPane.flash = true;
25722674 refreshContents();
25732675 } else
2574
- if (event.getSource() == oneButton)
2676
+ if (source == oneButton)
25752677 {
25762678 } else
2577
- if (event.getSource() == twoButton)
2679
+ if (source == twoButton)
25782680 {
25792681 radio.layout = twoButton;
25802682 // bug
25812683 //gridPanel.setDividerLocation(1.0);
25822684 //bigPanel.setDividerLocation(0.0);
2583
- bigThree.remove(jtp);
2584
- bigThree.remove(cameraPanel);
2585
- bigThree.remove(XYZPanel);
2586
- aWindowConstraints.gridx = 0;
2587
- aWindowConstraints.gridy = 0;
2588
- aWindowConstraints.gridwidth = 1;
2589
- // aConstraints.gridheight = 3;
2590
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2591
- aWindowConstraints.weightx = 0;
2592
- aWindowConstraints.weighty = 1;
2593
- //bigThree.add(jtp, aWindowConstraints);
2594
- aWindowConstraints.weightx = 1;
2595
- aWindowConstraints.gridwidth = 3;
2596
- // aConstraints.gridheight = 3;
2597
- aWindowConstraints.gridx = 1;
2598
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2599
- bigThree.add(cameraPanel, aWindowConstraints);
2600
- aWindowConstraints.weightx = 0;
2601
- aWindowConstraints.gridx = 4;
2602
- aWindowConstraints.gridwidth = 1;
2603
- // aConstraints.gridheight = 3;
2604
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2605
- //bigThree.add(XYZPanel, aWindowConstraints);
2606
- bigThree.revalidate();
2685
+// bigThree.remove(scenePanel);
2686
+// bigThree.remove(centralPanel);
2687
+// bigThree.remove(XYZPanel);
2688
+// aWindowConstraints.gridx = 0;
2689
+// aWindowConstraints.gridy = 0;
2690
+// aWindowConstraints.gridwidth = 1;
2691
+// // aConstraints.gridheight = 3;
2692
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2693
+// aWindowConstraints.weightx = 0;
2694
+// aWindowConstraints.weighty = 1;
2695
+// //bigThree.add(jtp, aWindowConstraints);
2696
+// aWindowConstraints.weightx = 1;
2697
+// aWindowConstraints.gridwidth = 3;
2698
+// // aConstraints.gridheight = 3;
2699
+// aWindowConstraints.gridx = 1;
2700
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2701
+// bigThree.add(centralPanel, aWindowConstraints);
2702
+// aWindowConstraints.weightx = 0;
2703
+// aWindowConstraints.gridx = 4;
2704
+// aWindowConstraints.gridwidth = 1;
2705
+// // aConstraints.gridheight = 3;
2706
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2707
+// //bigThree.add(XYZPanel, aWindowConstraints);
2708
+// scenePanel.setVisible(false);
2709
+// centralPanel.setVisible(true);
2710
+// XYZPanel.setVisible(false);
2711
+ bigThree.ClearUI();
2712
+ bigThree.add(centralPanel);
2713
+ bigThree.FlushUI();
26072714 } else
2608
- if (event.getSource() == threeButton)
2715
+ if (source == threeButton)
26092716 {
26102717 radio.layout = threeButton;
2611
- bigThree.remove(jtp);
2612
- bigThree.remove(cameraPanel);
2613
- bigThree.remove(XYZPanel);
2614
- aWindowConstraints.gridx = 0;
2615
- aWindowConstraints.gridy = 0;
2616
- aWindowConstraints.gridwidth = 1;
2617
- // aConstraints.gridheight = 3;
2618
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2619
- aWindowConstraints.weightx = 0;
2620
- aWindowConstraints.weighty = 1;
2621
- //bigThree.add(jtp, aWindowConstraints);
2622
- aWindowConstraints.weightx = 1;
2623
- aWindowConstraints.gridwidth = 3;
2624
- // aConstraints.gridheight = 3;
2625
- aWindowConstraints.gridx = 1;
2626
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2627
- bigThree.add(cameraPanel, aWindowConstraints);
2628
- aWindowConstraints.weightx = 0;
2629
- aWindowConstraints.gridx = 4;
2630
- aWindowConstraints.gridwidth = 1;
2631
- // aConstraints.gridheight = 3;
2632
- aConstraints.fill = GridBagConstraints.VERTICAL;
2633
- bigThree.add(XYZPanel, aWindowConstraints);
2634
- bigThree.revalidate();
2718
+
2719
+// bigThree.remove(scenePanel);
2720
+// bigThree.remove(centralPanel);
2721
+// bigThree.remove(XYZPanel);
2722
+// aWindowConstraints.gridx = 0;
2723
+// aWindowConstraints.gridy = 0;
2724
+// aWindowConstraints.gridwidth = 1;
2725
+// // aConstraints.gridheight = 3;
2726
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2727
+// aWindowConstraints.weightx = 0;
2728
+// aWindowConstraints.weighty = 1;
2729
+// //bigThree.add(jtp, aWindowConstraints);
2730
+// aWindowConstraints.weightx = 1;
2731
+// aWindowConstraints.gridwidth = 3;
2732
+// // aConstraints.gridheight = 3;
2733
+// aWindowConstraints.gridx = 1;
2734
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2735
+// bigThree.add(centralPanel, aWindowConstraints);
2736
+// aWindowConstraints.weightx = 0;
2737
+// aWindowConstraints.gridx = 4;
2738
+// aWindowConstraints.gridwidth = 1;
2739
+// // aConstraints.gridheight = 3;
2740
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2741
+// bigThree.add(XYZPanel, aWindowConstraints);
2742
+// bigThree.validate();
2743
+// scenePanel.setVisible(false);
2744
+// centralPanel.setVisible(true);
2745
+// XYZPanel.setVisible(true);
2746
+ bigThree.ClearUI();
2747
+ bigThree.add(centralPanel);
2748
+ bigThree.add(XYZPanel);
2749
+ bigThree.FlushUI();
26352750 } else
2636
- if (event.getSource() == fourButton)
2751
+ if (source == fourButton)
26372752 {
26382753 radio.layout = fourButton;
2639
- bigThree.remove(jtp);
2640
- bigThree.remove(cameraPanel);
2641
- bigThree.remove(XYZPanel);
2642
- aWindowConstraints.gridx = 0;
2643
- aWindowConstraints.gridy = 0;
2644
- aWindowConstraints.gridwidth = 1;
2645
- // aWindowConstraints.gridheight = 3;
2646
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2647
- aWindowConstraints.weightx = 1;
2648
- aWindowConstraints.weighty = 1;
2649
- bigThree.add(jtp, aWindowConstraints);
2650
- aWindowConstraints.weightx = 1;
2651
- aWindowConstraints.gridwidth = 3;
2652
- // aConstraints.gridheight = 3;
2653
- aWindowConstraints.gridx = 1;
2654
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2655
- //bigThree.add(cameraPanel, aWindowConstraints);
2656
- aWindowConstraints.weightx = 0;
2657
- aWindowConstraints.gridx = 4;
2658
- aWindowConstraints.gridwidth = 1;
2659
- // aWindowConstraints.gridheight = 3;
2660
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2661
- //bigThree.add(XYZPanel, aWindowConstraints);
2662
- bigThree.revalidate();
2754
+
2755
+// bigThree.remove(scenePanel);
2756
+// bigThree.remove(centralPanel);
2757
+// bigThree.remove(XYZPanel);
2758
+// aWindowConstraints.gridx = 0;
2759
+// aWindowConstraints.gridy = 0;
2760
+// aWindowConstraints.gridwidth = 1;
2761
+// // aWindowConstraints.gridheight = 3;
2762
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2763
+// aWindowConstraints.weightx = 1;
2764
+// aWindowConstraints.weighty = 1;
2765
+// bigThree.add(scenePanel, aWindowConstraints);
2766
+// aWindowConstraints.weightx = 1;
2767
+// aWindowConstraints.gridwidth = 3;
2768
+// // aConstraints.gridheight = 3;
2769
+// aWindowConstraints.gridx = 1;
2770
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2771
+// //bigThree.add(cameraPanel, aWindowConstraints);
2772
+// aWindowConstraints.weightx = 0;
2773
+// aWindowConstraints.gridx = 4;
2774
+// aWindowConstraints.gridwidth = 1;
2775
+// // aWindowConstraints.gridheight = 3;
2776
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2777
+// //bigThree.add(XYZPanel, aWindowConstraints);
2778
+// bigThree.validate();
2779
+// scenePanel.setVisible(true);
2780
+// centralPanel.setVisible(false);
2781
+// XYZPanel.setVisible(false);
2782
+ bigThree.ClearUI();
2783
+ bigThree.add(scenePanel);
2784
+ bigThree.FlushUI();
26632785 } else
2664
- if (event.getSource() == sixButton)
2786
+ if (source == sixButton)
26652787 {
26662788 radio.layout = sixButton;
2667
- bigThree.remove(jtp);
2668
- bigThree.remove(cameraPanel);
2669
- bigThree.remove(XYZPanel);
2670
- aWindowConstraints.gridx = 0;
2671
- aWindowConstraints.gridy = 0;
2672
- aWindowConstraints.gridwidth = 1;
2673
- // aConstraints.gridheight = 3;
2674
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2675
- aWindowConstraints.weightx = 0;
2676
- aWindowConstraints.weighty = 1;
2677
- bigThree.add(jtp, aWindowConstraints);
2678
- aWindowConstraints.weightx = 1;
2679
- aWindowConstraints.gridwidth = 3;
2680
- // aWindowConstraints.gridheight = 3;
2681
- aWindowConstraints.gridx = 1;
2682
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2683
- bigThree.add(cameraPanel, aWindowConstraints);
2684
- aWindowConstraints.weightx = 0;
2685
- aWindowConstraints.gridx = 4;
2686
- aWindowConstraints.gridwidth = 1;
2687
- // aWindowConstraints.gridheight = 3;
2688
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2689
- //bigThree.add(XYZPanel, aConstraints);
2690
- bigThree.revalidate();
2789
+
2790
+// bigThree.remove(scenePanel);
2791
+// bigThree.remove(centralPanel);
2792
+// bigThree.remove(XYZPanel);
2793
+// aWindowConstraints.gridx = 0;
2794
+// aWindowConstraints.gridy = 0;
2795
+// aWindowConstraints.gridwidth = 1;
2796
+// // aConstraints.gridheight = 3;
2797
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2798
+// aWindowConstraints.weightx = 0;
2799
+// aWindowConstraints.weighty = 1;
2800
+// bigThree.add(scenePanel, aWindowConstraints);
2801
+// aWindowConstraints.weightx = 1;
2802
+// aWindowConstraints.gridwidth = 3;
2803
+// // aWindowConstraints.gridheight = 3;
2804
+// aWindowConstraints.gridx = 1;
2805
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2806
+// bigThree.add(centralPanel, aWindowConstraints);
2807
+// aWindowConstraints.weightx = 0;
2808
+// aWindowConstraints.gridx = 4;
2809
+// aWindowConstraints.gridwidth = 1;
2810
+// // aWindowConstraints.gridheight = 3;
2811
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2812
+// //bigThree.add(XYZPanel, aConstraints);
2813
+// bigThree.validate();
2814
+// scenePanel.setVisible(true);
2815
+// centralPanel.setVisible(true);
2816
+// XYZPanel.setVisible(false);
2817
+ bigThree.ClearUI();
2818
+ bigThree.add(scenePanel);
2819
+ bigThree.add(centralPanel);
2820
+ bigThree.FlushUI();
26912821 } else
2692
- if (event.getSource() == sevenButton)
2822
+ if (source == sevenButton)
26932823 {
26942824 radio.layout = sevenButton;
2695
- bigThree.remove(jtp);
2696
- bigThree.remove(cameraPanel);
2697
- bigThree.remove(XYZPanel);
2698
- aWindowConstraints.gridx = 0;
2699
- aWindowConstraints.gridy = 0;
2700
- aWindowConstraints.gridwidth = 1;
2701
- // aWindowConstraints.gridheight = 3;
2702
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2703
- aWindowConstraints.weightx = 0;
2704
- aWindowConstraints.weighty = 1;
2705
- bigThree.add(jtp, aWindowConstraints);
2706
- aWindowConstraints.weightx = 1;
2707
- aWindowConstraints.gridwidth = 3;
2708
- // aWindowConstraints.gridheight = 3;
2709
- aWindowConstraints.gridx = 1;
2710
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2711
- bigThree.add(cameraPanel, aWindowConstraints);
2712
- aWindowConstraints.weightx = 0;
2713
- aWindowConstraints.gridx = 4;
2714
- aWindowConstraints.gridwidth = 1;
2715
- // aConstraints.gridheight = 3;
2716
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2717
- bigThree.add(XYZPanel, aWindowConstraints);
2718
- bigThree.revalidate();
2825
+
2826
+// bigThree.remove(scenePanel);
2827
+// bigThree.remove(centralPanel);
2828
+// bigThree.remove(XYZPanel);
2829
+// aWindowConstraints.gridx = 0;
2830
+// aWindowConstraints.gridy = 0;
2831
+// aWindowConstraints.gridwidth = 1;
2832
+// // aWindowConstraints.gridheight = 3;
2833
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2834
+// aWindowConstraints.weightx = 0;
2835
+// aWindowConstraints.weighty = 1;
2836
+// bigThree.add(scenePanel, aWindowConstraints);
2837
+// aWindowConstraints.weightx = 1;
2838
+// aWindowConstraints.gridwidth = 3;
2839
+// // aWindowConstraints.gridheight = 3;
2840
+// aWindowConstraints.gridx = 1;
2841
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2842
+// bigThree.add(centralPanel, aWindowConstraints);
2843
+// aWindowConstraints.weightx = 0;
2844
+// aWindowConstraints.gridx = 4;
2845
+// aWindowConstraints.gridwidth = 1;
2846
+// // aConstraints.gridheight = 3;
2847
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2848
+// bigThree.add(XYZPanel, aWindowConstraints);
2849
+// bigThree.validate();
2850
+// scenePanel.setVisible(true);
2851
+// centralPanel.setVisible(true);
2852
+// XYZPanel.setVisible(true);
2853
+ bigThree.ClearUI();
2854
+ bigThree.add(scenePanel);
2855
+ bigThree.add(centralPanel);
2856
+ bigThree.add(XYZPanel);
2857
+ bigThree.FlushUI();
27192858 } else
2720
- if (event.getSource() == rootButton)
2859
+ if (source == rootButton)
27212860 {
27222861 Object3D obj;
27232862 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2729,7 +2868,7 @@
27292868
27302869 refreshContents(true);
27312870 } else
2732
- if (event.getSource() == closeButton)
2871
+ if (source == closeButton)
27332872 {
27342873 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27352874 cRadio ab;
....@@ -2750,11 +2889,11 @@
27502889 }
27512890 refreshContents(true);
27522891 } else
2753
- if (event.getSource() == editItem || event.getSource() == editButton)
2892
+ if (source == editItem || source == editButton)
27542893 {
27552894 EditSelection(false);
27562895 } else
2757
- if (event.getSource() == uneditButton)
2896
+ if (source == uneditButton)
27582897 {
27592898 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27602899 {
....@@ -2766,12 +2905,12 @@
27662905
27672906 child.editWindow = null; // ???????????
27682907 }
2769
- objEditor.ctrlPanel.revalidate();
2908
+ objEditor.ctrlPanel.validate();
27702909 //objEditor.jTree.clearSelection();
27712910 //objEditor.ResetSliders();
27722911 refreshContents(true);
27732912 } else
2774
- if (event.getSource() == clearPanelButton)
2913
+ if (source == clearPanelButton)
27752914 {
27762915 assert(copy == group);
27772916 //copy.ClearUI();
....@@ -2782,7 +2921,7 @@
27822921 listUI.clear();
27832922 refreshContents(true);
27842923 } else
2785
- if (event.getSource() == allParamsButton)
2924
+ if (source == allParamsButton)
27862925 {
27872926 assert(copy == group);
27882927
....@@ -2803,19 +2942,19 @@
28032942
28042943 refreshContents(true);
28052944 } else
2806
- if (event.getSource() == unselectButton)
2945
+ if (source == unselectButton)
28072946 {
28082947 objEditor.jTree.clearSelection();
2809
- // ?? oct 2012 GraphreeD.clipboard.clear();
2948
+ // ?? oct 2012 GrafreeD.clipboard.clear();
28102949 objEditor.ResetSliders();
28112950 refreshContents(true);
28122951 } else
2813
- if(event.getSource() instanceof cRadio)
2952
+ if(source instanceof cRadio)
28142953 {
28152954 group.parent = keepparent;
28162955 group.attributes = 0;
28172956 //group.editWindow = null;
2818
- /*cRadio*/ radio = (cRadio)event.getSource();
2957
+ /*cRadio*/ radio = (cRadio)source;
28192958 Object3D obj = radio.GetObject();
28202959 System.out.println("Edit " + obj);
28212960 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2835,7 +2974,7 @@
28352974 }
28362975
28372976 copy = group;
2838
- //CameraPane.theRenderer.object = group;
2977
+ //Globals.theRenderer.object = group;
28392978 if(!useclient)
28402979 {
28412980 cameraView.renderCamera = radio.camera;
....@@ -2844,7 +2983,8 @@
28442983 cameraView.cameras[cameraView.cameracount] = radio.camera;
28452984 cameraView.targetLookAt.set(radio.camera.lookAt);
28462985 cameraView.object = group;
2847
- cameraView.lighttouched = true;
2986
+ //cameraView.lighttouched = true;
2987
+ Globals.lighttouched = true;
28482988 topView.object = group;
28492989 frontView.object = group;
28502990 sideView.object = group;
....@@ -2880,7 +3020,7 @@
28803020 if (useclient)
28813021 {
28823022 cameraView.object = client;
2883
- cameraView.lighttouched = true;
3023
+ Globals.lighttouched = true;
28843024 //topView.object = client;
28853025 //frontView.object = client;
28863026 //sideView.object = client;
....@@ -2888,7 +3028,7 @@
28883028 else
28893029 {
28903030 cameraView.object = group;
2891
- cameraView.lighttouched = true;
3031
+ Globals.lighttouched = true;
28923032 //topView.object = group;
28933033 //frontView.object = group;
28943034 //sideView.object = group;
....@@ -3121,9 +3261,9 @@
31213261 obj = (Object3D)e.nextElement();
31223262
31233263 System.out.println("Object is: " + obj);
3124
- GraphreeD.AnalyzeObject(obj);
3264
+ GrafreeD.AnalyzeObject(obj);
31253265 System.out.println("Boundary rep: " + obj.bRep);
3126
- GraphreeD.AnalyzeObject(obj.bRep);
3266
+ GrafreeD.AnalyzeObject(obj.bRep);
31273267
31283268 // System.err.println((size/1024) + " KB is the size of " + obj);
31293269 }
....@@ -3165,6 +3305,13 @@
31653305 void GenNormals(boolean crease)
31663306 {
31673307 group.GenNormalsS(crease);
3308
+
3309
+ refreshContents();
3310
+ }
3311
+
3312
+ void GenNormalsMINE()
3313
+ {
3314
+ group.selection.GenNormalsMINE();
31683315
31693316 refreshContents();
31703317 }
....@@ -3250,7 +3397,7 @@
32503397 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
32513398 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
32523399 //
3253
-// g.add(GraphreeD.clipboard);
3400
+// g.add(GrafreeD.clipboard);
32543401 //
32553402 // buffer.add(g);
32563403 // }
....@@ -3269,8 +3416,8 @@
32693416 // nodes = new Object3D();
32703417 // vertices = new Vector<Vertex>();
32713418 //
3272
-// boolean epsequal = GraphreeD.epsequal;
3273
-// GraphreeD.epsequal = true;
3419
+// boolean epsequal = GrafreeD.epsequal;
3420
+// GrafreeD.epsequal = true;
32743421 //
32753422 // for (int i=0; i<group.selection.size(); i++)
32763423 // {
....@@ -3311,7 +3458,7 @@
33113458 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33123459 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33133460 //
3314
-// g.add(GraphreeD.clipboard);
3461
+// g.add(GrafreeD.clipboard);
33153462 //
33163463 // buffer.add(g);
33173464 // }
....@@ -3319,7 +3466,7 @@
33193466 // makeSomething(buffer, i==group.selection.size()-1);
33203467 // }
33213468 //
3322
-// GraphreeD.epsequal = epsequal;
3469
+// GrafreeD.epsequal = epsequal;
33233470 //
33243471 // //buffer = null;
33253472 // temprep = null;
....@@ -3330,8 +3477,8 @@
33303477
33313478 void ParseVertices()
33323479 {
3333
- boolean epsequal = GraphreeD.epsequal;
3334
- GraphreeD.epsequal = true;
3480
+ boolean epsequal = GrafreeD.epsequal;
3481
+ GrafreeD.epsequal = true;
33353482
33363483 for (int i=0; i<group.selection.size(); i++)
33373484 {
....@@ -3356,7 +3503,7 @@
33563503 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33573504 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33583505
3359
- g.add(GraphreeD.clipboard);
3506
+ g.add(GrafreeD.clipboard);
33603507
33613508 buffer.add(g);
33623509 }
....@@ -3371,7 +3518,7 @@
33713518 makeSomething(buffer, i==group.selection.size()-1);
33723519 }
33733520
3374
- GraphreeD.epsequal = epsequal;
3521
+ GrafreeD.epsequal = epsequal;
33753522
33763523 refreshContents();
33773524 }
....@@ -3389,7 +3536,7 @@
33893536 String pigment = Object3D.GetPigment(tex);
33903537 //String bump = Object3D.GetBump(tex);
33913538
3392
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3539
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
33933540
33943541 double s = v.s;
33953542
....@@ -3416,7 +3563,7 @@
34163563 scale /= 3;
34173564
34183565 scale /= 0xFF;
3419
- scale /= 4;
3566
+ // c'est quoi ca? scale /= 4;
34203567
34213568 //v.AO = scale;
34223569
....@@ -3437,12 +3584,26 @@
34373584
34383585 void Align()
34393586 {
3587
+ if (group.selection.size() == 0)
3588
+ return;
3589
+
3590
+ cVector bbmin = new cVector();
3591
+ cVector bbmax = new cVector();
3592
+
3593
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3594
+
3595
+ double dx = bbmax.x - bbmin.x;
3596
+ double dy = bbmax.y - bbmin.y;
3597
+ double dz = bbmax.z - bbmin.z;
3598
+
3599
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3600
+
34403601 for (int i=0; i<group.selection.size(); i++)
34413602 {
34423603 Object3D obj = group.selection.get(i);
34433604
3444
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3445
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3605
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3606
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34463607 }
34473608
34483609 refreshContents();
....@@ -3455,7 +3616,7 @@
34553616 // ref.SaveSupports();
34563617 // Object3D par = ref.parent;
34573618 // ref.parent = null;
3458
-// Object3D lowres = (Object3D) GraphreeD.clone(ref);
3619
+// Object3D lowres = (Object3D) GrafreeD.clone(ref);
34593620 // ref.parent = par;
34603621 // ref.RestoreSupports();
34613622
....@@ -3485,7 +3646,7 @@
34853646 // lowres.SaveSupports();
34863647 // par = lowres.parent;
34873648 // lowres.parent = null;
3488
-// Object3D newlow = (Object3D) GraphreeD.clone(lowres);
3649
+// Object3D newlow = (Object3D) GrafreeD.clone(lowres);
34893650 Object3D newlow = CloneObject(lowres, false);
34903651 newlow.name = sn.switchobject.get(i).name;
34913652 System.out.println(" pose#" + i + " = " + newlow);
....@@ -3507,7 +3668,7 @@
35073668 return;
35083669
35093670 Object3D poses = group.selection.get(0);
3510
- Object3D ref = GraphreeD.clipboard.get(0);
3671
+ Object3D ref = GrafreeD.clipboard.get(0);
35113672
35123673 Object3D newgroup = new Object3D("Po:" + poses.name);
35133674
....@@ -3676,7 +3837,7 @@
36763837 group.selection.RelinkToSupport(); // july 2014
36773838 System.out.println("DONE.");
36783839 refreshContents();
3679
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3840
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36803841 }
36813842
36823843 void ReduceMesh(boolean reduction34)
....@@ -3701,20 +3862,20 @@
37013862
37023863 void ClipMesh()
37033864 {
3704
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
3865
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
37053866 {
3706
- Object3D content = GraphreeD.clipboard.get(0);
3867
+ Object3D content = GrafreeD.clipboard.get(0);
37073868
37083869 if (content instanceof cGroup && ((cGroup)content).transientlink )
37093870 content = ((cGroup)content).get(0);
37103871
37113872 // for (int i=0; i<group.selection.size(); i++)
37123873 // {
3713
-// group.selection.get(i).ClipMesh(GraphreeD.clipboard);
3874
+// group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37143875 // }
3715
- group.selection.ClipMesh(GraphreeD.clipboard);
3876
+ group.selection.ClipMesh(GrafreeD.clipboard);
37163877 }
3717
-// group.selection.ClipMesh(GraphreeD.clipboard);
3878
+// group.selection.ClipMesh(GrafreeD.clipboard);
37183879 System.out.println("DONE.");
37193880 refreshContents();
37203881 }
....@@ -3961,16 +4122,16 @@
39614122
39624123 objEditor.SetText(); // jan 2014
39634124
3964
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4125
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
39654126 CameraPane.flash = true;
39664127
39674128 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39684129 // a camera
39694130 {
39704131 CameraPane.camerachangeframe = 0; // don't refuse it
3971
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
3972
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
3973
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4132
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4133
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4134
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39744135 }
39754136
39764137 refreshContents();
....@@ -4052,12 +4213,12 @@
40524213 {
40534214 if (group.selection.isEmpty())
40544215 return;
4055
- GraphreeD.clipboardIsTempGroup = false;
4216
+ GrafreeD.clipboardIsTempGroup = false;
40564217 Composite tGroup = null;
40574218 if (group.selection.size() > 0) // 1)
40584219 {
40594220 tGroup = new cGroup();
4060
- GraphreeD.clipboardIsTempGroup = true;
4221
+ GrafreeD.clipboardIsTempGroup = true;
40614222 }
40624223
40634224 if (cut)
....@@ -4097,16 +4258,16 @@
40974258 //System.out.println("cut " + child);
40984259 //System.out.println("parent = " + child.parent);
40994260 // tmp.addChild(child);
4100
- if (GraphreeD.clipboardIsTempGroup)
4261
+ if (GrafreeD.clipboardIsTempGroup)
41014262 tGroup.add/*Child*/(tmp);
41024263 else
4103
- GraphreeD.clipboard = tmp;
4264
+ GrafreeD.clipboard = tmp;
41044265 }
41054266 else
4106
- if (GraphreeD.clipboardIsTempGroup)
4267
+ if (GrafreeD.clipboardIsTempGroup)
41074268 tGroup.add/*Child*/(child);
41084269 else
4109
- GraphreeD.clipboard = child;
4270
+ GrafreeD.clipboard = child;
41104271 }
41114272
41124273 //ResetModel();
....@@ -4138,21 +4299,21 @@
41384299 //System.out.println("cut " + elem);
41394300 //System.out.println("parent = " + elem.parent);
41404301 // tmp.addChild(elem);
4141
- if (GraphreeD.clipboardIsTempGroup)
4302
+ if (GrafreeD.clipboardIsTempGroup)
41424303 tGroup.add/*Child*/(tmp);
41434304 else
4144
- GraphreeD.clipboard = tmp;
4305
+ GrafreeD.clipboard = tmp;
41454306 }
41464307 else
4147
- if (GraphreeD.clipboardIsTempGroup)
4308
+ if (GrafreeD.clipboardIsTempGroup)
41484309 tGroup.add/*Child*/(child);
41494310 else
4150
- GraphreeD.clipboard = child;
4311
+ GrafreeD.clipboard = child;
41514312 }
41524313
41534314 }
4154
- if (GraphreeD.clipboardIsTempGroup)
4155
- GraphreeD.clipboard = tGroup;
4315
+ if (GrafreeD.clipboardIsTempGroup)
4316
+ GrafreeD.clipboard = tGroup;
41564317 if (cut)
41574318 {
41584319 ResetModel();
....@@ -4162,11 +4323,11 @@
41624323
41634324 void paste(boolean expand)
41644325 {
4165
- // if (GraphreeD.clipboard == null)
4326
+ // if (GrafreeD.clipboard == null)
41664327 // return;
41674328 boolean first = true;
41684329
4169
- if (GraphreeD.clipboardIsTempGroup)
4330
+ if (GrafreeD.clipboardIsTempGroup)
41704331 {
41714332 Composite temp;
41724333
....@@ -4177,7 +4338,7 @@
41774338 temp = (Composite)Applet3D.clipboard.deepCopy();
41784339 */
41794340 Object3D elem;
4180
- for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4341
+ for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41814342 {
41824343 Object3D child = (Object3D)e.nextElement();
41834344
....@@ -4191,7 +4352,7 @@
41914352 else
41924353 elem = child.deepCopy(); // ?
41934354 child.parent = keepparent;
4194
- //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
4355
+ //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
41954356 // elem = elem.get(0);
41964357 makeSomething(elem, true); // ?? first);
41974358 //group.addChild(elem);
....@@ -4211,14 +4372,14 @@
42114372 //Object3D cb = Applet3D.clipboard;
42124373 //temp.addChild(cb);
42134374 //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());
4375
+ assert(GrafreeD.clipboard.parent == null);
4376
+ Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4377
+ GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4378
+ if (LA.isIdentity(GrafreeD.clipboard.toParent))
4379
+ makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
42194380 else
4220
- makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy());
4221
- GraphreeD.clipboard.get(0).parent = keepparent;
4381
+ makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4382
+ GrafreeD.clipboard.get(0).parent = keepparent;
42224383 }
42234384
42244385 ResetModel();
....@@ -4227,7 +4388,7 @@
42274388
42284389 void pasteInto(boolean copyit)
42294390 {
4230
-// if (GraphreeD.clipboard == null)
4391
+// if (GrafreeD.clipboard == null)
42314392 // return;
42324393
42334394 if (group.selection.size() != 1)
....@@ -4260,9 +4421,9 @@
42604421 {
42614422 boolean first = true;
42624423
4263
- if (GraphreeD.clipboardIsTempGroup)
4424
+ if (GrafreeD.clipboardIsTempGroup)
42644425 {
4265
- Composite temp = (Composite)GraphreeD.clipboard;
4426
+ Composite temp = (Composite)GrafreeD.clipboard;
42664427 Object3D copy;
42674428 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42684429 {
....@@ -4272,7 +4433,7 @@
42724433 }
42734434 } else
42744435 {
4275
- linkSomething(GraphreeD.clipboard); //.get(0));
4436
+ linkSomething(GrafreeD.clipboard); //.get(0));
42764437 }
42774438 }
42784439 }
....@@ -4464,6 +4625,26 @@
44644625 makeSomething(csg);
44654626 }
44664627
4628
+ void Ungroup(Object3D g)
4629
+ {
4630
+ if (g instanceof HiddenObject)
4631
+ {
4632
+ HiddenObject h = (HiddenObject) g;
4633
+
4634
+ for (int i=0; i<h.ActualSize(); i++)
4635
+ {
4636
+ objEditor.makeSomething(h.get(i), false);
4637
+ }
4638
+ }
4639
+ else
4640
+ {
4641
+ for (int i=0; i<g.Size(); i++)
4642
+ {
4643
+ objEditor.makeSomething(g.get(i), false);
4644
+ }
4645
+ }
4646
+ }
4647
+
44674648 void ungroup()
44684649 {
44694650 /*
....@@ -4659,7 +4840,7 @@
46594840
46604841 void ImportGFD()
46614842 {
4662
- FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD);
4843
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
46634844 browser.show();
46644845 String filename = browser.getFile();
46654846 if (filename != null && filename.length() > 0)
....@@ -4697,7 +4878,7 @@
46974878
46984879 void ImportVRMLX3D()
46994880 {
4700
- if (GraphreeD.standAlone)
4881
+ if (GrafreeD.standAlone)
47014882 {
47024883 /**/
47034884 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4714,7 +4895,7 @@
47144895
47154896 String GetFile(String dialogName)
47164897 {
4717
- if (GraphreeD.standAlone)
4898
+ if (GrafreeD.standAlone)
47184899 {
47194900 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47204901 browser.show();
....@@ -4823,6 +5004,7 @@
48235004 private MenuItem resetsupportItem;
48245005 private MenuItem resetreferencesItem;
48255006 private MenuItem linkverticesItem;
5007
+ private MenuItem relinkverticesItem;
48265008 private MenuItem setMasterItem;
48275009 private MenuItem resetMeshItem;
48285010 private MenuItem stepAllItem;
....@@ -4841,8 +5023,10 @@
48415023 private MenuItem clearItem;
48425024 private MenuItem clearAllItem;
48435025 private MenuItem genUVItem;
5026
+ private MenuItem genNormalsMESHItem;
48445027 private MenuItem genNormalsCADItem;
48455028 private MenuItem genNormalsORGANItem;
5029
+ private MenuItem genNormalsMINEItem;
48465030 private MenuItem stripifyItem;
48475031 private MenuItem unstripifyItem;
48485032 private MenuItem trimItem;
....@@ -4884,6 +5068,7 @@
48845068 private MenuItem resetCentroidItem;
48855069 private MenuItem transformgeometryItem;
48865070 private MenuItem resetTransformItem;
5071
+ private MenuItem hideItem;
48875072 private MenuItem grabItem;
48885073 private MenuItem backItem;
48895074 private MenuItem frontItem;
....@@ -4904,6 +5089,7 @@
49045089
49055090 private MenuItem resetParentItem;
49065091 private MenuItem repairParentItem;
5092
+ private MenuItem repairShadowItem;
49075093 private MenuItem sortbysizeItem;
49085094 private MenuItem sortbynameItem;
49095095
....@@ -4924,6 +5110,7 @@
49245110 private MenuItem coneItem;
49255111 private MenuItem torusItem;
49265112 private MenuItem superItem;
5113
+ private MenuItem kleinItem;
49275114 private MenuItem blobItem;
49285115 private MenuItem latheItem;
49295116 private MenuItem bezierItem;
....@@ -4936,6 +5123,7 @@
49365123 private MenuItem csgItem;
49375124 private MenuItem templateItem;
49385125 private MenuItem textureItem;
5126
+ private MenuItem billboardItem;
49395127 private MenuItem shadowXItem;
49405128 private MenuItem shadowYItem;
49415129 private MenuItem shadowZItem;