Normand Briere
2019-05-01 504890a7b930ab6b853c49de825ae848e0535339
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);
....@@ -424,76 +435,24 @@
424435 oe.buttonGroup.add(dummyButton);
425436 */
426437 aConstraints.gridy += 1;
438
+
439
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
440
+
427441 oe.aConstraints.gridwidth = 1;
428442 oe.aConstraints.gridx = 0;
429443
430
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
444
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
445
+ liveCB.setToolTipText("Enabled animation");
431446 liveCB.addItemListener(this);
432447
433448 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);
449
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
450
+ trackCB.setToolTipText("Enable tracking");
493451 trackCB.addItemListener(this);
494452
495453 oe.aConstraints.gridx += 1;
496454 oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
455
+ screenfitButton.setToolTipText("Screen fit");
497456 screenfitButton.addActionListener(this);
498457 oe.aConstraints.gridx += 1;
499458 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
....@@ -501,6 +460,7 @@
501460 // oe.aConstraints.gridx += 1;
502461 oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
503462 snapobjectButton.addActionListener(this);
463
+ snapobjectButton.setToolTipText("Snap Object");
504464 oe.aConstraints.gridx += 1;
505465
506466 //aConstraints.gridx = 0;
....@@ -509,28 +469,39 @@
509469 oe.aConstraints.gridwidth = 1;
510470
511471 oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
472
+ flashSelectionButton.setToolTipText("Show selection");
512473 flashSelectionButton.addActionListener(this);
474
+
475
+ oe.toolbarPanel.add(new cButton(" ", false));
476
+
513477 oe.aConstraints.gridx += 1;
514478 oe.aConstraints.weighty = 0;
515479 oe.aConstraints.gridwidth = 1;
516480
517481 //
518482 oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
483
+ twoButton.setToolTipText("Show center view only");
519484 twoButton.addActionListener(this);
520485 oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
521486 fourButton.addActionListener(this);
487
+ fourButton.setToolTipText("Show left panel only");
522488 oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
489
+ sixButton.setToolTipText("2-column layout left");
523490 sixButton.addActionListener(this);
524491 oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
492
+ threeButton.setToolTipText("2-column layout right");
525493 threeButton.addActionListener(this);
526494 oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
495
+ sevenButton.setToolTipText("3-column layout");
527496 sevenButton.addActionListener(this);
528497 //
529498
530
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
499
+ oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
500
+ rootButton.setToolTipText("Edit object in new tab");
531501 rootButton.addActionListener(this);
532502 oe.aConstraints.gridx += 1;
533503 oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
504
+ closeButton.setToolTipText("Close tab");
534505 closeButton.addActionListener(this);
535506 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
536507 //clearButton.addActionListener(this);
....@@ -633,17 +604,91 @@
633604 radio.layout = sevenButton;
634605 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
635606 }
607
+
608
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
609
+ {
610
+ //constraints.gridx = 0;
611
+ //constraints.gridy = 0;
612
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
613
+ fastCB.setToolTipText("Fast mode");
614
+ fastCB.addItemListener(this);
615
+ //constraints.gridy += 1;
616
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
617
+ supportCB.setToolTipText("Enabled rigging");
618
+ supportCB.addItemListener(this);
619
+
620
+ // constraints.gridy += 1;
621
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
622
+ // localCB.addItemListener(this);
623
+
624
+ //constraints.gridy += 1;
625
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
626
+ crowdCB.setToolTipText("Used for crowds");
627
+ crowdCB.addItemListener(this);
628
+
629
+ //constraints.gridy += 1;
630
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
631
+ smoothCB.setToolTipText("Snapping delay");
632
+ smoothCB.addItemListener(this);
633
+
634
+ //constraints.gridy += 1;
635
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
636
+ slowCB.setToolTipText("Smooth interpolation");
637
+ slowCB.addItemListener(this);
638
+ //constraints.gridy += 1;
639
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
640
+ boxCB.setToolTipText("Display bounding boxes");
641
+ boxCB.addItemListener(this);
642
+ //constraints.gridy += 1;
643
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
644
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
645
+ zoomBoxCB.addItemListener(this);
646
+
647
+// constraints.gridy += 1;
648
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
649
+// speakerMocapCB.addItemListener(this);
650
+
651
+ if (false)
652
+ {
653
+ // handled in scripts
654
+ //constraints.gridy += 1;
655
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
656
+ speakerCameraCB.addItemListener(this);
657
+
658
+ //constraints.gridy += 1;
659
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
660
+ speakerFocusCB.addItemListener(this);
661
+
662
+ //constraints.gridy += 1;
663
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
664
+ smoothfocusCB.addItemListener(this);
665
+ }
666
+
667
+//constraints.gridx += 1;
668
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
669
+// debugCB.addItemListener(this);
670
+
671
+ //constraints.gridy += 1;
672
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
673
+ oeilCB.addItemListener(this);
674
+
675
+ //constraints.gridy += 1;
676
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
677
+ lookAtCB.setToolTipText("Look-at target");
678
+ lookAtCB.addItemListener(this);
679
+
680
+ }
636681
637682 void EditObject(Object3D obj)
638683 {
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();
684
+ cRadio radioButton = new cRadio(obj.name);
685
+ radioButton.SetObject(obj);
686
+ radioButton.layout = sevenButton;
687
+ radioButton.SetCamera(cameraView.renderCamera, false);
688
+ radioButton.addActionListener(this);
689
+ radioPanel.add(radioButton);
690
+ buttonGroup.add(radioButton);
691
+ radioButton.doClick();
647692 }
648693 void SetupViews(ObjEditor oe)
649694 {
....@@ -663,6 +708,7 @@
663708 JCheckBox fastCB;
664709 JCheckBox slowCB;
665710 JCheckBox boxCB;
711
+ JCheckBox zoomBoxCB;
666712 JCheckBox trackCB;
667713 JCheckBox smoothfocusCB;
668714 // JCheckBox speakerMocapCB;
....@@ -705,8 +751,7 @@
705751 dropAttributes |= Object3D.TEXTURE;
706752 else
707753 dropAttributes &= ~Object3D.TEXTURE;
708
- }
709
- else if(e.getSource() == liveCB)
754
+ } else if(e.getSource() == liveCB)
710755 {
711756 cameraView.ToggleLive();
712757 }
....@@ -743,6 +788,10 @@
743788 Recompile();
744789 cameraView.repaint();
745790 // refreshContents();
791
+ }
792
+ else if(e.getSource() == zoomBoxCB)
793
+ {
794
+ cameraView.ToggleZoomBoxMode();
746795 }
747796 else if(e.getSource() == smoothfocusCB)
748797 {
....@@ -1033,6 +1082,8 @@
10331082 torusItem.addActionListener(this);
10341083 superItem = menu.add(new MenuItem("Superellipsoid"));
10351084 superItem.addActionListener(this);
1085
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1086
+ kleinItem.addActionListener(this);
10361087 particleItem = menu.add(new MenuItem("Particle system"));
10371088 particleItem.addActionListener(this);
10381089 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1106,6 +1157,8 @@
11061157 resetParentItem.addActionListener(this);
11071158 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11081159 repairParentItem.addActionListener(this);
1160
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1161
+ repairShadowItem.addActionListener(this);
11091162 menu.add(invariantsItem = new MenuItem("Invariants"));
11101163 invariantsItem.addActionListener(this);
11111164 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1441,9 +1494,9 @@
14411494
14421495 void Overwrite(int mask)
14431496 {
1444
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1497
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
14451498 {
1446
- Object3D content = GraphreeD.clipboard.get(0);
1499
+ Object3D content = GrafreeD.clipboard.get(0);
14471500
14481501 if (content instanceof cGroup && ((cGroup)content).transientlink )
14491502 content = ((cGroup)content).get(0);
....@@ -1466,6 +1519,7 @@
14661519 //
14671520 public void actionPerformed(ActionEvent event) // , Object arg)
14681521 {
1522
+ Object source = event.getSource();
14691523 /*
14701524 if (event.getSource() == nameField)
14711525 {
....@@ -1477,11 +1531,11 @@
14771531 }
14781532 else
14791533 */
1480
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1534
+ if (source == lookAtItem || source == lookFromItem)
14811535 {
14821536 ScreenFit();
14831537 } else
1484
- if (event.getSource() == switchItem)
1538
+ if (source == switchItem)
14851539 {
14861540 cVector v1 = new cVector();
14871541 cVector v2 = new cVector();
....@@ -1490,11 +1544,11 @@
14901544 objEditor.cameraView.renderCamera.setAim(v2, v1);
14911545 objEditor.cameraView.repaint();
14921546 } else
1493
- if (event.getSource() == rectoidItem)
1547
+ if (source == rectoidItem)
14941548 {
14951549 makeSomething(new Box());
14961550 } else
1497
- if (event.getSource() == particleItem)
1551
+ if (source == particleItem)
14981552 {
14991553 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15001554 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1515,9 +1569,9 @@
15151569 applyExample(particleGeom, "SMOKE");
15161570 makeSomething(particleGeom);
15171571 } else
1518
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1572
+ if (source == ragdollItem || source == ragdoll2Item)
15191573 {
1520
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1574
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15211575
15221576 ragdoll.toParent = LA.newMatrix();
15231577 ragdoll.fromParent = LA.newMatrix();
....@@ -1535,7 +1589,7 @@
15351589 } else
15361590 /*
15371591 */
1538
- if (event.getSource() == heightFieldItem)
1592
+ if (source == heightFieldItem)
15391593 {
15401594 Object3D obj = new Object3D();
15411595
....@@ -1573,27 +1627,31 @@
15731627
15741628 makeSomething(obj);
15751629 } else
1576
- if (event.getSource() == gridItem)
1630
+ if (source == gridItem)
15771631 {
15781632 makeSomething(new Grid());
15791633 } else
1580
- if (event.getSource() == ellipsoidItem)
1634
+ if (source == ellipsoidItem)
15811635 {
15821636 makeSomething(new Sphere());
15831637 } else
1584
- if (event.getSource() == coneItem)
1638
+ if (source == coneItem)
15851639 {
15861640 makeSomething(new Cone());
15871641 } else
1588
- if (event.getSource() == torusItem)
1642
+ if (source == torusItem)
15891643 {
15901644 makeSomething(new Torus());
15911645 } else
1592
- if (event.getSource() == superItem)
1646
+ if (source == superItem)
15931647 {
15941648 makeSomething(new Superellipsoid());
15951649 } else
1596
- if (event.getSource() == blobItem)
1650
+ if (source == kleinItem)
1651
+ {
1652
+ makeSomething(new Klein());
1653
+ } else
1654
+ if (source == blobItem)
15971655 {
15981656 Blob blob = new Blob();
15991657 BlobComponent comp = new BlobComponent();
....@@ -1601,15 +1659,15 @@
16011659 //blob.retile();
16021660 makeSomething(blob);
16031661 } else
1604
- if (event.getSource() == latheItem)
1662
+ if (source == latheItem)
16051663 {
16061664 makeSomething(new Lathe());
16071665 } else
1608
- if (event.getSource() == bezierItem)
1666
+ if (source == bezierItem)
16091667 {
16101668 makeSomething(new BezierSurface());
16111669 } else
1612
- if (event.getSource() == checkerItem)
1670
+ if (source == checkerItem)
16131671 {
16141672 /*
16151673 Object3D obj = new BezierSurface(5,8);
....@@ -1624,7 +1682,7 @@
16241682 */
16251683 makeSomething(new Checker());
16261684 } else
1627
- if (event.getSource() == meshItem)
1685
+ if (source == meshItem)
16281686 {
16291687 Object3D itemtomake = new Object3D();
16301688 Object3D child;
....@@ -1645,35 +1703,35 @@
16451703 makeSomething(child);
16461704 }
16471705 } else
1648
- if (event.getSource() == springItem)
1706
+ if (source == springItem)
16491707 {
16501708 cSpring s = new cSpring();
16511709 s.setup();
16521710 makeSomething(s);
16531711 } else
1654
- if (event.getSource() == flagItem)
1712
+ if (source == flagItem)
16551713 {
16561714 cSpring s = new cFlag();
16571715 s.setup();
16581716 makeSomething(s);
16591717 } else
1660
- if (event.getSource() == lightItem)
1718
+ if (source == lightItem)
16611719 {
16621720 makeSomething(new Light());
16631721 } else
1664
- if (event.getSource() == csgItem)
1722
+ if (source == csgItem)
16651723 {
16661724 group(new CSG());
16671725 } else
1668
- if (event.getSource() == templateItem)
1726
+ if (source == templateItem)
16691727 {
16701728 group(new cTemplate());
16711729 } else
1672
- if (event.getSource() == attributeItem)
1730
+ if (source == attributeItem)
16731731 {
16741732 makeSomething(new Attribute());
16751733 } else
1676
- if (event.getSource() == pointflowItem)
1734
+ if (source == pointflowItem)
16771735 {
16781736 makeSomething(new PointFlow());
16791737 } else
....@@ -1685,7 +1743,7 @@
16851743 } else
16861744 */
16871745
1688
- if (event.getSource() == superLoopItem)
1746
+ if (source == superLoopItem)
16891747 {
16901748 Composite g = new cGroup();
16911749 for (int i=0; i<15; i++)
....@@ -1707,7 +1765,7 @@
17071765
17081766 group(g);
17091767 } else
1710
- if (event.getSource() == loopItem)
1768
+ if (source == loopItem)
17111769 {
17121770 Composite csg = new GroupLeaf();
17131771 csg.count = 5;
....@@ -1716,7 +1774,7 @@
17161774 csg.addChild(child);
17171775 child.addChild(csg);
17181776 } else
1719
- if (event.getSource() == doubleItem)
1777
+ if (source == doubleItem)
17201778 {
17211779 Composite csg = new GroupLeaf();
17221780 csg.count = 5;
....@@ -1728,7 +1786,7 @@
17281786 csg.addChild(child);
17291787 child.addChild(csg);
17301788 } else
1731
- if (event.getSource() == tripleItem)
1789
+ if (source == tripleItem)
17321790 {
17331791 Composite csg = new GroupLeaf();
17341792 csg.count = 4;
....@@ -1744,70 +1802,70 @@
17441802 child.addChild(csg);
17451803 } else
17461804
1747
- if (event.getSource() == importGFDItem)
1805
+ if (source == importGFDItem)
17481806 {
17491807 ImportGFD();
17501808 } else
1751
- if (event.getSource() == importVRMLX3DItem)
1809
+ if (source == importVRMLX3DItem)
17521810 {
17531811 ImportVRMLX3D();
17541812 } else
1755
- if (event.getSource() == import3DSItem)
1813
+ if (source == import3DSItem)
17561814 {
17571815 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17581816 } else
1759
- if (event.getSource() == importOBJItem)
1817
+ if (source == importOBJItem)
17601818 {
17611819 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17621820 } else
1763
- if (event.getSource() == computeAOItem)
1821
+ if (source == computeAOItem)
17641822 {
1765
- CameraPane.drawMode = CameraPane.OCCLUSION;
1766
- CameraPane.theRenderer.repaint();
1823
+ Globals.drawMode = CameraPane.OCCLUSION;
1824
+ Globals.theRenderer.repaint();
17671825 } else
1768
- if (event.getSource() == recompileItem)
1826
+ if (source == recompileItem)
17691827 {
17701828 Recompile();
17711829 refreshContents();
17721830 } else
1773
- if (event.getSource() == editScriptItem)
1831
+ if (source == editScriptItem)
17741832 {
17751833 OpenDialog();
17761834 refreshContents();
17771835 } else
1778
- if (event.getSource() == invariantsItem)
1836
+ if (source == invariantsItem)
17791837 {
17801838 System.out.println("Invariants:");
1781
- GraphreeD.theApplet3D.universe.invariants();
1839
+ GrafreeD.grafreeD.universe.invariants();
17821840 } else
1783
- if (event.getSource() == memoryItem)
1841
+ if (source == memoryItem)
17841842 {
17851843 //System.out.println("Invariants:");
17861844 PrintMemory();
17871845 } else
1788
- if (event.getSource() == pathItem)
1846
+ if (source == pathItem)
17891847 {
17901848 PrintPath();
17911849 } else
1792
- if (event.getSource() == analyzeItem)
1850
+ if (source == analyzeItem)
17931851 {
17941852 AnalyzeObject();
17951853 } else
1796
- if (event.getSource() == dumpItem)
1854
+ if (source == dumpItem)
17971855 {
17981856 DumpObject();
17991857 } else
1800
- if (event.getSource() == screenfitButton)
1858
+ if (source == screenfitButton)
18011859 {
18021860 //Reload(lastConverter, lastFilename, true);
18031861 ScreenFit();
18041862 } else
1805
- if (event.getSource() == screenfitpointButton)
1863
+ if (source == screenfitpointButton)
18061864 {
18071865 //Reload(lastConverter, lastFilename, true);
18081866 ScreenFitPoint();
18091867 } else
1810
- if (event.getSource() == snapobjectButton)
1868
+ if (source == snapobjectButton)
18111869 {
18121870 //Reload(lastConverter, lastFilename, true);
18131871 SnapObject();
....@@ -1818,13 +1876,13 @@
18181876 // Recompile();
18191877 // refreshContents();
18201878 // } else
1821
- if (event.getSource() == gcButton)
1879
+ if (source == gcButton)
18221880 {
18231881 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18241882 System.gc();
18251883 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261884 } else
1827
- if (event.getSource() == editLeafItem)
1885
+ if (source == editLeafItem)
18281886 {
18291887 Object3D obj;
18301888 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1838,65 +1896,66 @@
18381896 }
18391897 refreshContents(true);
18401898 } else
1841
- if (event.getSource() == openWindowItem)
1899
+ if (source == openWindowItem)
18421900 {
18431901 EditSelection(true);
18441902 } else
1845
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1903
+ if (source == cutItem || source == clearButton)
18461904 {
18471905 loadClipboard(true);
18481906 } else
1849
- if (event.getSource() == duplicateItem)
1907
+ if (source == duplicateItem)
18501908 {
1851
- Object3D keep = GraphreeD.clipboard;
1909
+ Object3D keep = GrafreeD.clipboard;
18521910 loadClipboard(false);
18531911 paste(false);
1854
- GraphreeD.clipboard = keep;
1912
+ GrafreeD.clipboard = keep;
18551913 } else
1856
- if (event.getSource() == cloneItem)
1914
+ if (source == cloneItem)
18571915 {
18581916 CloneSelection(false);
18591917 } else
1860
- if (event.getSource() == cloneSupportItem)
1918
+ if (source == cloneSupportItem)
18611919 {
18621920 CloneSelection(true);
18631921 } else
1864
- if (event.getSource() == copyItem)
1922
+ if (source == copyItem)
18651923 {
18661924 loadClipboard(false);
18671925 } else
1868
- if (event.getSource() == pasteItem)
1926
+ if (source == pasteItem)
18691927 {
18701928 paste(false);
18711929 } else
1872
- if (event.getSource() == pasteLinkItem)
1930
+ if (source == pasteLinkItem)
18731931 {
18741932 pasteInto(false);
18751933 } else
1876
- if (event.getSource() == pasteCloneItem)
1934
+ if (source == pasteCloneItem)
18771935 {
18781936 pasteInto(true);
18791937 } else
1880
- if (event.getSource() == pasteExpandItem)
1938
+ if (source == pasteExpandItem)
18811939 {
18821940 paste(true);
18831941 } else
1884
- if (event.getSource() == synchronizeItem)
1942
+ if (source == synchronizeItem)
18851943 {
18861944 Overwrite(Object3D.TRANSFORM);
18871945 } else
1888
- if (event.getSource() == overwriteNameItem)
1946
+ if (source == overwriteNameItem)
18891947 {
18901948 Overwrite(Object3D.NAME);
18911949 } else
1892
- if (event.getSource() == overwriteUVItem)
1950
+ if (source == overwriteUVItem)
18931951 {
18941952 Overwrite(Object3D.UV);
18951953 } else
1896
- if (event.getSource() == overwriteMatItem)
1954
+ if (source == overwriteMatItem)
18971955 {
1956
+ /* july 2015
18981957 if ((dropAttributes & Object3D.TEXTURE) == 0)
1899
- Overwrite(Object3D.MATERIAL);
1958
+ Overwrite(Object3D.MATERIAL | Object3D.COLOR);
19001959 else
19011960 {
19021961 if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0)
....@@ -1908,13 +1967,16 @@
19081967 Overwrite(Object3D.MATERIAL | Object3D.TEXTURE);
19091968 }
19101969 }
1970
+ */
1971
+
1972
+ Overwrite(dropAttributes);
19111973 }
1912
- if (event.getSource() == overwriteGeoItem)
1974
+ if (source == overwriteGeoItem)
19131975 {
19141976 Overwrite(Object3D.GEOMETRY);
1915
-// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1977
+// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
19161978 // {
1917
-// Object3D content = GraphreeD.clipboard.get(0);
1979
+// Object3D content = GrafreeD.clipboard.get(0);
19181980 //
19191981 // if (content instanceof cGroup && ((cGroup)content).transientlink )
19201982 // content = ((cGroup)content).get(0);
....@@ -1926,7 +1988,7 @@
19261988 // refreshContents();
19271989 // }
19281990 } else
1929
- if (event.getSource() == generateMeshItem)
1991
+ if (source == generateMeshItem)
19301992 {
19311993 //if (group.selection.size() == 1)
19321994 // for (int i=0; i<group.selection.size(); i++)
....@@ -1937,7 +1999,7 @@
19371999 ResetModel();
19382000 refreshContents();
19392001 } else
1940
- if (event.getSource() == extractGeometriesItem)
2002
+ if (source == extractGeometriesItem)
19412003 {
19422004 boolean one = false;
19432005
....@@ -1964,7 +2026,7 @@
19642026 ResetModel();
19652027 refreshContents();
19662028 } else
1967
- if (event.getSource() == cloneGeometriesItem)
2029
+ if (source == cloneGeometriesItem)
19682030 {
19692031 boolean one = false;
19702032
....@@ -1990,32 +2052,37 @@
19902052 ResetModel();
19912053 refreshContents();
19922054 } else
1993
- if (event.getSource() == shareGeometriesItem)
2055
+ if (source == shareGeometriesItem)
19942056 {
19952057 boolean one = false;
19962058
19972059 if (group.selection.size() == 1)
19982060 one = true;
19992061
2062
+ Object3D merge = null;
2063
+
20002064 Object3D content = new cGroup();
20012065
20022066 for (int i=0; i<group.selection.size(); i++)
20032067 {
2004
- Object3D sel = new Merge(group.selection.get(i));
2068
+ merge = new Merge(group.selection.get(i));
20052069
20062070 if (one)
2007
- makeSomething(sel, false);
2071
+ makeSomething(merge, false);
20082072 else
2009
- content.addChild(sel);
2073
+ content.addChild(merge);
20102074 }
20112075
20122076 if (!one)
2013
- makeSomething(content, false);
2014
-
2015
- ResetModel();
2016
- refreshContents();
2077
+ makeSomething(content, true);
2078
+ else
2079
+ {
2080
+ ResetModel();
2081
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2082
+ refreshContents();
2083
+ }
20172084 } else
2018
- if (event.getSource() == mergeGeometriesItem)
2085
+ if (source == mergeGeometriesItem)
20192086 {
20202087 boolean one = false;
20212088
....@@ -2045,11 +2112,11 @@
20452112 ResetModel();
20462113 refreshContents();
20472114 } else
2048
- if (event.getSource() == linkverticesItem)
2115
+ if (source == linkverticesItem)
20492116 {
2050
-// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2117
+// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20512118 // {
2052
-// Object3D content = GraphreeD.clipboard.get(0);
2119
+// Object3D content = GrafreeD.clipboard.get(0);
20532120 //
20542121 // if (content instanceof cGroup && ((cGroup)content).transientlink )
20552122 // content = ((cGroup)content).get(0);
....@@ -2058,14 +2125,14 @@
20582125 // group.selection.get(0).setMasterThis(content); // should be identity
20592126 // refreshContents();
20602127 // }
2061
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2128
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
20622129 {
2063
- Object3D content = GraphreeD.clipboard.get(0);
2130
+ Object3D content = GrafreeD.clipboard.get(0);
20642131
20652132 if (content instanceof cGroup && ((cGroup)content).transientlink )
20662133 content = ((cGroup)content).get(0);
20672134
2068
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2135
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20692136 for (int i=0; i<group.selection.size(); i++)
20702137 {
20712138 boolean random = CameraPane.RANDOM;
....@@ -2074,11 +2141,11 @@
20742141 // group.selection.get(i).setMasterThis(content); // should be identity
20752142 CameraPane.RANDOM = random;
20762143 }
2077
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2144
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20782145 refreshContents();
20792146 }
20802147 } else
2081
- if (event.getSource() == resetsupportItem)
2148
+ if (source == resetsupportItem)
20822149 {
20832150 for (int i=0; i<group.selection.size(); i++)
20842151 {
....@@ -2090,7 +2157,16 @@
20902157
20912158 refreshContents();
20922159 } else
2093
- if (event.getSource() == resetreferencesItem)
2160
+ if (source == relinkverticesItem)
2161
+ {
2162
+ boolean random = CameraPane.RANDOM;
2163
+ CameraPane.RANDOM = false; // parse all random nodes
2164
+ group.selection.RelinkToSupport();
2165
+ CameraPane.RANDOM = random;
2166
+
2167
+ refreshContents();
2168
+ } else
2169
+ if (source == resetreferencesItem)
20942170 {
20952171 for (int i=0; i<group.selection.size(); i++)
20962172 {
....@@ -2099,11 +2175,11 @@
20992175
21002176 refreshContents();
21012177 } else
2102
- if (event.getSource() == setMasterItem)
2178
+ if (source == setMasterItem)
21032179 {
2104
- if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2180
+ if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21052181 {
2106
- Object3D content = GraphreeD.clipboard.get(0);
2182
+ Object3D content = GrafreeD.clipboard.get(0);
21072183
21082184 if (content instanceof cGroup && ((cGroup)content).transientlink )
21092185 content = ((cGroup)content).get(0);
....@@ -2112,13 +2188,13 @@
21122188 refreshContents();
21132189 }
21142190 } else
2115
- if (event.getSource() == poseMeshItem)
2191
+ if (source == poseMeshItem)
21162192 {
21172193 if (group.selection.size() == 1)
21182194 {
2119
- if (GraphreeD.clipboard.size() == 1)
2195
+ if (GrafreeD.clipboard.size() == 1)
21202196 {
2121
- Object3D content = GraphreeD.clipboard.get(0);
2197
+ Object3D content = GrafreeD.clipboard.get(0);
21222198
21232199 if (content instanceof cGroup && ((cGroup)content).transientlink )
21242200 content = ((cGroup)content).get(0);
....@@ -2131,19 +2207,19 @@
21312207 }
21322208
21332209 } else
2134
- if (event.getSource() == revertMeshItem)
2210
+ if (source == revertMeshItem)
21352211 {
21362212 RevertMeshes();
21372213 } else
2138
- if (event.getSource() == resetMeshItem)
2214
+ if (source == resetMeshItem)
21392215 {
21402216 ResetAll();
21412217 } else
2142
- if (event.getSource() == stepAllItem)
2218
+ if (source == stepAllItem)
21432219 {
21442220 StepAll();
21452221 } else
2146
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2222
+ if (source == clearItem) // || event.getSource() == clearButton)
21472223 {
21482224 //int indices[] = jList.getSelectedIndices();
21492225 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2151,42 +2227,46 @@
21512227
21522228 ClearSelection(false);
21532229 } else
2154
- if (event.getSource() == clearAllItem)
2230
+ if (source == clearAllItem)
21552231 {
21562232 ClearSelection(true);
21572233 } else
2158
- if (event.getSource() == grabItem)
2234
+ if (source == grabItem)
21592235 {
21602236 group(new cGroup(), true);
21612237 } else
2162
- if (event.getSource() == frontItem)
2238
+ if (source == hideItem)
2239
+ {
2240
+ group(new HiddenObject());
2241
+ } else
2242
+ if (source == frontItem)
21632243 {
21642244 front();
21652245 } else
2166
- if (event.getSource() == backItem)
2246
+ if (source == backItem)
21672247 {
21682248 back();
21692249 } else
2170
- if (event.getSource() == cameraItem)
2250
+ if (source == cameraItem)
21712251 {
21722252 makeSomething(new Camera());
21732253 } else
2174
- if (event.getSource() == compositeItem)
2254
+ if (source == compositeItem)
21752255 {
21762256 group(new Composite());
21772257 } else
2178
- if (event.getSource() == randomItem)
2258
+ if (source == randomItem)
21792259 {
21802260 RandomNode random = new RandomNode();
21812261 group(random);
21822262 if (random.size() > 0)
21832263 random.name = random.get(0).name + "Rnd";
21842264 } else
2185
- if (event.getSource() == physicsItem)
2265
+ if (source == physicsItem)
21862266 {
21872267 group(new PhysicsNode());
21882268 } else
2189
- if (event.getSource() == frameselectorItem)
2269
+ if (source == frameselectorItem)
21902270 {
21912271 for (int i=0; i<group.selection.size(); i++)
21922272 {
....@@ -2198,7 +2278,7 @@
21982278 ResetModel();
21992279 refreshContents();
22002280 } else
2201
- if (event.getSource() == switchGeoItem)
2281
+ if (source == switchGeoItem)
22022282 {
22032283 for (int i=0; i<group.selection.size(); i++)
22042284 {
....@@ -2210,7 +2290,7 @@
22102290 ResetModel();
22112291 refreshContents();
22122292 } else
2213
- if (event.getSource() == switchTransfoItem)
2293
+ if (source == switchTransfoItem)
22142294 {
22152295 for (int i=0; i<group.selection.size(); i++)
22162296 {
....@@ -2222,7 +2302,7 @@
22222302 ResetModel();
22232303 refreshContents();
22242304 } else
2225
- if (event.getSource() == morphItem)
2305
+ if (source == morphItem)
22262306 {
22272307 for (int i=0; i<group.selection.size(); i++)
22282308 {
....@@ -2234,7 +2314,7 @@
22342314 ResetModel();
22352315 refreshContents();
22362316 } else
2237
- if (event.getSource() == scriptNodeItem)
2317
+ if (source == scriptNodeItem)
22382318 {
22392319 boolean atleastone = false;
22402320
....@@ -2273,195 +2353,215 @@
22732353 }
22742354 }
22752355 } else
2276
- if (event.getSource() == linkerItem)
2356
+ if (source == linkerItem)
22772357 {
22782358 group(new cLinker());
22792359 } else
2280
- if (event.getSource() == textureItem)
2360
+ if (source == textureItem)
22812361 {
22822362 group(new TextureNode());
22832363 } else
2284
- if (event.getSource() == shadowXItem)
2364
+ if (source == billboardItem)
2365
+ {
2366
+ group(new BillboardNode());
2367
+ } else
2368
+ if (source == shadowXItem)
22852369 {
22862370 CastShadow(0);
22872371 } else
2288
- if (event.getSource() == shadowYItem)
2372
+ if (source == shadowYItem)
22892373 {
22902374 CastShadow(1);
22912375 } else
2292
- if (event.getSource() == shadowZItem)
2376
+ if (source == shadowZItem)
22932377 {
22942378 CastShadow(2);
22952379 } else
2296
- if (event.getSource() == ungroupItem)
2380
+ if (source == ungroupItem)
22972381 {
2298
- ungroup();
2382
+ //ungroup();
2383
+ for (int i=0; i<group.selection.size(); i++)
2384
+ {
2385
+ Ungroup(group.selection.get(i));
2386
+ }
2387
+
2388
+ ClearSelection(false);
2389
+
2390
+ refreshContents();
22992391 } else
2300
- if (event.getSource() == genUVItem)
2392
+ if (source == genUVItem)
23012393 {
23022394 GenUV();
23032395 } else
2304
- if (event.getSource() == genNormalsCADItem)
2396
+ if (source == genNormalsCADItem)
23052397 {
23062398 GenNormals(true);
23072399 } else
2308
- if (event.getSource() == genNormalsORGANItem)
2400
+ if (source == genNormalsMESHItem)
2401
+ {
2402
+ GenNormals(true); // TODO
2403
+ } else
2404
+ if (source == genNormalsORGANItem)
23092405 {
23102406 GenNormals(false);
23112407 } else
2312
- if (event.getSource() == stripifyItem)
2408
+ if (source == genNormalsMINEItem)
2409
+ {
2410
+ GenNormalsMINE();
2411
+ } else
2412
+ if (source == stripifyItem)
23132413 {
23142414 Stripify();
23152415 } else
2316
- if (event.getSource() == unstripifyItem)
2416
+ if (source == unstripifyItem)
23172417 {
23182418 Unstripify();
23192419 } else
2320
- if (event.getSource() == trimItem)
2420
+ if (source == trimItem)
23212421 {
23222422 Trim();
23232423 } else
2324
- if (event.getSource() == untrimItem)
2424
+ if (source == untrimItem)
23252425 {
23262426 Untrim();
23272427 } else
2328
- if (event.getSource() == clearColorsItem)
2428
+ if (source == clearColorsItem)
23292429 {
23302430 ClearColors();
23312431 } else
2332
- if (event.getSource() == clearMaterialsItem)
2432
+ if (source == clearMaterialsItem)
23332433 {
23342434 ClearMaterials();
23352435 } else
2336
- if (event.getSource() == liveleavesItem)
2436
+ if (source == liveleavesItem)
23372437 {
23382438 LiveLeaves(true);
23392439 } else
2340
- if (event.getSource() == unliveleavesItem)
2440
+ if (source == unliveleavesItem)
23412441 {
23422442 LiveLeaves(false);
23432443 } else
2344
- if (event.getSource() == supportleavesItem)
2444
+ if (source == supportleavesItem)
23452445 {
23462446 SupportLeaves(true);
23472447 } else
2348
- if (event.getSource() == unsupportleavesItem)
2448
+ if (source == unsupportleavesItem)
23492449 {
23502450 SupportLeaves(false);
23512451 } else
2352
- if (event.getSource() == hideleavesItem)
2452
+ if (source == hideleavesItem)
23532453 {
23542454 HideLeaves(true);
23552455 } else
2356
- if (event.getSource() == showleavesItem)
2456
+ if (source == showleavesItem)
23572457 {
23582458 HideLeaves(false);
23592459 } else
2360
- if (event.getSource() == markleavesItem)
2460
+ if (source == markleavesItem)
23612461 {
23622462 MarkLeaves(true);
23632463 } else
2364
- if (event.getSource() == unmarkleavesItem)
2464
+ if (source == unmarkleavesItem)
23652465 {
23662466 MarkLeaves(false);
23672467 } else
2368
- if (event.getSource() == flipVItem)
2468
+ if (source == flipVItem)
23692469 {
23702470 FlipV(true);
23712471 } else
2372
- if (event.getSource() == unflipVItem)
2472
+ if (source == unflipVItem)
23732473 {
23742474 FlipV(false);
23752475 } else
2376
- if (event.getSource() == lowTexturesItem)
2476
+ if (source == lowTexturesItem)
23772477 {
23782478 SetTexRes(0);
23792479 } else
2380
- if (event.getSource() == normalTexturesItem)
2480
+ if (source == normalTexturesItem)
23812481 {
23822482 SetTexRes(1);
23832483 } else
2384
- if (event.getSource() == highTexturesItem)
2484
+ if (source == highTexturesItem)
23852485 {
23862486 SetTexRes(2);
23872487 } else
2388
- if (event.getSource() == veryhighTexturesItem)
2488
+ if (source == veryhighTexturesItem)
23892489 {
23902490 SetTexRes(3);
23912491 } else
2392
- if (event.getSource() == maxTexturesItem)
2492
+ if (source == maxTexturesItem)
23932493 {
23942494 SetTexRes(4);
23952495 } else
2396
- if (event.getSource() == panoTexturesItem)
2496
+ if (source == panoTexturesItem)
23972497 {
23982498 SetTexRes(5);
23992499 } else
2400
- if (event.getSource() == reverseNormalsItem)
2500
+ if (source == reverseNormalsItem)
24012501 {
24022502 ReverseNormals();
24032503 } else
2404
- if (event.getSource() == parseverticesItem)
2504
+ if (source == parseverticesItem)
24052505 {
24062506 ParseVertices();
24072507 } else
2408
- if (event.getSource() == textureFieldItem)
2508
+ if (source == textureFieldItem)
24092509 {
24102510 TextureVertices();
24112511 } else
2412
- if (event.getSource() == alignItem)
2512
+ if (source == alignItem)
24132513 {
24142514 Align();
24152515 } else
2416
- if (event.getSource() == mirrorItem)
2516
+ if (source == mirrorItem)
24172517 {
24182518 MirrorPoses();
24192519 } else
2420
- if (event.getSource() == reduceMorphItem)
2520
+ if (source == reduceMorphItem)
24212521 {
24222522 MeshReduction(false);
24232523 } else
2424
- if (event.getSource() == reduce34MorphItem)
2524
+ if (source == reduce34MorphItem)
24252525 {
24262526 MeshReduction(true);
24272527 } else
2428
- if (event.getSource() == reverseTrianglesItem)
2528
+ if (source == reverseTrianglesItem)
24292529 {
24302530 ReverseTriangles();
24312531 } else
2432
- if (event.getSource() == reduceMeshItem)
2532
+ if (source == reduceMeshItem)
24332533 {
24342534 ReduceMesh(false);
24352535 } else
2436
- if (event.getSource() == reduce34MeshItem)
2536
+ if (source == reduce34MeshItem)
24372537 {
24382538 ReduceMesh(true);
24392539 } else
2440
- if (event.getSource() == increaseMeshItem)
2540
+ if (source == increaseMeshItem)
24412541 {
24422542 IncreaseMesh();
24432543 } else
2444
- if (event.getSource() == clipMeshItem)
2544
+ if (source == clipMeshItem)
24452545 {
24462546 ClipMesh();
24472547 } else
2448
- if (event.getSource() == smoothMeshItem)
2548
+ if (source == smoothMeshItem)
24492549 {
24502550 SmoothMesh();
24512551 } else
2452
- if (event.getSource() == transformgeometryItem)
2552
+ if (source == transformgeometryItem)
24532553 {
24542554 TransformGeometry();
24552555 } else
2456
- if (event.getSource() == resetTransformItem)
2556
+ if (source == resetTransformItem)
24572557 {
24582558 ResetTransform();
24592559 } else
2460
- if (event.getSource() == resetCentroidItem)
2560
+ if (source == resetCentroidItem)
24612561 {
24622562 ResetCentroid();
24632563 } else
2464
- if (event.getSource() == resetParentItem)
2564
+ if (source == resetParentItem)
24652565 {
24662566 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24672567 {
....@@ -2471,7 +2571,7 @@
24712571
24722572 refreshContents();
24732573 } else
2474
- if (event.getSource() == repairParentItem)
2574
+ if (source == repairParentItem)
24752575 {
24762576 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24772577 {
....@@ -2485,7 +2585,21 @@
24852585
24862586 refreshContents();
24872587 } else
2488
- if (event.getSource() == sortbysizeItem)
2588
+ if (source == repairShadowItem)
2589
+ {
2590
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2591
+ {
2592
+ Object3D obj = (Object3D)e.nextElement();
2593
+ obj.RepairShadow();
2594
+// for (int i=0; i<obj.size(); i++)
2595
+// {
2596
+// obj.get(i).parent = obj;
2597
+// }
2598
+ }
2599
+
2600
+ refreshContents();
2601
+ } else
2602
+ if (source == sortbysizeItem)
24892603 {
24902604 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24912605 {
....@@ -2497,7 +2611,7 @@
24972611 ResetModel();
24982612 refreshContents();
24992613 } else
2500
- if (event.getSource() == sortbynameItem)
2614
+ if (source == sortbynameItem)
25012615 {
25022616 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25032617 {
....@@ -2509,7 +2623,7 @@
25092623 ResetModel();
25102624 refreshContents();
25112625 } else
2512
- if (event.getSource() == attachPigmentItem)
2626
+ if (source == attachPigmentItem)
25132627 {
25142628 String texture = GetFile("Attach pigment");
25152629 Object3D obj;
....@@ -2521,7 +2635,7 @@
25212635
25222636 refreshContents();
25232637 } else
2524
- if (event.getSource() == detachPigmentItem)
2638
+ if (source == detachPigmentItem)
25252639 {
25262640 Object3D obj;
25272641 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2532,7 +2646,7 @@
25322646
25332647 refreshContents();
25342648 } else
2535
- if (event.getSource() == attachBumpItem)
2649
+ if (source == attachBumpItem)
25362650 {
25372651 String texture = GetFile("Attach bump");
25382652 Object3D obj;
....@@ -2544,7 +2658,7 @@
25442658
25452659 refreshContents();
25462660 } else
2547
- if (event.getSource() == detachBumpItem)
2661
+ if (source == detachBumpItem)
25482662 {
25492663 Object3D obj;
25502664 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2555,7 +2669,7 @@
25552669
25562670 refreshContents();
25572671 } else
2558
- if (event.getSource() == pigmentBumpItem)
2672
+ if (source == pigmentBumpItem)
25592673 {
25602674 Object3D obj;
25612675 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2566,158 +2680,195 @@
25662680
25672681 refreshContents();
25682682 } else
2569
- if (event.getSource() == flashSelectionButton)
2683
+ if (source == flashSelectionButton)
25702684 {
25712685 CameraPane.flash = true;
25722686 refreshContents();
25732687 } else
2574
- if (event.getSource() == oneButton)
2688
+ if (source == oneButton)
25752689 {
25762690 } else
2577
- if (event.getSource() == twoButton)
2691
+ if (source == twoButton)
25782692 {
25792693 radio.layout = twoButton;
25802694 // bug
25812695 //gridPanel.setDividerLocation(1.0);
25822696 //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();
2697
+// bigThree.remove(scenePanel);
2698
+// bigThree.remove(centralPanel);
2699
+// bigThree.remove(XYZPanel);
2700
+// aWindowConstraints.gridx = 0;
2701
+// aWindowConstraints.gridy = 0;
2702
+// aWindowConstraints.gridwidth = 1;
2703
+// // aConstraints.gridheight = 3;
2704
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2705
+// aWindowConstraints.weightx = 0;
2706
+// aWindowConstraints.weighty = 1;
2707
+// //bigThree.add(jtp, aWindowConstraints);
2708
+// aWindowConstraints.weightx = 1;
2709
+// aWindowConstraints.gridwidth = 3;
2710
+// // aConstraints.gridheight = 3;
2711
+// aWindowConstraints.gridx = 1;
2712
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2713
+// bigThree.add(centralPanel, aWindowConstraints);
2714
+// aWindowConstraints.weightx = 0;
2715
+// aWindowConstraints.gridx = 4;
2716
+// aWindowConstraints.gridwidth = 1;
2717
+// // aConstraints.gridheight = 3;
2718
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2719
+// //bigThree.add(XYZPanel, aWindowConstraints);
2720
+// scenePanel.setVisible(false);
2721
+// centralPanel.setVisible(true);
2722
+// XYZPanel.setVisible(false);
2723
+ bigThree.ClearUI();
2724
+ bigThree.add(centralPanel);
2725
+ bigThree.FlushUI();
26072726 } else
2608
- if (event.getSource() == threeButton)
2727
+ if (source == threeButton)
26092728 {
26102729 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();
2730
+
2731
+// bigThree.remove(scenePanel);
2732
+// bigThree.remove(centralPanel);
2733
+// bigThree.remove(XYZPanel);
2734
+// aWindowConstraints.gridx = 0;
2735
+// aWindowConstraints.gridy = 0;
2736
+// aWindowConstraints.gridwidth = 1;
2737
+// // aConstraints.gridheight = 3;
2738
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2739
+// aWindowConstraints.weightx = 0;
2740
+// aWindowConstraints.weighty = 1;
2741
+// //bigThree.add(jtp, aWindowConstraints);
2742
+// aWindowConstraints.weightx = 1;
2743
+// aWindowConstraints.gridwidth = 3;
2744
+// // aConstraints.gridheight = 3;
2745
+// aWindowConstraints.gridx = 1;
2746
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2747
+// bigThree.add(centralPanel, aWindowConstraints);
2748
+// aWindowConstraints.weightx = 0;
2749
+// aWindowConstraints.gridx = 4;
2750
+// aWindowConstraints.gridwidth = 1;
2751
+// // aConstraints.gridheight = 3;
2752
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2753
+// bigThree.add(XYZPanel, aWindowConstraints);
2754
+// bigThree.validate();
2755
+// scenePanel.setVisible(false);
2756
+// centralPanel.setVisible(true);
2757
+// XYZPanel.setVisible(true);
2758
+ bigThree.ClearUI();
2759
+ bigThree.add(centralPanel);
2760
+ bigThree.add(XYZPanel);
2761
+ bigThree.FlushUI();
26352762 } else
2636
- if (event.getSource() == fourButton)
2763
+ if (source == fourButton)
26372764 {
26382765 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();
2766
+
2767
+// bigThree.remove(scenePanel);
2768
+// bigThree.remove(centralPanel);
2769
+// bigThree.remove(XYZPanel);
2770
+// aWindowConstraints.gridx = 0;
2771
+// aWindowConstraints.gridy = 0;
2772
+// aWindowConstraints.gridwidth = 1;
2773
+// // aWindowConstraints.gridheight = 3;
2774
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2775
+// aWindowConstraints.weightx = 1;
2776
+// aWindowConstraints.weighty = 1;
2777
+// bigThree.add(scenePanel, aWindowConstraints);
2778
+// aWindowConstraints.weightx = 1;
2779
+// aWindowConstraints.gridwidth = 3;
2780
+// // aConstraints.gridheight = 3;
2781
+// aWindowConstraints.gridx = 1;
2782
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2783
+// //bigThree.add(cameraPanel, aWindowConstraints);
2784
+// aWindowConstraints.weightx = 0;
2785
+// aWindowConstraints.gridx = 4;
2786
+// aWindowConstraints.gridwidth = 1;
2787
+// // aWindowConstraints.gridheight = 3;
2788
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2789
+// //bigThree.add(XYZPanel, aWindowConstraints);
2790
+// bigThree.validate();
2791
+// scenePanel.setVisible(true);
2792
+// centralPanel.setVisible(false);
2793
+// XYZPanel.setVisible(false);
2794
+ bigThree.ClearUI();
2795
+ bigThree.add(scenePanel);
2796
+ bigThree.FlushUI();
26632797 } else
2664
- if (event.getSource() == sixButton)
2798
+ if (source == sixButton)
26652799 {
26662800 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();
2801
+
2802
+// bigThree.remove(scenePanel);
2803
+// bigThree.remove(centralPanel);
2804
+// bigThree.remove(XYZPanel);
2805
+// aWindowConstraints.gridx = 0;
2806
+// aWindowConstraints.gridy = 0;
2807
+// aWindowConstraints.gridwidth = 1;
2808
+// // aConstraints.gridheight = 3;
2809
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2810
+// aWindowConstraints.weightx = 0;
2811
+// aWindowConstraints.weighty = 1;
2812
+// bigThree.add(scenePanel, aWindowConstraints);
2813
+// aWindowConstraints.weightx = 1;
2814
+// aWindowConstraints.gridwidth = 3;
2815
+// // aWindowConstraints.gridheight = 3;
2816
+// aWindowConstraints.gridx = 1;
2817
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2818
+// bigThree.add(centralPanel, aWindowConstraints);
2819
+// aWindowConstraints.weightx = 0;
2820
+// aWindowConstraints.gridx = 4;
2821
+// aWindowConstraints.gridwidth = 1;
2822
+// // aWindowConstraints.gridheight = 3;
2823
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2824
+// //bigThree.add(XYZPanel, aConstraints);
2825
+// bigThree.validate();
2826
+// scenePanel.setVisible(true);
2827
+// centralPanel.setVisible(true);
2828
+// XYZPanel.setVisible(false);
2829
+ bigThree.ClearUI();
2830
+ bigThree.add(scenePanel);
2831
+ bigThree.add(centralPanel);
2832
+ bigThree.FlushUI();
26912833 } else
2692
- if (event.getSource() == sevenButton)
2834
+ if (source == sevenButton)
26932835 {
26942836 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();
2837
+
2838
+// bigThree.remove(scenePanel);
2839
+// bigThree.remove(centralPanel);
2840
+// bigThree.remove(XYZPanel);
2841
+// aWindowConstraints.gridx = 0;
2842
+// aWindowConstraints.gridy = 0;
2843
+// aWindowConstraints.gridwidth = 1;
2844
+// // aWindowConstraints.gridheight = 3;
2845
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2846
+// aWindowConstraints.weightx = 0;
2847
+// aWindowConstraints.weighty = 1;
2848
+// bigThree.add(scenePanel, aWindowConstraints);
2849
+// aWindowConstraints.weightx = 1;
2850
+// aWindowConstraints.gridwidth = 3;
2851
+// // aWindowConstraints.gridheight = 3;
2852
+// aWindowConstraints.gridx = 1;
2853
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2854
+// bigThree.add(centralPanel, aWindowConstraints);
2855
+// aWindowConstraints.weightx = 0;
2856
+// aWindowConstraints.gridx = 4;
2857
+// aWindowConstraints.gridwidth = 1;
2858
+// // aConstraints.gridheight = 3;
2859
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2860
+// bigThree.add(XYZPanel, aWindowConstraints);
2861
+// bigThree.validate();
2862
+// scenePanel.setVisible(true);
2863
+// centralPanel.setVisible(true);
2864
+// XYZPanel.setVisible(true);
2865
+ bigThree.ClearUI();
2866
+ bigThree.add(scenePanel);
2867
+ bigThree.add(centralPanel);
2868
+ bigThree.add(XYZPanel);
2869
+ bigThree.FlushUI();
27192870 } else
2720
- if (event.getSource() == rootButton)
2871
+ if (source == rootButton)
27212872 {
27222873 Object3D obj;
27232874 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2729,7 +2880,7 @@
27292880
27302881 refreshContents(true);
27312882 } else
2732
- if (event.getSource() == closeButton)
2883
+ if (source == closeButton)
27332884 {
27342885 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27352886 cRadio ab;
....@@ -2750,11 +2901,11 @@
27502901 }
27512902 refreshContents(true);
27522903 } else
2753
- if (event.getSource() == editItem || event.getSource() == editButton)
2904
+ if (source == editItem || source == editButton)
27542905 {
27552906 EditSelection(false);
27562907 } else
2757
- if (event.getSource() == uneditButton)
2908
+ if (source == uneditButton)
27582909 {
27592910 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27602911 {
....@@ -2766,12 +2917,12 @@
27662917
27672918 child.editWindow = null; // ???????????
27682919 }
2769
- objEditor.ctrlPanel.revalidate();
2920
+ objEditor.ctrlPanel.validate();
27702921 //objEditor.jTree.clearSelection();
27712922 //objEditor.ResetSliders();
27722923 refreshContents(true);
27732924 } else
2774
- if (event.getSource() == clearPanelButton)
2925
+ if (source == clearPanelButton)
27752926 {
27762927 assert(copy == group);
27772928 //copy.ClearUI();
....@@ -2782,7 +2933,7 @@
27822933 listUI.clear();
27832934 refreshContents(true);
27842935 } else
2785
- if (event.getSource() == allParamsButton)
2936
+ if (source == allParamsButton)
27862937 {
27872938 assert(copy == group);
27882939
....@@ -2803,19 +2954,19 @@
28032954
28042955 refreshContents(true);
28052956 } else
2806
- if (event.getSource() == unselectButton)
2957
+ if (source == unselectButton)
28072958 {
28082959 objEditor.jTree.clearSelection();
2809
- // ?? oct 2012 GraphreeD.clipboard.clear();
2960
+ // ?? oct 2012 GrafreeD.clipboard.clear();
28102961 objEditor.ResetSliders();
28112962 refreshContents(true);
28122963 } else
2813
- if(event.getSource() instanceof cRadio)
2964
+ if(source instanceof cRadio)
28142965 {
28152966 group.parent = keepparent;
28162967 group.attributes = 0;
28172968 //group.editWindow = null;
2818
- /*cRadio*/ radio = (cRadio)event.getSource();
2969
+ /*cRadio*/ radio = (cRadio)source;
28192970 Object3D obj = radio.GetObject();
28202971 System.out.println("Edit " + obj);
28212972 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2835,7 +2986,7 @@
28352986 }
28362987
28372988 copy = group;
2838
- //CameraPane.theRenderer.object = group;
2989
+ //Globals.theRenderer.object = group;
28392990 if(!useclient)
28402991 {
28412992 cameraView.renderCamera = radio.camera;
....@@ -2844,7 +2995,8 @@
28442995 cameraView.cameras[cameraView.cameracount] = radio.camera;
28452996 cameraView.targetLookAt.set(radio.camera.lookAt);
28462997 cameraView.object = group;
2847
- cameraView.lighttouched = true;
2998
+ //cameraView.lighttouched = true;
2999
+ Globals.lighttouched = true;
28483000 topView.object = group;
28493001 frontView.object = group;
28503002 sideView.object = group;
....@@ -2880,7 +3032,7 @@
28803032 if (useclient)
28813033 {
28823034 cameraView.object = client;
2883
- cameraView.lighttouched = true;
3035
+ Globals.lighttouched = true;
28843036 //topView.object = client;
28853037 //frontView.object = client;
28863038 //sideView.object = client;
....@@ -2888,7 +3040,7 @@
28883040 else
28893041 {
28903042 cameraView.object = group;
2891
- cameraView.lighttouched = true;
3043
+ Globals.lighttouched = true;
28923044 //topView.object = group;
28933045 //frontView.object = group;
28943046 //sideView.object = group;
....@@ -3121,9 +3273,9 @@
31213273 obj = (Object3D)e.nextElement();
31223274
31233275 System.out.println("Object is: " + obj);
3124
- GraphreeD.AnalyzeObject(obj);
3276
+ GrafreeD.AnalyzeObject(obj);
31253277 System.out.println("Boundary rep: " + obj.bRep);
3126
- GraphreeD.AnalyzeObject(obj.bRep);
3278
+ GrafreeD.AnalyzeObject(obj.bRep);
31273279
31283280 // System.err.println((size/1024) + " KB is the size of " + obj);
31293281 }
....@@ -3165,6 +3317,13 @@
31653317 void GenNormals(boolean crease)
31663318 {
31673319 group.GenNormalsS(crease);
3320
+
3321
+ refreshContents();
3322
+ }
3323
+
3324
+ void GenNormalsMINE()
3325
+ {
3326
+ group.selection.GenNormalsMINE();
31683327
31693328 refreshContents();
31703329 }
....@@ -3250,7 +3409,7 @@
32503409 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
32513410 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
32523411 //
3253
-// g.add(GraphreeD.clipboard);
3412
+// g.add(GrafreeD.clipboard);
32543413 //
32553414 // buffer.add(g);
32563415 // }
....@@ -3269,8 +3428,8 @@
32693428 // nodes = new Object3D();
32703429 // vertices = new Vector<Vertex>();
32713430 //
3272
-// boolean epsequal = GraphreeD.epsequal;
3273
-// GraphreeD.epsequal = true;
3431
+// boolean epsequal = GrafreeD.epsequal;
3432
+// GrafreeD.epsequal = true;
32743433 //
32753434 // for (int i=0; i<group.selection.size(); i++)
32763435 // {
....@@ -3311,7 +3470,7 @@
33113470 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33123471 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33133472 //
3314
-// g.add(GraphreeD.clipboard);
3473
+// g.add(GrafreeD.clipboard);
33153474 //
33163475 // buffer.add(g);
33173476 // }
....@@ -3319,7 +3478,7 @@
33193478 // makeSomething(buffer, i==group.selection.size()-1);
33203479 // }
33213480 //
3322
-// GraphreeD.epsequal = epsequal;
3481
+// GrafreeD.epsequal = epsequal;
33233482 //
33243483 // //buffer = null;
33253484 // temprep = null;
....@@ -3330,8 +3489,8 @@
33303489
33313490 void ParseVertices()
33323491 {
3333
- boolean epsequal = GraphreeD.epsequal;
3334
- GraphreeD.epsequal = true;
3492
+ boolean epsequal = GrafreeD.epsequal;
3493
+ GrafreeD.epsequal = true;
33353494
33363495 for (int i=0; i<group.selection.size(); i++)
33373496 {
....@@ -3356,7 +3515,7 @@
33563515 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33573516 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33583517
3359
- g.add(GraphreeD.clipboard);
3518
+ g.add(GrafreeD.clipboard);
33603519
33613520 buffer.add(g);
33623521 }
....@@ -3371,7 +3530,7 @@
33713530 makeSomething(buffer, i==group.selection.size()-1);
33723531 }
33733532
3374
- GraphreeD.epsequal = epsequal;
3533
+ GrafreeD.epsequal = epsequal;
33753534
33763535 refreshContents();
33773536 }
....@@ -3389,7 +3548,7 @@
33893548 String pigment = Object3D.GetPigment(tex);
33903549 //String bump = Object3D.GetBump(tex);
33913550
3392
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3551
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
33933552
33943553 double s = v.s;
33953554
....@@ -3416,7 +3575,7 @@
34163575 scale /= 3;
34173576
34183577 scale /= 0xFF;
3419
- scale /= 4;
3578
+ // c'est quoi ca? scale /= 4;
34203579
34213580 //v.AO = scale;
34223581
....@@ -3437,12 +3596,26 @@
34373596
34383597 void Align()
34393598 {
3599
+ if (group.selection.size() == 0)
3600
+ return;
3601
+
3602
+ cVector bbmin = new cVector();
3603
+ cVector bbmax = new cVector();
3604
+
3605
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3606
+
3607
+ double dx = bbmax.x - bbmin.x;
3608
+ double dy = bbmax.y - bbmin.y;
3609
+ double dz = bbmax.z - bbmin.z;
3610
+
3611
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3612
+
34403613 for (int i=0; i<group.selection.size(); i++)
34413614 {
34423615 Object3D obj = group.selection.get(i);
34433616
3444
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3445
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3617
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3618
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34463619 }
34473620
34483621 refreshContents();
....@@ -3455,7 +3628,7 @@
34553628 // ref.SaveSupports();
34563629 // Object3D par = ref.parent;
34573630 // ref.parent = null;
3458
-// Object3D lowres = (Object3D) GraphreeD.clone(ref);
3631
+// Object3D lowres = (Object3D) GrafreeD.clone(ref);
34593632 // ref.parent = par;
34603633 // ref.RestoreSupports();
34613634
....@@ -3485,7 +3658,7 @@
34853658 // lowres.SaveSupports();
34863659 // par = lowres.parent;
34873660 // lowres.parent = null;
3488
-// Object3D newlow = (Object3D) GraphreeD.clone(lowres);
3661
+// Object3D newlow = (Object3D) GrafreeD.clone(lowres);
34893662 Object3D newlow = CloneObject(lowres, false);
34903663 newlow.name = sn.switchobject.get(i).name;
34913664 System.out.println(" pose#" + i + " = " + newlow);
....@@ -3507,7 +3680,7 @@
35073680 return;
35083681
35093682 Object3D poses = group.selection.get(0);
3510
- Object3D ref = GraphreeD.clipboard.get(0);
3683
+ Object3D ref = GrafreeD.clipboard.get(0);
35113684
35123685 Object3D newgroup = new Object3D("Po:" + poses.name);
35133686
....@@ -3676,7 +3849,7 @@
36763849 group.selection.RelinkToSupport(); // july 2014
36773850 System.out.println("DONE.");
36783851 refreshContents();
3679
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3852
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36803853 }
36813854
36823855 void ReduceMesh(boolean reduction34)
....@@ -3701,20 +3874,20 @@
37013874
37023875 void ClipMesh()
37033876 {
3704
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
3877
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
37053878 {
3706
- Object3D content = GraphreeD.clipboard.get(0);
3879
+ Object3D content = GrafreeD.clipboard.get(0);
37073880
37083881 if (content instanceof cGroup && ((cGroup)content).transientlink )
37093882 content = ((cGroup)content).get(0);
37103883
37113884 // for (int i=0; i<group.selection.size(); i++)
37123885 // {
3713
-// group.selection.get(i).ClipMesh(GraphreeD.clipboard);
3886
+// group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37143887 // }
3715
- group.selection.ClipMesh(GraphreeD.clipboard);
3888
+ group.selection.ClipMesh(GrafreeD.clipboard);
37163889 }
3717
-// group.selection.ClipMesh(GraphreeD.clipboard);
3890
+// group.selection.ClipMesh(GrafreeD.clipboard);
37183891 System.out.println("DONE.");
37193892 refreshContents();
37203893 }
....@@ -3961,16 +4134,16 @@
39614134
39624135 objEditor.SetText(); // jan 2014
39634136
3964
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4137
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
39654138 CameraPane.flash = true;
39664139
39674140 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39684141 // a camera
39694142 {
39704143 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;
4144
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4145
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4146
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39744147 }
39754148
39764149 refreshContents();
....@@ -4052,12 +4225,12 @@
40524225 {
40534226 if (group.selection.isEmpty())
40544227 return;
4055
- GraphreeD.clipboardIsTempGroup = false;
4228
+ GrafreeD.clipboardIsTempGroup = false;
40564229 Composite tGroup = null;
40574230 if (group.selection.size() > 0) // 1)
40584231 {
40594232 tGroup = new cGroup();
4060
- GraphreeD.clipboardIsTempGroup = true;
4233
+ GrafreeD.clipboardIsTempGroup = true;
40614234 }
40624235
40634236 if (cut)
....@@ -4097,16 +4270,16 @@
40974270 //System.out.println("cut " + child);
40984271 //System.out.println("parent = " + child.parent);
40994272 // tmp.addChild(child);
4100
- if (GraphreeD.clipboardIsTempGroup)
4273
+ if (GrafreeD.clipboardIsTempGroup)
41014274 tGroup.add/*Child*/(tmp);
41024275 else
4103
- GraphreeD.clipboard = tmp;
4276
+ GrafreeD.clipboard = tmp;
41044277 }
41054278 else
4106
- if (GraphreeD.clipboardIsTempGroup)
4279
+ if (GrafreeD.clipboardIsTempGroup)
41074280 tGroup.add/*Child*/(child);
41084281 else
4109
- GraphreeD.clipboard = child;
4282
+ GrafreeD.clipboard = child;
41104283 }
41114284
41124285 //ResetModel();
....@@ -4138,21 +4311,21 @@
41384311 //System.out.println("cut " + elem);
41394312 //System.out.println("parent = " + elem.parent);
41404313 // tmp.addChild(elem);
4141
- if (GraphreeD.clipboardIsTempGroup)
4314
+ if (GrafreeD.clipboardIsTempGroup)
41424315 tGroup.add/*Child*/(tmp);
41434316 else
4144
- GraphreeD.clipboard = tmp;
4317
+ GrafreeD.clipboard = tmp;
41454318 }
41464319 else
4147
- if (GraphreeD.clipboardIsTempGroup)
4320
+ if (GrafreeD.clipboardIsTempGroup)
41484321 tGroup.add/*Child*/(child);
41494322 else
4150
- GraphreeD.clipboard = child;
4323
+ GrafreeD.clipboard = child;
41514324 }
41524325
41534326 }
4154
- if (GraphreeD.clipboardIsTempGroup)
4155
- GraphreeD.clipboard = tGroup;
4327
+ if (GrafreeD.clipboardIsTempGroup)
4328
+ GrafreeD.clipboard = tGroup;
41564329 if (cut)
41574330 {
41584331 ResetModel();
....@@ -4162,11 +4335,11 @@
41624335
41634336 void paste(boolean expand)
41644337 {
4165
- // if (GraphreeD.clipboard == null)
4338
+ // if (GrafreeD.clipboard == null)
41664339 // return;
41674340 boolean first = true;
41684341
4169
- if (GraphreeD.clipboardIsTempGroup)
4342
+ if (GrafreeD.clipboardIsTempGroup)
41704343 {
41714344 Composite temp;
41724345
....@@ -4177,7 +4350,7 @@
41774350 temp = (Composite)Applet3D.clipboard.deepCopy();
41784351 */
41794352 Object3D elem;
4180
- for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4353
+ for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41814354 {
41824355 Object3D child = (Object3D)e.nextElement();
41834356
....@@ -4191,7 +4364,7 @@
41914364 else
41924365 elem = child.deepCopy(); // ?
41934366 child.parent = keepparent;
4194
- //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
4367
+ //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
41954368 // elem = elem.get(0);
41964369 makeSomething(elem, true); // ?? first);
41974370 //group.addChild(elem);
....@@ -4211,14 +4384,14 @@
42114384 //Object3D cb = Applet3D.clipboard;
42124385 //temp.addChild(cb);
42134386 //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());
4387
+ assert(GrafreeD.clipboard.parent == null);
4388
+ Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4389
+ GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4390
+ if (LA.isIdentity(GrafreeD.clipboard.toParent))
4391
+ makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
42194392 else
4220
- makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy());
4221
- GraphreeD.clipboard.get(0).parent = keepparent;
4393
+ makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4394
+ GrafreeD.clipboard.get(0).parent = keepparent;
42224395 }
42234396
42244397 ResetModel();
....@@ -4227,7 +4400,7 @@
42274400
42284401 void pasteInto(boolean copyit)
42294402 {
4230
-// if (GraphreeD.clipboard == null)
4403
+// if (GrafreeD.clipboard == null)
42314404 // return;
42324405
42334406 if (group.selection.size() != 1)
....@@ -4260,9 +4433,9 @@
42604433 {
42614434 boolean first = true;
42624435
4263
- if (GraphreeD.clipboardIsTempGroup)
4436
+ if (GrafreeD.clipboardIsTempGroup)
42644437 {
4265
- Composite temp = (Composite)GraphreeD.clipboard;
4438
+ Composite temp = (Composite)GrafreeD.clipboard;
42664439 Object3D copy;
42674440 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42684441 {
....@@ -4272,7 +4445,7 @@
42724445 }
42734446 } else
42744447 {
4275
- linkSomething(GraphreeD.clipboard); //.get(0));
4448
+ linkSomething(GrafreeD.clipboard); //.get(0));
42764449 }
42774450 }
42784451 }
....@@ -4464,6 +4637,26 @@
44644637 makeSomething(csg);
44654638 }
44664639
4640
+ void Ungroup(Object3D g)
4641
+ {
4642
+ if (g instanceof HiddenObject)
4643
+ {
4644
+ HiddenObject h = (HiddenObject) g;
4645
+
4646
+ for (int i=0; i<h.ActualSize(); i++)
4647
+ {
4648
+ objEditor.makeSomething(h.get(i), false);
4649
+ }
4650
+ }
4651
+ else
4652
+ {
4653
+ for (int i=0; i<g.Size(); i++)
4654
+ {
4655
+ objEditor.makeSomething(g.get(i), false);
4656
+ }
4657
+ }
4658
+ }
4659
+
44674660 void ungroup()
44684661 {
44694662 /*
....@@ -4659,7 +4852,7 @@
46594852
46604853 void ImportGFD()
46614854 {
4662
- FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD);
4855
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
46634856 browser.show();
46644857 String filename = browser.getFile();
46654858 if (filename != null && filename.length() > 0)
....@@ -4697,7 +4890,7 @@
46974890
46984891 void ImportVRMLX3D()
46994892 {
4700
- if (GraphreeD.standAlone)
4893
+ if (GrafreeD.standAlone)
47014894 {
47024895 /**/
47034896 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4714,7 +4907,7 @@
47144907
47154908 String GetFile(String dialogName)
47164909 {
4717
- if (GraphreeD.standAlone)
4910
+ if (GrafreeD.standAlone)
47184911 {
47194912 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47204913 browser.show();
....@@ -4823,6 +5016,7 @@
48235016 private MenuItem resetsupportItem;
48245017 private MenuItem resetreferencesItem;
48255018 private MenuItem linkverticesItem;
5019
+ private MenuItem relinkverticesItem;
48265020 private MenuItem setMasterItem;
48275021 private MenuItem resetMeshItem;
48285022 private MenuItem stepAllItem;
....@@ -4841,8 +5035,10 @@
48415035 private MenuItem clearItem;
48425036 private MenuItem clearAllItem;
48435037 private MenuItem genUVItem;
5038
+ private MenuItem genNormalsMESHItem;
48445039 private MenuItem genNormalsCADItem;
48455040 private MenuItem genNormalsORGANItem;
5041
+ private MenuItem genNormalsMINEItem;
48465042 private MenuItem stripifyItem;
48475043 private MenuItem unstripifyItem;
48485044 private MenuItem trimItem;
....@@ -4884,6 +5080,7 @@
48845080 private MenuItem resetCentroidItem;
48855081 private MenuItem transformgeometryItem;
48865082 private MenuItem resetTransformItem;
5083
+ private MenuItem hideItem;
48875084 private MenuItem grabItem;
48885085 private MenuItem backItem;
48895086 private MenuItem frontItem;
....@@ -4904,6 +5101,7 @@
49045101
49055102 private MenuItem resetParentItem;
49065103 private MenuItem repairParentItem;
5104
+ private MenuItem repairShadowItem;
49075105 private MenuItem sortbysizeItem;
49085106 private MenuItem sortbynameItem;
49095107
....@@ -4924,6 +5122,7 @@
49245122 private MenuItem coneItem;
49255123 private MenuItem torusItem;
49265124 private MenuItem superItem;
5125
+ private MenuItem kleinItem;
49275126 private MenuItem blobItem;
49285127 private MenuItem latheItem;
49295128 private MenuItem bezierItem;
....@@ -4936,6 +5135,7 @@
49365135 private MenuItem csgItem;
49375136 private MenuItem templateItem;
49385137 private MenuItem textureItem;
5138
+ private MenuItem billboardItem;
49395139 private MenuItem shadowXItem;
49405140 private MenuItem shadowYItem;
49415141 private MenuItem shadowZItem;