Normand Briere
2019-05-01 b1585b5b2b60c4165be400636c787fae24428c6a
GroupEditor.java
....@@ -12,9 +12,10 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
17
-class GroupEditor extends ObjEditor implements iParse, //iCallBack,
18
+class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
1819 ObjectUI,
1920 Runnable,
2021 ActionListener,
....@@ -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
....@@ -188,8 +189,9 @@
188189 clearItem.addActionListener(this);
189190 clearAllItem = menu.add(new MenuItem("Clear All"));
190191 clearAllItem.addActionListener(this);
191
- menu.add("-");
192
- resetMeshItem = menu.add(new MenuItem("Reset All"));
192
+
193
+ oe.menuBar.add(menu = new Menu("Setting"));
194
+ resetMeshItem = menu.add(new MenuItem("Reset All"));
193195 resetMeshItem.addActionListener(this);
194196 stepAllItem = menu.add(new MenuItem("Step All"));
195197 stepAllItem.addActionListener(this);
....@@ -218,18 +220,24 @@
218220 resetsupportItem.addActionListener(this);
219221 linkverticesItem = menu.add(new MenuItem("Link to Support"));
220222 linkverticesItem.addActionListener(this);
223
+ relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
224
+ relinkverticesItem.addActionListener(this);
221225 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
222226 setMasterItem.addActionListener(this);
223227
224
- oe.menuBar.add(menu = new Menu("Object"));
228
+ oe.menuBar.add(menu = new Menu("Group"));
225229 grabItem = menu.add(new MenuItem("Grab"));
226230 grabItem.addActionListener(this);
227
- frontItem = menu.add(new MenuItem("Front"));
228
- frontItem.addActionListener(this);
229231 backItem = menu.add(new MenuItem("Back"));
230232 backItem.addActionListener(this);
233
+ frontItem = menu.add(new MenuItem("Front"));
234
+ frontItem.addActionListener(this);
231235 compositeItem = menu.add(new MenuItem("Composite"));
232236 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);
233241 menu.add("-");
234242 randomItem = menu.add(new MenuItem("Random"));
235243 randomItem.addActionListener(this);
....@@ -247,9 +255,12 @@
247255 scriptNodeItem.addActionListener(this);
248256 cameraItem = menu.add(new MenuItem("Camera"));
249257 cameraItem.addActionListener(this);
250
- menu.add("-");
258
+
259
+ oe.menuBar.add(menu = new Menu("Object"));
251260 textureItem = menu.add(new MenuItem("Texture"));
252261 textureItem.addActionListener(this);
262
+ billboardItem = menu.add(new MenuItem("Billboard"));
263
+ billboardItem.addActionListener(this);
253264 csgItem = menu.add(new MenuItem("CSG"));
254265 csgItem.addActionListener(this);
255266 shadowXItem = menu.add(new MenuItem("Shadow X"));
....@@ -267,14 +278,12 @@
267278 pointflowItem = menu.add(new MenuItem("Point Flow"));
268279 pointflowItem.addActionListener(this);
269280 menu.add("-");
270
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
271
- transformgeometryItem.addActionListener(this);
272281 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
273282 resetTransformItem.addActionListener(this);
274283 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
275284 resetCentroidItem.addActionListener(this);
276
- ungroupItem = menu.add(new MenuItem("Ungroup"));
277
- ungroupItem.addActionListener(this);
285
+ transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
286
+ transformgeometryItem.addActionListener(this);
278287
279288 oe.menuBar.add(menu = new Menu("Geometry"));
280289 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -283,6 +292,10 @@
283292 genNormalsORGANItem.addActionListener(this);
284293 genNormalsCADItem = menu.add(new MenuItem("CAD Normals"));
285294 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);
286299 stripifyItem = menu.add(new MenuItem("Stripify"));
287300 stripifyItem.addActionListener(this);
288301 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -292,8 +305,6 @@
292305 untrimItem = menu.add(new MenuItem("Untrim"));
293306 untrimItem.addActionListener(this);
294307 menu.add("-");
295
- clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
296
- clearMaterialsItem.addActionListener(this);
297308 clearColorsItem = menu.add(new MenuItem("Clear AO"));
298309 clearColorsItem.addActionListener(this);
299310 reverseNormalsItem = menu.add(new MenuItem("Reverse Normals"));
....@@ -310,6 +321,10 @@
310321 smoothMeshItem.addActionListener(this);
311322 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
312323 clipMeshItem.addActionListener(this);
324
+
325
+ oe.menuBar.add(menu = new Menu("Attributes"));
326
+ clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
327
+ clearMaterialsItem.addActionListener(this);
313328 menu.add("-");
314329 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
315330 liveleavesItem.addActionListener(this);
....@@ -332,27 +347,18 @@
332347 flipVItem.addActionListener(this);
333348 unflipVItem = menu.add(new MenuItem("Unflip V"));
334349 unflipVItem.addActionListener(this);
335
- lowTexturesItem = menu.add(new MenuItem("Low Texture"));
350
+ lowTexturesItem = menu.add(new MenuItem("Low Texture (256)"));
336351 lowTexturesItem.addActionListener(this);
337
- normalTexturesItem = menu.add(new MenuItem("Normal Texture"));
352
+ normalTexturesItem = menu.add(new MenuItem("Normal Texture (512)"));
338353 normalTexturesItem.addActionListener(this);
339
- highTexturesItem = menu.add(new MenuItem("High Texture"));
354
+ highTexturesItem = menu.add(new MenuItem("High Texture (1024)"));
340355 highTexturesItem.addActionListener(this);
341
- veryhighTexturesItem = menu.add(new MenuItem("Very high Texture"));
356
+ veryhighTexturesItem = menu.add(new MenuItem("Very high Texture (2048)"));
342357 veryhighTexturesItem.addActionListener(this);
343
- maxTexturesItem = menu.add(new MenuItem("Max Texture"));
358
+ maxTexturesItem = menu.add(new MenuItem("Max Texture (4096)"));
344359 maxTexturesItem.addActionListener(this);
345
- panoTexturesItem = menu.add(new MenuItem("Panoramic Texture"));
360
+ panoTexturesItem = menu.add(new MenuItem("Panoramic Texture (8192)"));
346361 panoTexturesItem.addActionListener(this);
347
- menu.add("-");
348
- extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
349
- extractGeometriesItem.addActionListener(this);
350
- cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
351
- cloneGeometriesItem.addActionListener(this);
352
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
353
- shareGeometriesItem.addActionListener(this);
354
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
355
- mergeGeometriesItem.addActionListener(this);
356362
357363 oe.menuBar.add(menu = new Menu("Selection"));
358364 attachPigmentItem = menu.add(new MenuItem("Attach Pigment..."));
....@@ -370,9 +376,31 @@
370376 sortbysizeItem.addActionListener(this);
371377 sortbynameItem = menu.add(new MenuItem("Sort by name"));
372378 sortbynameItem.addActionListener(this);
379
+ menu.add("-");
380
+ extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
381
+ extractGeometriesItem.addActionListener(this);
382
+ cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
383
+ cloneGeometriesItem.addActionListener(this);
384
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
385
+ shareGeometriesItem.addActionListener(this);
386
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
387
+ mergeGeometriesItem.addActionListener(this);
388
+
373389 oe.menuBar.add(menu = new Menu("Insert"));
374390 buildCreateMenu(menu);
375
- oe.menuBar.add(menu = new Menu("Tools"));
391
+
392
+
393
+ oe.menuBar.add(menu = new Menu("Include"));
394
+ importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
395
+ importGFDItem.addActionListener(this);
396
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
397
+ importVRMLX3DItem.addActionListener(this);
398
+ importOBJItem = menu.add(new MenuItem("OBJ Object..."));
399
+ importOBJItem.addActionListener(this);
400
+ import3DSItem = menu.add(new MenuItem("3DS Object..."));
401
+ import3DSItem.addActionListener(this);
402
+
403
+ oe.menuBar.add(menu = new Menu("Tools"));
376404 buildToolsMenu(menu);
377405 }
378406
....@@ -406,84 +434,26 @@
406434 oe.radioPanel.add(dummyButton);
407435 oe.buttonGroup.add(dummyButton);
408436 */
409
- aConstraints.gridy += 1;
410
- oe.aConstraints.gridwidth = 1;
411
- oe.aConstraints.gridx = 0;
437
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
412438
413
- 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");
414441 liveCB.addItemListener(this);
415442
416
- oe.aConstraints.gridx += 1;
417
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
418
- supportCB.addItemListener(this);
419
-
420
- // oe.aConstraints.gridx += 1;
421
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
422
- // localCB.addItemListener(this);
423
-
424
- oe.aConstraints.gridx += 1;
425
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
426
- crowdCB.addItemListener(this);
427
-
428
- oe.aConstraints.gridx += 1;
429
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
430
- smoothCB.addItemListener(this);
431
-
432
- oe.aConstraints.gridx += 1;
433
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
434
- fastCB.addItemListener(this);
435
- oe.aConstraints.gridx += 1;
436
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
437
- slowCB.addItemListener(this);
438
- oe.aConstraints.gridx += 1;
439
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
440
- boxCB.addItemListener(this);
441
-
442
-// oe.aConstraints.gridx += 1;
443
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
444
-// speakerMocapCB.addItemListener(this);
445
-
446
- if (false)
447
- {
448
- // handled in scripts
449
- oe.aConstraints.gridx += 1;
450
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
451
- speakerCameraCB.addItemListener(this);
452
-
453
- oe.aConstraints.gridx += 1;
454
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
455
- speakerFocusCB.addItemListener(this);
456
-
457
- oe.aConstraints.gridx += 1;
458
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
459
- smoothfocusCB.addItemListener(this);
460
- }
461
-
462
-//oe.aConstraints.gridx += 1;
463
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
464
-// debugCB.addItemListener(this);
465
-
466
- oe.aConstraints.gridx += 1;
467
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
468
- oeilCB.addItemListener(this);
469
-
470
- oe.aConstraints.gridx += 1;
471
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
472
- lookAtCB.addItemListener(this);
473
-
474
- oe.aConstraints.gridx += 1;
475
- 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");
476445 trackCB.addItemListener(this);
477446
478
- oe.aConstraints.gridx += 1;
479
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
447
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
448
+ screenfitButton.setToolTipText("Screen fit");
480449 screenfitButton.addActionListener(this);
481
- oe.aConstraints.gridx += 1;
450
+
482451 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
483452 // screenfitpointButton.addActionListener(this);
484453 // oe.aConstraints.gridx += 1;
485
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
454
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
486455 snapobjectButton.addActionListener(this);
456
+ snapobjectButton.setToolTipText("Snap Object");
487457 oe.aConstraints.gridx += 1;
488458
489459 //aConstraints.gridx = 0;
....@@ -491,65 +461,66 @@
491461 oe.aConstraints.weighty = 0;
492462 oe.aConstraints.gridwidth = 1;
493463
494
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
464
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
465
+ flashSelectionButton.setToolTipText("Show selection");
495466 flashSelectionButton.addActionListener(this);
496
- oe.aConstraints.gridx += 1;
497
- oe.aConstraints.weighty = 0;
498
- oe.aConstraints.gridwidth = 1;
499467
500
- //
501
- 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");
502472 twoButton.addActionListener(this);
503
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
473
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504474 fourButton.addActionListener(this);
505
- 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");
506478 sixButton.addActionListener(this);
507
- 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");
508481 threeButton.addActionListener(this);
509
- 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");
510484 sevenButton.addActionListener(this);
511485 //
512486
513
- 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 selection in new tab");
514489 rootButton.addActionListener(this);
515
- oe.aConstraints.gridx += 1;
516
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
490
+
491
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492
+ closeButton.setToolTipText("Close tab");
517493 closeButton.addActionListener(this);
518494 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
519495 //clearButton.addActionListener(this);
520
- oe.aConstraints.gridx += 1;
521496
522
- oe.aConstraints.gridx = 1; //
523
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
497
+ cGridBag commandsPanel = new cGridBag();
498
+
499
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
500
+ editButton.setToolTipText("Edit selection");
524501 editButton.addActionListener(this);
525
- oe.aConstraints.gridx += 1;
526
- oe.aConstraints.weighty = 0;
527
- oe.aConstraints.gridwidth = 1;
528502
529
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
503
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504
+ uneditButton.setToolTipText("Unedit selection");
530505 uneditButton.addActionListener(this);
531506
532
- oe.aConstraints.gridx += 1;
533
- oe.aConstraints.weighty = 0;
534
- oe.aConstraints.gridwidth = 1;
535
-
536
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
507
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
508
+ clearPanelButton.setToolTipText("Clear edit panel");
537509 clearPanelButton.addActionListener(this);
538510
539
- oe.aConstraints.gridx += 1;
540
- oe.aConstraints.weighty = 0;
541
- oe.aConstraints.gridwidth = 1;
542
-
543
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
511
+ commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
512
+ allParamsButton.setToolTipText("All params??");
544513 allParamsButton.addActionListener(this);
545514
546
- oe.aConstraints.gridx += 1;
547
- oe.aConstraints.weighty = 0;
548
- oe.aConstraints.gridwidth = 1;
549
-
550
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
515
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516
+ unselectButton.setToolTipText("Unselect");
551517 unselectButton.addActionListener(this);
552518
519
+ commandsPanel.preferredHeight = 1;
520
+
521
+ oe.treePanel.add(commandsPanel);
522
+ oe.treePanel.Return();
523
+
553524 // oe.aConstraints.gridx += 1;
554525 // oe.aConstraints.weighty = 0;
555526 // oe.aConstraints.gridwidth = 1;
....@@ -561,40 +532,37 @@
561532 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
562533 // gcButton.addActionListener(this);
563534
564
- oe.aConstraints.gridx = 0;
565
- oe.aConstraints.gridy += 1;
566
-
567
- //ctrlPanel.add(objList = new List(5, true));
568
- oe.aConstraints.gridwidth = 100;
569
- // oe.aConstraints.gridheight = 100;
570
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
571
- oe.aConstraints.gridheight = 1;
572
- oe.aConstraints.weighty = 0.5;
573
- oe.aConstraints.gridx = 0;
574
- JScrollPane jSP;
535
+ cGridBag jSPPanel = new cGridBag();
536
+
537
+ JScrollPane jSP;
575538 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
576
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
539
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
577540 ResetModel();
578
- oe.aConstraints.weighty = 0.5;
579
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
580
- oe.aConstraints.gridy += 1;
581
- oe.aConstraints.gridwidth = 1;
541
+
542
+ oe.treePanel.add(jSPPanel);
543
+ oe.treePanel.Return();
582544
583
- oe.aConstraints.weighty = 0;
584
- oe.aConstraints.gridwidth = 2;
585
-
586
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
545
+ cGridBag copyOptionsPanel = new cGridBag();
546
+
547
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
548
+ colorCB.setToolTipText("Copy color when dropped");
587549 colorCB.addItemListener(this);
588
- oe.aConstraints.gridx += 2;
589
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
550
+
551
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
552
+ materialCB.setToolTipText("Copy material when dropped");
590553 materialCB.addItemListener(this);
591
- oe.aConstraints.gridx += 2;
592
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
554
+
555
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
556
+ textureCB.setToolTipText("Copy texture when dropped");
593557 textureCB.addItemListener(this);
594558
595
- oe.aConstraints.gridx = 0;
596
- oe.aConstraints.gridy += 1;
559
+ copyOptionsPanel.preferredHeight = 1;
560
+ oe.treePanel.add(copyOptionsPanel);
561
+ oe.treePanel.Return();
597562
563
+// mainPanel.setDividerLocation(0.5); //1.0);
564
+// mainPanel.setResizeWeight(0.5);
565
+
598566 //jList.addListSelectionListener(this);
599567 oe.jTree.addTreeSelectionListener(this);
600568 //jTree.setRootVisible(false);
....@@ -616,17 +584,97 @@
616584 radio.layout = sevenButton;
617585 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
618586 }
587
+
588
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
589
+ {
590
+ //constraints.gridx = 0;
591
+ //constraints.gridy = 0;
592
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
593
+ fastCB.setToolTipText("Fast mode");
594
+ fastCB.addItemListener(this);
595
+ //constraints.gridy += 1;
596
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
597
+ supportCB.setToolTipText("Enabled rigging");
598
+ supportCB.addItemListener(this);
599
+
600
+ // constraints.gridy += 1;
601
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
602
+ // localCB.addItemListener(this);
603
+
604
+ //constraints.gridy += 1;
605
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
606
+ crowdCB.setToolTipText("Used for crowds");
607
+ crowdCB.addItemListener(this);
608
+
609
+ //constraints.gridy += 1;
610
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
611
+ smoothCB.setToolTipText("Snapping delay");
612
+ smoothCB.addItemListener(this);
613
+
614
+ //constraints.gridy += 1;
615
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
616
+ slowCB.setToolTipText("Smooth interpolation");
617
+ slowCB.addItemListener(this);
618
+ //constraints.gridy += 1;
619
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
620
+ boxCB.setToolTipText("Display bounding boxes");
621
+ boxCB.addItemListener(this);
622
+ //constraints.gridy += 1;
623
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
624
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
625
+ zoomBoxCB.addItemListener(this);
626
+
627
+// constraints.gridy += 1;
628
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
629
+// speakerMocapCB.addItemListener(this);
630
+
631
+ if (false)
632
+ {
633
+ // handled in scripts
634
+ //constraints.gridy += 1;
635
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
636
+ speakerCameraCB.addItemListener(this);
637
+
638
+ //constraints.gridy += 1;
639
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
640
+ speakerFocusCB.addItemListener(this);
641
+
642
+ //constraints.gridy += 1;
643
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
644
+ smoothfocusCB.addItemListener(this);
645
+ }
646
+
647
+//constraints.gridx += 1;
648
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
649
+// debugCB.addItemListener(this);
650
+
651
+ //constraints.gridy += 1;
652
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
653
+ oeilCB.addItemListener(this);
654
+
655
+ //constraints.gridy += 1;
656
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
657
+ lookAtCB.setToolTipText("Look-at target");
658
+ lookAtCB.addItemListener(this);
659
+
660
+ cGridBag fill = new cGridBag();
661
+
662
+ fill.preferredHeight = 200;
663
+
664
+ panel.add(fill);
665
+
666
+ }
619667
620668 void EditObject(Object3D obj)
621669 {
622
- cRadio dummyButton = new cRadio(obj.name);
623
- dummyButton.SetObject(obj);
624
- dummyButton.layout = sevenButton;
625
- dummyButton.SetCamera(cameraView.renderCamera, false);
626
- dummyButton.addActionListener(this);
627
- radioPanel.add(dummyButton);
628
- buttonGroup.add(dummyButton);
629
- dummyButton.doClick();
670
+ cRadio radioButton = new cRadio(obj.name);
671
+ radioButton.SetObject(obj);
672
+ radioButton.layout = sevenButton;
673
+ radioButton.SetCamera(cameraView.renderCamera, false);
674
+ radioButton.addActionListener(this);
675
+ radioPanel.add(radioButton);
676
+ buttonGroup.add(radioButton);
677
+ radioButton.doClick();
630678 }
631679 void SetupViews(ObjEditor oe)
632680 {
....@@ -646,6 +694,7 @@
646694 JCheckBox fastCB;
647695 JCheckBox slowCB;
648696 JCheckBox boxCB;
697
+ JCheckBox zoomBoxCB;
649698 JCheckBox trackCB;
650699 JCheckBox smoothfocusCB;
651700 // JCheckBox speakerMocapCB;
....@@ -688,8 +737,7 @@
688737 dropAttributes |= Object3D.TEXTURE;
689738 else
690739 dropAttributes &= ~Object3D.TEXTURE;
691
- }
692
- else if(e.getSource() == liveCB)
740
+ } else if(e.getSource() == liveCB)
693741 {
694742 cameraView.ToggleLive();
695743 }
....@@ -726,6 +774,10 @@
726774 Recompile();
727775 cameraView.repaint();
728776 // refreshContents();
777
+ }
778
+ else if(e.getSource() == zoomBoxCB)
779
+ {
780
+ cameraView.ToggleZoomBoxMode();
729781 }
730782 else if(e.getSource() == smoothfocusCB)
731783 {
....@@ -1002,6 +1054,8 @@
10021054
10031055 void buildCreateMenu(Menu menu)
10041056 {
1057
+ //heightFieldItem = menu.add(new MenuItem("Height Field"));
1058
+ //heightFieldItem.addActionListener(this);
10051059 gridItem = menu.add(new MenuItem("Grid"));
10061060 gridItem.addActionListener(this);
10071061 rectoidItem = menu.add(new MenuItem("Box"));
....@@ -1014,6 +1068,8 @@
10141068 torusItem.addActionListener(this);
10151069 superItem = menu.add(new MenuItem("Superellipsoid"));
10161070 superItem.addActionListener(this);
1071
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1072
+ kleinItem.addActionListener(this);
10171073 particleItem = menu.add(new MenuItem("Particle system"));
10181074 particleItem.addActionListener(this);
10191075 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1048,15 +1104,6 @@
10481104 doubleItem.addActionListener(this);
10491105 tripleItem = menu.add(new MenuItem("Trident"));
10501106 tripleItem.addActionListener(this);
1051
- menu.add("-");
1052
- importGFDItem = menu.add(new MenuItem("GraphreeD Object..."));
1053
- importGFDItem.addActionListener(this);
1054
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
1055
- importVRMLX3DItem.addActionListener(this);
1056
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
1057
- importOBJItem.addActionListener(this);
1058
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
1059
- import3DSItem.addActionListener(this);
10601107 }
10611108
10621109 void buildToolsMenu(Menu menu)
....@@ -1068,6 +1115,8 @@
10681115 menu.add("-");
10691116 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10701117 parseverticesItem.addActionListener(this);
1118
+ textureFieldItem = menu.add(new MenuItem("Texture Field"));
1119
+ textureFieldItem.addActionListener(this);
10711120 alignItem = menu.add(new MenuItem("Align"));
10721121 alignItem.addActionListener(this);
10731122 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
....@@ -1094,6 +1143,8 @@
10941143 resetParentItem.addActionListener(this);
10951144 repairParentItem = menu.add(new MenuItem("Repair Parent"));
10961145 repairParentItem.addActionListener(this);
1146
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1147
+ repairShadowItem.addActionListener(this);
10971148 menu.add(invariantsItem = new MenuItem("Invariants"));
10981149 invariantsItem.addActionListener(this);
10991150 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1429,9 +1480,9 @@
14291480
14301481 void Overwrite(int mask)
14311482 {
1432
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1483
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
14331484 {
1434
- Object3D content = GraphreeD.clipboard.get(0);
1485
+ Object3D content = GrafreeD.clipboard.get(0);
14351486
14361487 if (content instanceof cGroup && ((cGroup)content).transientlink )
14371488 content = ((cGroup)content).get(0);
....@@ -1454,6 +1505,7 @@
14541505 //
14551506 public void actionPerformed(ActionEvent event) // , Object arg)
14561507 {
1508
+ Object source = event.getSource();
14571509 /*
14581510 if (event.getSource() == nameField)
14591511 {
....@@ -1465,11 +1517,11 @@
14651517 }
14661518 else
14671519 */
1468
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1520
+ if (source == lookAtItem || source == lookFromItem)
14691521 {
14701522 ScreenFit();
14711523 } else
1472
- if (event.getSource() == switchItem)
1524
+ if (source == switchItem)
14731525 {
14741526 cVector v1 = new cVector();
14751527 cVector v2 = new cVector();
....@@ -1478,11 +1530,11 @@
14781530 objEditor.cameraView.renderCamera.setAim(v2, v1);
14791531 objEditor.cameraView.repaint();
14801532 } else
1481
- if (event.getSource() == rectoidItem)
1533
+ if (source == rectoidItem)
14821534 {
14831535 makeSomething(new Box());
14841536 } else
1485
- if (event.getSource() == particleItem)
1537
+ if (source == particleItem)
14861538 {
14871539 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
14881540 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1503,9 +1555,9 @@
15031555 applyExample(particleGeom, "SMOKE");
15041556 makeSomething(particleGeom);
15051557 } else
1506
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1558
+ if (source == ragdollItem || source == ragdoll2Item)
15071559 {
1508
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1560
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15091561
15101562 ragdoll.toParent = LA.newMatrix();
15111563 ragdoll.fromParent = LA.newMatrix();
....@@ -1521,27 +1573,71 @@
15211573 makeSomething(ragdoll);
15221574 //makeSomething(new VehicleDemo());
15231575 } else
1524
- if (event.getSource() == gridItem)
1576
+ /*
1577
+ */
1578
+ if (source == heightFieldItem)
1579
+ {
1580
+ Object3D obj = new Object3D();
1581
+
1582
+ obj.CreateMaterial();
1583
+ obj.bRep = new BoundaryRep();
1584
+
1585
+ obj.bRep.CreateMesh(new iHeightField()
1586
+ {
1587
+ public double f(double x, double y)
1588
+ {
1589
+ // The Mandelbrot set is represented by coloring
1590
+ // each point (x,y) according to the number of
1591
+ // iterations it takes before the while loop in
1592
+ // this method ends. For points that are actually
1593
+ // in the Mandelbrot set, or very close to it, the
1594
+ // count will reach the maximum value, 80. These
1595
+ // points will be colored purple. All other colors
1596
+ // represent points that are definitely NOT in the set.
1597
+ x -= 600;
1598
+ y -= 500;
1599
+ x /= 200;
1600
+ y /= 200;
1601
+ int count = 0;
1602
+ double zx = x;
1603
+ double zy = y;
1604
+ while (count < 80 && Math.abs(x) < 100 && Math.abs(zy) < 100) {
1605
+ double new_zx = zx*zx - zy*zy + x;
1606
+ zy = 2*zx*zy + y;
1607
+ zx = new_zx;
1608
+ count++;
1609
+ }
1610
+ return count; // Math.sqrt(count);
1611
+ }
1612
+ }, 1000,1000);
1613
+
1614
+ makeSomething(obj);
1615
+ } else
1616
+ if (source == gridItem)
15251617 {
15261618 makeSomething(new Grid());
15271619 } else
1528
- if (event.getSource() == ellipsoidItem)
1620
+ if (source == ellipsoidItem)
15291621 {
15301622 makeSomething(new Sphere());
15311623 } else
1532
- if (event.getSource() == coneItem)
1624
+ if (source == coneItem)
15331625 {
15341626 makeSomething(new Cone());
15351627 } else
1536
- if (event.getSource() == torusItem)
1628
+ if (source == torusItem)
15371629 {
15381630 makeSomething(new Torus());
15391631 } else
1540
- if (event.getSource() == superItem)
1632
+ if (source == superItem)
15411633 {
15421634 makeSomething(new Superellipsoid());
15431635 } else
1544
- if (event.getSource() == blobItem)
1636
+ if (source == kleinItem)
1637
+ {
1638
+ makeSomething(new Klein());
1639
+ } else
1640
+ if (source == blobItem)
15451641 {
15461642 Blob blob = new Blob();
15471643 BlobComponent comp = new BlobComponent();
....@@ -1549,15 +1645,15 @@
15491645 //blob.retile();
15501646 makeSomething(blob);
15511647 } else
1552
- if (event.getSource() == latheItem)
1648
+ if (source == latheItem)
15531649 {
15541650 makeSomething(new Lathe());
15551651 } else
1556
- if (event.getSource() == bezierItem)
1652
+ if (source == bezierItem)
15571653 {
15581654 makeSomething(new BezierSurface());
15591655 } else
1560
- if (event.getSource() == checkerItem)
1656
+ if (source == checkerItem)
15611657 {
15621658 /*
15631659 Object3D obj = new BezierSurface(5,8);
....@@ -1570,9 +1666,9 @@
15701666 LA.matConcat(obj.toParent, cameraView.renderCamera.fromParent, obj.toParent);
15711667 LA.matInvert(obj.toParent, obj.fromParent);
15721668 */
1573
- makeSomething(new CheckerIG());
1669
+ makeSomething(new Checker());
15741670 } else
1575
- if (event.getSource() == meshItem)
1671
+ if (source == meshItem)
15761672 {
15771673 Object3D itemtomake = new Object3D();
15781674 Object3D child;
....@@ -1593,35 +1689,35 @@
15931689 makeSomething(child);
15941690 }
15951691 } else
1596
- if (event.getSource() == springItem)
1692
+ if (source == springItem)
15971693 {
15981694 cSpring s = new cSpring();
15991695 s.setup();
16001696 makeSomething(s);
16011697 } else
1602
- if (event.getSource() == flagItem)
1698
+ if (source == flagItem)
16031699 {
16041700 cSpring s = new cFlag();
16051701 s.setup();
16061702 makeSomething(s);
16071703 } else
1608
- if (event.getSource() == lightItem)
1704
+ if (source == lightItem)
16091705 {
16101706 makeSomething(new Light());
16111707 } else
1612
- if (event.getSource() == csgItem)
1708
+ if (source == csgItem)
16131709 {
16141710 group(new CSG());
16151711 } else
1616
- if (event.getSource() == templateItem)
1712
+ if (source == templateItem)
16171713 {
16181714 group(new cTemplate());
16191715 } else
1620
- if (event.getSource() == attributeItem)
1716
+ if (source == attributeItem)
16211717 {
16221718 makeSomething(new Attribute());
16231719 } else
1624
- if (event.getSource() == pointflowItem)
1720
+ if (source == pointflowItem)
16251721 {
16261722 makeSomething(new PointFlow());
16271723 } else
....@@ -1633,7 +1729,7 @@
16331729 } else
16341730 */
16351731
1636
- if (event.getSource() == superLoopItem)
1732
+ if (source == superLoopItem)
16371733 {
16381734 Composite g = new cGroup();
16391735 for (int i=0; i<15; i++)
....@@ -1655,7 +1751,7 @@
16551751
16561752 group(g);
16571753 } else
1658
- if (event.getSource() == loopItem)
1754
+ if (source == loopItem)
16591755 {
16601756 Composite csg = new GroupLeaf();
16611757 csg.count = 5;
....@@ -1664,7 +1760,7 @@
16641760 csg.addChild(child);
16651761 child.addChild(csg);
16661762 } else
1667
- if (event.getSource() == doubleItem)
1763
+ if (source == doubleItem)
16681764 {
16691765 Composite csg = new GroupLeaf();
16701766 csg.count = 5;
....@@ -1676,7 +1772,7 @@
16761772 csg.addChild(child);
16771773 child.addChild(csg);
16781774 } else
1679
- if (event.getSource() == tripleItem)
1775
+ if (source == tripleItem)
16801776 {
16811777 Composite csg = new GroupLeaf();
16821778 csg.count = 4;
....@@ -1692,70 +1788,70 @@
16921788 child.addChild(csg);
16931789 } else
16941790
1695
- if (event.getSource() == importGFDItem)
1791
+ if (source == importGFDItem)
16961792 {
16971793 ImportGFD();
16981794 } else
1699
- if (event.getSource() == importVRMLX3DItem)
1795
+ if (source == importVRMLX3DItem)
17001796 {
17011797 ImportVRMLX3D();
17021798 } else
1703
- if (event.getSource() == import3DSItem)
1799
+ if (source == import3DSItem)
17041800 {
17051801 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17061802 } else
1707
- if (event.getSource() == importOBJItem)
1803
+ if (source == importOBJItem)
17081804 {
17091805 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17101806 } else
1711
- if (event.getSource() == computeAOItem)
1807
+ if (source == computeAOItem)
17121808 {
1713
- CameraPane.drawMode = CameraPane.OCCLUSION;
1714
- CameraPane.theRenderer.repaint();
1809
+ Globals.drawMode = CameraPane.OCCLUSION;
1810
+ Globals.theRenderer.repaint();
17151811 } else
1716
- if (event.getSource() == recompileItem)
1812
+ if (source == recompileItem)
17171813 {
17181814 Recompile();
17191815 refreshContents();
17201816 } else
1721
- if (event.getSource() == editScriptItem)
1817
+ if (source == editScriptItem)
17221818 {
17231819 OpenDialog();
17241820 refreshContents();
17251821 } else
1726
- if (event.getSource() == invariantsItem)
1822
+ if (source == invariantsItem)
17271823 {
17281824 System.out.println("Invariants:");
1729
- GraphreeD.theApplet3D.universe.invariants();
1825
+ GrafreeD.grafreeD.universe.invariants();
17301826 } else
1731
- if (event.getSource() == memoryItem)
1827
+ if (source == memoryItem)
17321828 {
17331829 //System.out.println("Invariants:");
17341830 PrintMemory();
17351831 } else
1736
- if (event.getSource() == pathItem)
1832
+ if (source == pathItem)
17371833 {
17381834 PrintPath();
17391835 } else
1740
- if (event.getSource() == analyzeItem)
1836
+ if (source == analyzeItem)
17411837 {
17421838 AnalyzeObject();
17431839 } else
1744
- if (event.getSource() == dumpItem)
1840
+ if (source == dumpItem)
17451841 {
17461842 DumpObject();
17471843 } else
1748
- if (event.getSource() == screenfitButton)
1844
+ if (source == screenfitButton)
17491845 {
17501846 //Reload(lastConverter, lastFilename, true);
17511847 ScreenFit();
17521848 } else
1753
- if (event.getSource() == screenfitpointButton)
1849
+ if (source == screenfitpointButton)
17541850 {
17551851 //Reload(lastConverter, lastFilename, true);
17561852 ScreenFitPoint();
17571853 } else
1758
- if (event.getSource() == snapobjectButton)
1854
+ if (source == snapobjectButton)
17591855 {
17601856 //Reload(lastConverter, lastFilename, true);
17611857 SnapObject();
....@@ -1766,13 +1862,13 @@
17661862 // Recompile();
17671863 // refreshContents();
17681864 // } else
1769
- if (event.getSource() == gcButton)
1865
+ if (source == gcButton)
17701866 {
17711867 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
17721868 System.gc();
17731869 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
17741870 } else
1775
- if (event.getSource() == editLeafItem)
1871
+ if (source == editLeafItem)
17761872 {
17771873 Object3D obj;
17781874 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1786,65 +1882,66 @@
17861882 }
17871883 refreshContents(true);
17881884 } else
1789
- if (event.getSource() == openWindowItem)
1885
+ if (source == openWindowItem)
17901886 {
17911887 EditSelection(true);
17921888 } else
1793
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1889
+ if (source == cutItem || source == clearButton)
17941890 {
17951891 loadClipboard(true);
17961892 } else
1797
- if (event.getSource() == duplicateItem)
1893
+ if (source == duplicateItem)
17981894 {
1799
- Object3D keep = GraphreeD.clipboard;
1895
+ Object3D keep = GrafreeD.clipboard;
18001896 loadClipboard(false);
18011897 paste(false);
1802
- GraphreeD.clipboard = keep;
1898
+ GrafreeD.clipboard = keep;
18031899 } else
1804
- if (event.getSource() == cloneItem)
1900
+ if (source == cloneItem)
18051901 {
18061902 CloneSelection(false);
18071903 } else
1808
- if (event.getSource() == cloneSupportItem)
1904
+ if (source == cloneSupportItem)
18091905 {
18101906 CloneSelection(true);
18111907 } else
1812
- if (event.getSource() == copyItem)
1908
+ if (source == copyItem)
18131909 {
18141910 loadClipboard(false);
18151911 } else
1816
- if (event.getSource() == pasteItem)
1912
+ if (source == pasteItem)
18171913 {
18181914 paste(false);
18191915 } else
1820
- if (event.getSource() == pasteLinkItem)
1916
+ if (source == pasteLinkItem)
18211917 {
18221918 pasteInto(false);
18231919 } else
1824
- if (event.getSource() == pasteCloneItem)
1920
+ if (source == pasteCloneItem)
18251921 {
18261922 pasteInto(true);
18271923 } else
1828
- if (event.getSource() == pasteExpandItem)
1924
+ if (source == pasteExpandItem)
18291925 {
18301926 paste(true);
18311927 } else
1832
- if (event.getSource() == synchronizeItem)
1928
+ if (source == synchronizeItem)
18331929 {
18341930 Overwrite(Object3D.TRANSFORM);
18351931 } else
1836
- if (event.getSource() == overwriteNameItem)
1932
+ if (source == overwriteNameItem)
18371933 {
18381934 Overwrite(Object3D.NAME);
18391935 } else
1840
- if (event.getSource() == overwriteUVItem)
1936
+ if (source == overwriteUVItem)
18411937 {
18421938 Overwrite(Object3D.UV);
18431939 } else
1844
- if (event.getSource() == overwriteMatItem)
1940
+ if (source == overwriteMatItem)
18451941 {
1942
+ /* july 2015
18461943 if ((dropAttributes & Object3D.TEXTURE) == 0)
1847
- Overwrite(Object3D.MATERIAL);
1944
+ Overwrite(Object3D.MATERIAL | Object3D.COLOR);
18481945 else
18491946 {
18501947 if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0)
....@@ -1856,13 +1953,16 @@
18561953 Overwrite(Object3D.MATERIAL | Object3D.TEXTURE);
18571954 }
18581955 }
1956
+ */
1957
+
1958
+ Overwrite(dropAttributes);
18591959 }
1860
- if (event.getSource() == overwriteGeoItem)
1960
+ if (source == overwriteGeoItem)
18611961 {
18621962 Overwrite(Object3D.GEOMETRY);
1863
-// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1963
+// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
18641964 // {
1865
-// Object3D content = GraphreeD.clipboard.get(0);
1965
+// Object3D content = GrafreeD.clipboard.get(0);
18661966 //
18671967 // if (content instanceof cGroup && ((cGroup)content).transientlink )
18681968 // content = ((cGroup)content).get(0);
....@@ -1874,7 +1974,7 @@
18741974 // refreshContents();
18751975 // }
18761976 } else
1877
- if (event.getSource() == generateMeshItem)
1977
+ if (source == generateMeshItem)
18781978 {
18791979 //if (group.selection.size() == 1)
18801980 // for (int i=0; i<group.selection.size(); i++)
....@@ -1885,7 +1985,7 @@
18851985 ResetModel();
18861986 refreshContents();
18871987 } else
1888
- if (event.getSource() == extractGeometriesItem)
1988
+ if (source == extractGeometriesItem)
18891989 {
18901990 boolean one = false;
18911991
....@@ -1912,7 +2012,7 @@
19122012 ResetModel();
19132013 refreshContents();
19142014 } else
1915
- if (event.getSource() == cloneGeometriesItem)
2015
+ if (source == cloneGeometriesItem)
19162016 {
19172017 boolean one = false;
19182018
....@@ -1938,32 +2038,37 @@
19382038 ResetModel();
19392039 refreshContents();
19402040 } else
1941
- if (event.getSource() == shareGeometriesItem)
2041
+ if (source == shareGeometriesItem)
19422042 {
19432043 boolean one = false;
19442044
19452045 if (group.selection.size() == 1)
19462046 one = true;
19472047
2048
+ Object3D merge = null;
2049
+
19482050 Object3D content = new cGroup();
19492051
19502052 for (int i=0; i<group.selection.size(); i++)
19512053 {
1952
- Object3D sel = new Merge(group.selection.get(i));
2054
+ merge = new Merge(group.selection.get(i));
19532055
19542056 if (one)
1955
- makeSomething(sel, false);
2057
+ makeSomething(merge, false);
19562058 else
1957
- content.addChild(sel);
2059
+ content.addChild(merge);
19582060 }
19592061
19602062 if (!one)
1961
- makeSomething(content, false);
1962
-
1963
- ResetModel();
1964
- refreshContents();
2063
+ makeSomething(content, true);
2064
+ else
2065
+ {
2066
+ ResetModel();
2067
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2068
+ refreshContents();
2069
+ }
19652070 } else
1966
- if (event.getSource() == mergeGeometriesItem)
2071
+ if (source == mergeGeometriesItem)
19672072 {
19682073 boolean one = false;
19692074
....@@ -1993,11 +2098,11 @@
19932098 ResetModel();
19942099 refreshContents();
19952100 } else
1996
- if (event.getSource() == linkverticesItem)
2101
+ if (source == linkverticesItem)
19972102 {
1998
-// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2103
+// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
19992104 // {
2000
-// Object3D content = GraphreeD.clipboard.get(0);
2105
+// Object3D content = GrafreeD.clipboard.get(0);
20012106 //
20022107 // if (content instanceof cGroup && ((cGroup)content).transientlink )
20032108 // content = ((cGroup)content).get(0);
....@@ -2006,14 +2111,14 @@
20062111 // group.selection.get(0).setMasterThis(content); // should be identity
20072112 // refreshContents();
20082113 // }
2009
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2114
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
20102115 {
2011
- Object3D content = GraphreeD.clipboard.get(0);
2116
+ Object3D content = GrafreeD.clipboard.get(0);
20122117
20132118 if (content instanceof cGroup && ((cGroup)content).transientlink )
20142119 content = ((cGroup)content).get(0);
20152120
2016
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2121
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20172122 for (int i=0; i<group.selection.size(); i++)
20182123 {
20192124 boolean random = CameraPane.RANDOM;
....@@ -2022,11 +2127,11 @@
20222127 // group.selection.get(i).setMasterThis(content); // should be identity
20232128 CameraPane.RANDOM = random;
20242129 }
2025
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2130
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20262131 refreshContents();
20272132 }
20282133 } else
2029
- if (event.getSource() == resetsupportItem)
2134
+ if (source == resetsupportItem)
20302135 {
20312136 for (int i=0; i<group.selection.size(); i++)
20322137 {
....@@ -2038,7 +2143,16 @@
20382143
20392144 refreshContents();
20402145 } else
2041
- if (event.getSource() == resetreferencesItem)
2146
+ if (source == relinkverticesItem)
2147
+ {
2148
+ boolean random = CameraPane.RANDOM;
2149
+ CameraPane.RANDOM = false; // parse all random nodes
2150
+ group.selection.RelinkToSupport();
2151
+ CameraPane.RANDOM = random;
2152
+
2153
+ refreshContents();
2154
+ } else
2155
+ if (source == resetreferencesItem)
20422156 {
20432157 for (int i=0; i<group.selection.size(); i++)
20442158 {
....@@ -2047,11 +2161,11 @@
20472161
20482162 refreshContents();
20492163 } else
2050
- if (event.getSource() == setMasterItem)
2164
+ if (source == setMasterItem)
20512165 {
2052
- if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2166
+ if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20532167 {
2054
- Object3D content = GraphreeD.clipboard.get(0);
2168
+ Object3D content = GrafreeD.clipboard.get(0);
20552169
20562170 if (content instanceof cGroup && ((cGroup)content).transientlink )
20572171 content = ((cGroup)content).get(0);
....@@ -2060,13 +2174,13 @@
20602174 refreshContents();
20612175 }
20622176 } else
2063
- if (event.getSource() == poseMeshItem)
2177
+ if (source == poseMeshItem)
20642178 {
20652179 if (group.selection.size() == 1)
20662180 {
2067
- if (GraphreeD.clipboard.size() == 1)
2181
+ if (GrafreeD.clipboard.size() == 1)
20682182 {
2069
- Object3D content = GraphreeD.clipboard.get(0);
2183
+ Object3D content = GrafreeD.clipboard.get(0);
20702184
20712185 if (content instanceof cGroup && ((cGroup)content).transientlink )
20722186 content = ((cGroup)content).get(0);
....@@ -2079,19 +2193,19 @@
20792193 }
20802194
20812195 } else
2082
- if (event.getSource() == revertMeshItem)
2196
+ if (source == revertMeshItem)
20832197 {
20842198 RevertMeshes();
20852199 } else
2086
- if (event.getSource() == resetMeshItem)
2200
+ if (source == resetMeshItem)
20872201 {
20882202 ResetAll();
20892203 } else
2090
- if (event.getSource() == stepAllItem)
2204
+ if (source == stepAllItem)
20912205 {
20922206 StepAll();
20932207 } else
2094
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2208
+ if (source == clearItem) // || event.getSource() == clearButton)
20952209 {
20962210 //int indices[] = jList.getSelectedIndices();
20972211 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2099,42 +2213,46 @@
20992213
21002214 ClearSelection(false);
21012215 } else
2102
- if (event.getSource() == clearAllItem)
2216
+ if (source == clearAllItem)
21032217 {
21042218 ClearSelection(true);
21052219 } else
2106
- if (event.getSource() == grabItem)
2220
+ if (source == grabItem)
21072221 {
21082222 group(new cGroup(), true);
21092223 } else
2110
- if (event.getSource() == frontItem)
2224
+ if (source == hideItem)
2225
+ {
2226
+ group(new HiddenObject());
2227
+ } else
2228
+ if (source == frontItem)
21112229 {
21122230 front();
21132231 } else
2114
- if (event.getSource() == backItem)
2232
+ if (source == backItem)
21152233 {
21162234 back();
21172235 } else
2118
- if (event.getSource() == cameraItem)
2236
+ if (source == cameraItem)
21192237 {
21202238 makeSomething(new Camera());
21212239 } else
2122
- if (event.getSource() == compositeItem)
2240
+ if (source == compositeItem)
21232241 {
21242242 group(new Composite());
21252243 } else
2126
- if (event.getSource() == randomItem)
2244
+ if (source == randomItem)
21272245 {
21282246 RandomNode random = new RandomNode();
21292247 group(random);
21302248 if (random.size() > 0)
21312249 random.name = random.get(0).name + "Rnd";
21322250 } else
2133
- if (event.getSource() == physicsItem)
2251
+ if (source == physicsItem)
21342252 {
21352253 group(new PhysicsNode());
21362254 } else
2137
- if (event.getSource() == frameselectorItem)
2255
+ if (source == frameselectorItem)
21382256 {
21392257 for (int i=0; i<group.selection.size(); i++)
21402258 {
....@@ -2146,7 +2264,7 @@
21462264 ResetModel();
21472265 refreshContents();
21482266 } else
2149
- if (event.getSource() == switchGeoItem)
2267
+ if (source == switchGeoItem)
21502268 {
21512269 for (int i=0; i<group.selection.size(); i++)
21522270 {
....@@ -2158,7 +2276,7 @@
21582276 ResetModel();
21592277 refreshContents();
21602278 } else
2161
- if (event.getSource() == switchTransfoItem)
2279
+ if (source == switchTransfoItem)
21622280 {
21632281 for (int i=0; i<group.selection.size(); i++)
21642282 {
....@@ -2170,7 +2288,7 @@
21702288 ResetModel();
21712289 refreshContents();
21722290 } else
2173
- if (event.getSource() == morphItem)
2291
+ if (source == morphItem)
21742292 {
21752293 for (int i=0; i<group.selection.size(); i++)
21762294 {
....@@ -2182,7 +2300,7 @@
21822300 ResetModel();
21832301 refreshContents();
21842302 } else
2185
- if (event.getSource() == scriptNodeItem)
2303
+ if (source == scriptNodeItem)
21862304 {
21872305 boolean atleastone = false;
21882306
....@@ -2221,191 +2339,215 @@
22212339 }
22222340 }
22232341 } else
2224
- if (event.getSource() == linkerItem)
2342
+ if (source == linkerItem)
22252343 {
22262344 group(new cLinker());
22272345 } else
2228
- if (event.getSource() == textureItem)
2346
+ if (source == textureItem)
22292347 {
22302348 group(new TextureNode());
22312349 } else
2232
- if (event.getSource() == shadowXItem)
2350
+ if (source == billboardItem)
2351
+ {
2352
+ group(new BillboardNode());
2353
+ } else
2354
+ if (source == shadowXItem)
22332355 {
22342356 CastShadow(0);
22352357 } else
2236
- if (event.getSource() == shadowYItem)
2358
+ if (source == shadowYItem)
22372359 {
22382360 CastShadow(1);
22392361 } else
2240
- if (event.getSource() == shadowZItem)
2362
+ if (source == shadowZItem)
22412363 {
22422364 CastShadow(2);
22432365 } else
2244
- if (event.getSource() == ungroupItem)
2366
+ if (source == ungroupItem)
22452367 {
2246
- ungroup();
2368
+ //ungroup();
2369
+ for (int i=0; i<group.selection.size(); i++)
2370
+ {
2371
+ Ungroup(group.selection.get(i));
2372
+ }
2373
+
2374
+ ClearSelection(false);
2375
+
2376
+ refreshContents();
22472377 } else
2248
- if (event.getSource() == genUVItem)
2378
+ if (source == genUVItem)
22492379 {
22502380 GenUV();
22512381 } else
2252
- if (event.getSource() == genNormalsCADItem)
2382
+ if (source == genNormalsCADItem)
22532383 {
22542384 GenNormals(true);
22552385 } else
2256
- if (event.getSource() == genNormalsORGANItem)
2386
+ if (source == genNormalsMESHItem)
2387
+ {
2388
+ GenNormals(true); // TODO
2389
+ } else
2390
+ if (source == genNormalsORGANItem)
22572391 {
22582392 GenNormals(false);
22592393 } else
2260
- if (event.getSource() == stripifyItem)
2394
+ if (source == genNormalsMINEItem)
2395
+ {
2396
+ GenNormalsMINE();
2397
+ } else
2398
+ if (source == stripifyItem)
22612399 {
22622400 Stripify();
22632401 } else
2264
- if (event.getSource() == unstripifyItem)
2402
+ if (source == unstripifyItem)
22652403 {
22662404 Unstripify();
22672405 } else
2268
- if (event.getSource() == trimItem)
2406
+ if (source == trimItem)
22692407 {
22702408 Trim();
22712409 } else
2272
- if (event.getSource() == untrimItem)
2410
+ if (source == untrimItem)
22732411 {
22742412 Untrim();
22752413 } else
2276
- if (event.getSource() == clearColorsItem)
2414
+ if (source == clearColorsItem)
22772415 {
22782416 ClearColors();
22792417 } else
2280
- if (event.getSource() == clearMaterialsItem)
2418
+ if (source == clearMaterialsItem)
22812419 {
22822420 ClearMaterials();
22832421 } else
2284
- if (event.getSource() == liveleavesItem)
2422
+ if (source == liveleavesItem)
22852423 {
22862424 LiveLeaves(true);
22872425 } else
2288
- if (event.getSource() == unliveleavesItem)
2426
+ if (source == unliveleavesItem)
22892427 {
22902428 LiveLeaves(false);
22912429 } else
2292
- if (event.getSource() == supportleavesItem)
2430
+ if (source == supportleavesItem)
22932431 {
22942432 SupportLeaves(true);
22952433 } else
2296
- if (event.getSource() == unsupportleavesItem)
2434
+ if (source == unsupportleavesItem)
22972435 {
22982436 SupportLeaves(false);
22992437 } else
2300
- if (event.getSource() == hideleavesItem)
2438
+ if (source == hideleavesItem)
23012439 {
23022440 HideLeaves(true);
23032441 } else
2304
- if (event.getSource() == showleavesItem)
2442
+ if (source == showleavesItem)
23052443 {
23062444 HideLeaves(false);
23072445 } else
2308
- if (event.getSource() == markleavesItem)
2446
+ if (source == markleavesItem)
23092447 {
23102448 MarkLeaves(true);
23112449 } else
2312
- if (event.getSource() == unmarkleavesItem)
2450
+ if (source == unmarkleavesItem)
23132451 {
23142452 MarkLeaves(false);
23152453 } else
2316
- if (event.getSource() == flipVItem)
2454
+ if (source == flipVItem)
23172455 {
23182456 FlipV(true);
23192457 } else
2320
- if (event.getSource() == unflipVItem)
2458
+ if (source == unflipVItem)
23212459 {
23222460 FlipV(false);
23232461 } else
2324
- if (event.getSource() == lowTexturesItem)
2462
+ if (source == lowTexturesItem)
23252463 {
23262464 SetTexRes(0);
23272465 } else
2328
- if (event.getSource() == normalTexturesItem)
2466
+ if (source == normalTexturesItem)
23292467 {
23302468 SetTexRes(1);
23312469 } else
2332
- if (event.getSource() == highTexturesItem)
2470
+ if (source == highTexturesItem)
23332471 {
23342472 SetTexRes(2);
23352473 } else
2336
- if (event.getSource() == veryhighTexturesItem)
2474
+ if (source == veryhighTexturesItem)
23372475 {
23382476 SetTexRes(3);
23392477 } else
2340
- if (event.getSource() == maxTexturesItem)
2478
+ if (source == maxTexturesItem)
23412479 {
23422480 SetTexRes(4);
23432481 } else
2344
- if (event.getSource() == panoTexturesItem)
2482
+ if (source == panoTexturesItem)
23452483 {
23462484 SetTexRes(5);
23472485 } else
2348
- if (event.getSource() == reverseNormalsItem)
2486
+ if (source == reverseNormalsItem)
23492487 {
23502488 ReverseNormals();
23512489 } else
2352
- if (event.getSource() == parseverticesItem)
2490
+ if (source == parseverticesItem)
23532491 {
23542492 ParseVertices();
23552493 } else
2356
- if (event.getSource() == alignItem)
2494
+ if (source == textureFieldItem)
2495
+ {
2496
+ TextureVertices();
2497
+ } else
2498
+ if (source == alignItem)
23572499 {
23582500 Align();
23592501 } else
2360
- if (event.getSource() == mirrorItem)
2502
+ if (source == mirrorItem)
23612503 {
23622504 MirrorPoses();
23632505 } else
2364
- if (event.getSource() == reduceMorphItem)
2506
+ if (source == reduceMorphItem)
23652507 {
23662508 MeshReduction(false);
23672509 } else
2368
- if (event.getSource() == reduce34MorphItem)
2510
+ if (source == reduce34MorphItem)
23692511 {
23702512 MeshReduction(true);
23712513 } else
2372
- if (event.getSource() == reverseTrianglesItem)
2514
+ if (source == reverseTrianglesItem)
23732515 {
23742516 ReverseTriangles();
23752517 } else
2376
- if (event.getSource() == reduceMeshItem)
2518
+ if (source == reduceMeshItem)
23772519 {
23782520 ReduceMesh(false);
23792521 } else
2380
- if (event.getSource() == reduce34MeshItem)
2522
+ if (source == reduce34MeshItem)
23812523 {
23822524 ReduceMesh(true);
23832525 } else
2384
- if (event.getSource() == increaseMeshItem)
2526
+ if (source == increaseMeshItem)
23852527 {
23862528 IncreaseMesh();
23872529 } else
2388
- if (event.getSource() == clipMeshItem)
2530
+ if (source == clipMeshItem)
23892531 {
23902532 ClipMesh();
23912533 } else
2392
- if (event.getSource() == smoothMeshItem)
2534
+ if (source == smoothMeshItem)
23932535 {
23942536 SmoothMesh();
23952537 } else
2396
- if (event.getSource() == transformgeometryItem)
2538
+ if (source == transformgeometryItem)
23972539 {
23982540 TransformGeometry();
23992541 } else
2400
- if (event.getSource() == resetTransformItem)
2542
+ if (source == resetTransformItem)
24012543 {
24022544 ResetTransform();
24032545 } else
2404
- if (event.getSource() == resetCentroidItem)
2546
+ if (source == resetCentroidItem)
24052547 {
24062548 ResetCentroid();
24072549 } else
2408
- if (event.getSource() == resetParentItem)
2550
+ if (source == resetParentItem)
24092551 {
24102552 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24112553 {
....@@ -2415,7 +2557,7 @@
24152557
24162558 refreshContents();
24172559 } else
2418
- if (event.getSource() == repairParentItem)
2560
+ if (source == repairParentItem)
24192561 {
24202562 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24212563 {
....@@ -2429,7 +2571,21 @@
24292571
24302572 refreshContents();
24312573 } else
2432
- if (event.getSource() == sortbysizeItem)
2574
+ if (source == repairShadowItem)
2575
+ {
2576
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2577
+ {
2578
+ Object3D obj = (Object3D)e.nextElement();
2579
+ obj.RepairShadow();
2580
+// for (int i=0; i<obj.size(); i++)
2581
+// {
2582
+// obj.get(i).parent = obj;
2583
+// }
2584
+ }
2585
+
2586
+ refreshContents();
2587
+ } else
2588
+ if (source == sortbysizeItem)
24332589 {
24342590 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24352591 {
....@@ -2441,7 +2597,7 @@
24412597 ResetModel();
24422598 refreshContents();
24432599 } else
2444
- if (event.getSource() == sortbynameItem)
2600
+ if (source == sortbynameItem)
24452601 {
24462602 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24472603 {
....@@ -2453,7 +2609,7 @@
24532609 ResetModel();
24542610 refreshContents();
24552611 } else
2456
- if (event.getSource() == attachPigmentItem)
2612
+ if (source == attachPigmentItem)
24572613 {
24582614 String texture = GetFile("Attach pigment");
24592615 Object3D obj;
....@@ -2465,7 +2621,7 @@
24652621
24662622 refreshContents();
24672623 } else
2468
- if (event.getSource() == detachPigmentItem)
2624
+ if (source == detachPigmentItem)
24692625 {
24702626 Object3D obj;
24712627 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2476,7 +2632,7 @@
24762632
24772633 refreshContents();
24782634 } else
2479
- if (event.getSource() == attachBumpItem)
2635
+ if (source == attachBumpItem)
24802636 {
24812637 String texture = GetFile("Attach bump");
24822638 Object3D obj;
....@@ -2488,7 +2644,7 @@
24882644
24892645 refreshContents();
24902646 } else
2491
- if (event.getSource() == detachBumpItem)
2647
+ if (source == detachBumpItem)
24922648 {
24932649 Object3D obj;
24942650 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2499,7 +2655,7 @@
24992655
25002656 refreshContents();
25012657 } else
2502
- if (event.getSource() == pigmentBumpItem)
2658
+ if (source == pigmentBumpItem)
25032659 {
25042660 Object3D obj;
25052661 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2510,158 +2666,195 @@
25102666
25112667 refreshContents();
25122668 } else
2513
- if (event.getSource() == flashSelectionButton)
2669
+ if (source == flashSelectionButton)
25142670 {
25152671 CameraPane.flash = true;
25162672 refreshContents();
25172673 } else
2518
- if (event.getSource() == oneButton)
2674
+ if (source == oneButton)
25192675 {
25202676 } else
2521
- if (event.getSource() == twoButton)
2677
+ if (source == twoButton)
25222678 {
25232679 radio.layout = twoButton;
25242680 // bug
25252681 //gridPanel.setDividerLocation(1.0);
25262682 //bigPanel.setDividerLocation(0.0);
2527
- bigThree.remove(jtp);
2528
- bigThree.remove(cameraPanel);
2529
- bigThree.remove(XYZPanel);
2530
- aWindowConstraints.gridx = 0;
2531
- aWindowConstraints.gridy = 0;
2532
- aWindowConstraints.gridwidth = 1;
2533
- // aConstraints.gridheight = 3;
2534
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2535
- aWindowConstraints.weightx = 0;
2536
- aWindowConstraints.weighty = 1;
2537
- //bigThree.add(jtp, aWindowConstraints);
2538
- aWindowConstraints.weightx = 1;
2539
- aWindowConstraints.gridwidth = 3;
2540
- // aConstraints.gridheight = 3;
2541
- aWindowConstraints.gridx = 1;
2542
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2543
- bigThree.add(cameraPanel, aWindowConstraints);
2544
- aWindowConstraints.weightx = 0;
2545
- aWindowConstraints.gridx = 4;
2546
- aWindowConstraints.gridwidth = 1;
2547
- // aConstraints.gridheight = 3;
2548
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2549
- //bigThree.add(XYZPanel, aWindowConstraints);
2550
- bigThree.revalidate();
2683
+// bigThree.remove(scenePanel);
2684
+// bigThree.remove(centralPanel);
2685
+// bigThree.remove(XYZPanel);
2686
+// aWindowConstraints.gridx = 0;
2687
+// aWindowConstraints.gridy = 0;
2688
+// aWindowConstraints.gridwidth = 1;
2689
+// // aConstraints.gridheight = 3;
2690
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2691
+// aWindowConstraints.weightx = 0;
2692
+// aWindowConstraints.weighty = 1;
2693
+// //bigThree.add(jtp, aWindowConstraints);
2694
+// aWindowConstraints.weightx = 1;
2695
+// aWindowConstraints.gridwidth = 3;
2696
+// // aConstraints.gridheight = 3;
2697
+// aWindowConstraints.gridx = 1;
2698
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2699
+// bigThree.add(centralPanel, aWindowConstraints);
2700
+// aWindowConstraints.weightx = 0;
2701
+// aWindowConstraints.gridx = 4;
2702
+// aWindowConstraints.gridwidth = 1;
2703
+// // aConstraints.gridheight = 3;
2704
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2705
+// //bigThree.add(XYZPanel, aWindowConstraints);
2706
+// scenePanel.setVisible(false);
2707
+// centralPanel.setVisible(true);
2708
+// XYZPanel.setVisible(false);
2709
+ bigThree.ClearUI();
2710
+ bigThree.add(centralPanel);
2711
+ bigThree.FlushUI();
25512712 } else
2552
- if (event.getSource() == threeButton)
2713
+ if (source == threeButton)
25532714 {
25542715 radio.layout = threeButton;
2555
- bigThree.remove(jtp);
2556
- bigThree.remove(cameraPanel);
2557
- bigThree.remove(XYZPanel);
2558
- aWindowConstraints.gridx = 0;
2559
- aWindowConstraints.gridy = 0;
2560
- aWindowConstraints.gridwidth = 1;
2561
- // aConstraints.gridheight = 3;
2562
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2563
- aWindowConstraints.weightx = 0;
2564
- aWindowConstraints.weighty = 1;
2565
- //bigThree.add(jtp, aWindowConstraints);
2566
- aWindowConstraints.weightx = 1;
2567
- aWindowConstraints.gridwidth = 3;
2568
- // aConstraints.gridheight = 3;
2569
- aWindowConstraints.gridx = 1;
2570
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2571
- bigThree.add(cameraPanel, aWindowConstraints);
2572
- aWindowConstraints.weightx = 0;
2573
- aWindowConstraints.gridx = 4;
2574
- aWindowConstraints.gridwidth = 1;
2575
- // aConstraints.gridheight = 3;
2576
- aConstraints.fill = GridBagConstraints.VERTICAL;
2577
- bigThree.add(XYZPanel, aWindowConstraints);
2578
- bigThree.revalidate();
2716
+
2717
+// bigThree.remove(scenePanel);
2718
+// bigThree.remove(centralPanel);
2719
+// bigThree.remove(XYZPanel);
2720
+// aWindowConstraints.gridx = 0;
2721
+// aWindowConstraints.gridy = 0;
2722
+// aWindowConstraints.gridwidth = 1;
2723
+// // aConstraints.gridheight = 3;
2724
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2725
+// aWindowConstraints.weightx = 0;
2726
+// aWindowConstraints.weighty = 1;
2727
+// //bigThree.add(jtp, aWindowConstraints);
2728
+// aWindowConstraints.weightx = 1;
2729
+// aWindowConstraints.gridwidth = 3;
2730
+// // aConstraints.gridheight = 3;
2731
+// aWindowConstraints.gridx = 1;
2732
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2733
+// bigThree.add(centralPanel, aWindowConstraints);
2734
+// aWindowConstraints.weightx = 0;
2735
+// aWindowConstraints.gridx = 4;
2736
+// aWindowConstraints.gridwidth = 1;
2737
+// // aConstraints.gridheight = 3;
2738
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2739
+// bigThree.add(XYZPanel, aWindowConstraints);
2740
+// bigThree.validate();
2741
+// scenePanel.setVisible(false);
2742
+// centralPanel.setVisible(true);
2743
+// XYZPanel.setVisible(true);
2744
+ bigThree.ClearUI();
2745
+ bigThree.add(centralPanel);
2746
+ bigThree.add(XYZPanel);
2747
+ bigThree.FlushUI();
25792748 } else
2580
- if (event.getSource() == fourButton)
2749
+ if (source == fourButton)
25812750 {
25822751 radio.layout = fourButton;
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
- // aWindowConstraints.gridheight = 3;
2590
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2591
- aWindowConstraints.weightx = 1;
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
- // aWindowConstraints.gridheight = 3;
2604
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2605
- //bigThree.add(XYZPanel, aWindowConstraints);
2606
- bigThree.revalidate();
2752
+
2753
+// bigThree.remove(scenePanel);
2754
+// bigThree.remove(centralPanel);
2755
+// bigThree.remove(XYZPanel);
2756
+// aWindowConstraints.gridx = 0;
2757
+// aWindowConstraints.gridy = 0;
2758
+// aWindowConstraints.gridwidth = 1;
2759
+// // aWindowConstraints.gridheight = 3;
2760
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2761
+// aWindowConstraints.weightx = 1;
2762
+// aWindowConstraints.weighty = 1;
2763
+// bigThree.add(scenePanel, aWindowConstraints);
2764
+// aWindowConstraints.weightx = 1;
2765
+// aWindowConstraints.gridwidth = 3;
2766
+// // aConstraints.gridheight = 3;
2767
+// aWindowConstraints.gridx = 1;
2768
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2769
+// //bigThree.add(cameraPanel, aWindowConstraints);
2770
+// aWindowConstraints.weightx = 0;
2771
+// aWindowConstraints.gridx = 4;
2772
+// aWindowConstraints.gridwidth = 1;
2773
+// // aWindowConstraints.gridheight = 3;
2774
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2775
+// //bigThree.add(XYZPanel, aWindowConstraints);
2776
+// bigThree.validate();
2777
+// scenePanel.setVisible(true);
2778
+// centralPanel.setVisible(false);
2779
+// XYZPanel.setVisible(false);
2780
+ bigThree.ClearUI();
2781
+ bigThree.add(scenePanel);
2782
+ bigThree.FlushUI();
26072783 } else
2608
- if (event.getSource() == sixButton)
2784
+ if (source == sixButton)
26092785 {
26102786 radio.layout = sixButton;
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
- // aWindowConstraints.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
- // aWindowConstraints.gridheight = 3;
2632
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2633
- //bigThree.add(XYZPanel, aConstraints);
2634
- bigThree.revalidate();
2787
+
2788
+// bigThree.remove(scenePanel);
2789
+// bigThree.remove(centralPanel);
2790
+// bigThree.remove(XYZPanel);
2791
+// aWindowConstraints.gridx = 0;
2792
+// aWindowConstraints.gridy = 0;
2793
+// aWindowConstraints.gridwidth = 1;
2794
+// // aConstraints.gridheight = 3;
2795
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2796
+// aWindowConstraints.weightx = 0;
2797
+// aWindowConstraints.weighty = 1;
2798
+// bigThree.add(scenePanel, aWindowConstraints);
2799
+// aWindowConstraints.weightx = 1;
2800
+// aWindowConstraints.gridwidth = 3;
2801
+// // aWindowConstraints.gridheight = 3;
2802
+// aWindowConstraints.gridx = 1;
2803
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2804
+// bigThree.add(centralPanel, aWindowConstraints);
2805
+// aWindowConstraints.weightx = 0;
2806
+// aWindowConstraints.gridx = 4;
2807
+// aWindowConstraints.gridwidth = 1;
2808
+// // aWindowConstraints.gridheight = 3;
2809
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2810
+// //bigThree.add(XYZPanel, aConstraints);
2811
+// bigThree.validate();
2812
+// scenePanel.setVisible(true);
2813
+// centralPanel.setVisible(true);
2814
+// XYZPanel.setVisible(false);
2815
+ bigThree.ClearUI();
2816
+ bigThree.add(scenePanel);
2817
+ bigThree.add(centralPanel);
2818
+ bigThree.FlushUI();
26352819 } else
2636
- if (event.getSource() == sevenButton)
2820
+ if (source == sevenButton)
26372821 {
26382822 radio.layout = sevenButton;
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.VERTICAL;
2647
- aWindowConstraints.weightx = 0;
2648
- aWindowConstraints.weighty = 1;
2649
- bigThree.add(jtp, aWindowConstraints);
2650
- aWindowConstraints.weightx = 1;
2651
- aWindowConstraints.gridwidth = 3;
2652
- // aWindowConstraints.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
- // aConstraints.gridheight = 3;
2660
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2661
- bigThree.add(XYZPanel, aWindowConstraints);
2662
- bigThree.revalidate();
2823
+
2824
+// bigThree.remove(scenePanel);
2825
+// bigThree.remove(centralPanel);
2826
+// bigThree.remove(XYZPanel);
2827
+// aWindowConstraints.gridx = 0;
2828
+// aWindowConstraints.gridy = 0;
2829
+// aWindowConstraints.gridwidth = 1;
2830
+// // aWindowConstraints.gridheight = 3;
2831
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2832
+// aWindowConstraints.weightx = 0;
2833
+// aWindowConstraints.weighty = 1;
2834
+// bigThree.add(scenePanel, aWindowConstraints);
2835
+// aWindowConstraints.weightx = 1;
2836
+// aWindowConstraints.gridwidth = 3;
2837
+// // aWindowConstraints.gridheight = 3;
2838
+// aWindowConstraints.gridx = 1;
2839
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2840
+// bigThree.add(centralPanel, aWindowConstraints);
2841
+// aWindowConstraints.weightx = 0;
2842
+// aWindowConstraints.gridx = 4;
2843
+// aWindowConstraints.gridwidth = 1;
2844
+// // aConstraints.gridheight = 3;
2845
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2846
+// bigThree.add(XYZPanel, aWindowConstraints);
2847
+// bigThree.validate();
2848
+// scenePanel.setVisible(true);
2849
+// centralPanel.setVisible(true);
2850
+// XYZPanel.setVisible(true);
2851
+ bigThree.ClearUI();
2852
+ bigThree.add(scenePanel);
2853
+ bigThree.add(centralPanel);
2854
+ bigThree.add(XYZPanel);
2855
+ bigThree.FlushUI();
26632856 } else
2664
- if (event.getSource() == rootButton)
2857
+ if (source == rootButton)
26652858 {
26662859 Object3D obj;
26672860 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2673,7 +2866,7 @@
26732866
26742867 refreshContents(true);
26752868 } else
2676
- if (event.getSource() == closeButton)
2869
+ if (source == closeButton)
26772870 {
26782871 //System.out.println("CLOSE: " + buttonGroup.getSelection());
26792872 cRadio ab;
....@@ -2694,11 +2887,11 @@
26942887 }
26952888 refreshContents(true);
26962889 } else
2697
- if (event.getSource() == editItem || event.getSource() == editButton)
2890
+ if (source == editItem || source == editButton)
26982891 {
26992892 EditSelection(false);
27002893 } else
2701
- if (event.getSource() == uneditButton)
2894
+ if (source == uneditButton)
27022895 {
27032896 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27042897 {
....@@ -2710,12 +2903,12 @@
27102903
27112904 child.editWindow = null; // ???????????
27122905 }
2713
- objEditor.ctrlPanel.revalidate();
2906
+ objEditor.ctrlPanel.validate();
27142907 //objEditor.jTree.clearSelection();
27152908 //objEditor.ResetSliders();
27162909 refreshContents(true);
27172910 } else
2718
- if (event.getSource() == clearPanelButton)
2911
+ if (source == clearPanelButton)
27192912 {
27202913 assert(copy == group);
27212914 //copy.ClearUI();
....@@ -2726,7 +2919,7 @@
27262919 listUI.clear();
27272920 refreshContents(true);
27282921 } else
2729
- if (event.getSource() == allParamsButton)
2922
+ if (source == allParamsButton)
27302923 {
27312924 assert(copy == group);
27322925
....@@ -2747,19 +2940,19 @@
27472940
27482941 refreshContents(true);
27492942 } else
2750
- if (event.getSource() == unselectButton)
2943
+ if (source == unselectButton)
27512944 {
27522945 objEditor.jTree.clearSelection();
2753
- // ?? oct 2012 GraphreeD.clipboard.clear();
2946
+ // ?? oct 2012 GrafreeD.clipboard.clear();
27542947 objEditor.ResetSliders();
27552948 refreshContents(true);
27562949 } else
2757
- if(event.getSource() instanceof cRadio)
2950
+ if(source instanceof cRadio)
27582951 {
27592952 group.parent = keepparent;
27602953 group.attributes = 0;
27612954 //group.editWindow = null;
2762
- /*cRadio*/ radio = (cRadio)event.getSource();
2955
+ /*cRadio*/ radio = (cRadio)source;
27632956 Object3D obj = radio.GetObject();
27642957 System.out.println("Edit " + obj);
27652958 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2779,7 +2972,7 @@
27792972 }
27802973
27812974 copy = group;
2782
- //CameraPane.theRenderer.object = group;
2975
+ //Globals.theRenderer.object = group;
27832976 if(!useclient)
27842977 {
27852978 cameraView.renderCamera = radio.camera;
....@@ -2788,7 +2981,8 @@
27882981 cameraView.cameras[cameraView.cameracount] = radio.camera;
27892982 cameraView.targetLookAt.set(radio.camera.lookAt);
27902983 cameraView.object = group;
2791
- cameraView.lighttouched = true;
2984
+ //cameraView.lighttouched = true;
2985
+ Globals.lighttouched = true;
27922986 topView.object = group;
27932987 frontView.object = group;
27942988 sideView.object = group;
....@@ -2824,7 +3018,7 @@
28243018 if (useclient)
28253019 {
28263020 cameraView.object = client;
2827
- cameraView.lighttouched = true;
3021
+ Globals.lighttouched = true;
28283022 //topView.object = client;
28293023 //frontView.object = client;
28303024 //sideView.object = client;
....@@ -2832,7 +3026,7 @@
28323026 else
28333027 {
28343028 cameraView.object = group;
2835
- cameraView.lighttouched = true;
3029
+ Globals.lighttouched = true;
28363030 //topView.object = group;
28373031 //frontView.object = group;
28383032 //sideView.object = group;
....@@ -3065,9 +3259,9 @@
30653259 obj = (Object3D)e.nextElement();
30663260
30673261 System.out.println("Object is: " + obj);
3068
- GraphreeD.AnalyzeObject(obj);
3262
+ GrafreeD.AnalyzeObject(obj);
30693263 System.out.println("Boundary rep: " + obj.bRep);
3070
- GraphreeD.AnalyzeObject(obj.bRep);
3264
+ GrafreeD.AnalyzeObject(obj.bRep);
30713265
30723266 // System.err.println((size/1024) + " KB is the size of " + obj);
30733267 }
....@@ -3109,6 +3303,13 @@
31093303 void GenNormals(boolean crease)
31103304 {
31113305 group.GenNormalsS(crease);
3306
+
3307
+ refreshContents();
3308
+ }
3309
+
3310
+ void GenNormalsMINE()
3311
+ {
3312
+ group.selection.GenNormalsMINE();
31123313
31133314 refreshContents();
31143315 }
....@@ -3157,104 +3358,250 @@
31573358
31583359 //Object3D buffer;
31593360 cVector temp = new cVector();
3160
- BoundaryRep temprep;
3161
- Object3D nodes;
3162
- Vector<Vertex> vertices;
3163
-
3164
- public void Vertex(Object3D node, Vertex v)
3165
- {
3166
- vertices.add(v);
3167
- nodes.addElement(node);
3168
-
3169
- if (temprep.GetCache(v) != null)
3170
- {
3171
- temprep.Remove(v);
3172
- }
3173
- else
3174
- {
3175
- temprep.Remember(v);
3176
- }
3177
- }
3178
-
3179
- public void Face(Object3D node, Face f)
3180
- {
3181
-
3182
- }
3183
-
3361
+// BoundaryRep temprep;
3362
+// Object3D nodes;
3363
+// Vector<Vertex> vertices;
3364
+//
3365
+// cGroup buffer;
3366
+//
3367
+// public void Vertex(Object3D node, Vertex v)
3368
+// {
3369
+//// vertices.add(v);
3370
+//// nodes.addElement(node);
3371
+////
3372
+//// if (temprep.GetCache(v) != null)
3373
+//// {
3374
+//// temprep.Remove(v);
3375
+//// } else
3376
+//// {
3377
+//// temprep.Remember(v);
3378
+//// }
3379
+//
3380
+// //Object3D node = nodes.get(index);
3381
+// temp.set(v); // vertices.get(index)); // temprep.GetVertex(k));
3382
+// // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z);
3383
+//
3384
+// LA.xformPos(temp, node.GlobalTransformInv(), temp);
3385
+//
3386
+// // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z);
3387
+//
3388
+// cGroup g = new cGroup();
3389
+//
3390
+// if (g.toParent == null)
3391
+// {
3392
+// g.toParent = LA.newMatrix();
3393
+// g.fromParent = LA.newMatrix();
3394
+// }
3395
+// LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
3396
+// LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
3397
+//
3398
+// g.add(GrafreeD.clipboard);
3399
+//
3400
+// buffer.add(g);
3401
+// }
3402
+//
3403
+// public void Face(Object3D node, Face f)
3404
+// {
3405
+//
3406
+// }
3407
+//
3408
+// void ParseVerticesOld() // ??
3409
+// {
3410
+// //if (group.selection.size() != 1)
3411
+// // return;
3412
+//
3413
+// temprep = new BoundaryRep();
3414
+// nodes = new Object3D();
3415
+// vertices = new Vector<Vertex>();
3416
+//
3417
+// boolean epsequal = GrafreeD.epsequal;
3418
+// GrafreeD.epsequal = true;
3419
+//
3420
+// for (int i=0; i<group.selection.size(); i++)
3421
+// {
3422
+// Object3D buffer = new cGroup(group.selection.get(i).name + "+");
3423
+//
3424
+// group.selection.get(i).Parse(
3425
+//this );
3426
+//
3427
+// int repsize = temprep.VertexCount();
3428
+// int tablesize = temprep.vertextable.size();
3429
+// int nodesize = nodes.size();
3430
+//
3431
+// assert(vertices.size() == nodes.size());
3432
+//
3433
+// temprep.vertextable.elements();
3434
+//
3435
+// java.util.Set<java.util.Map.Entry<Vertex,Vertex>> set = temprep.vertextable.entrySet();
3436
+//
3437
+// for (java.util.Map.Entry<Vertex,Vertex> entry : set)
3438
+// {
3439
+// cGroup g = new cGroup();
3440
+//
3441
+// int index = vertices.indexOf(entry.getValue()); // temprep.vertextable.(k));
3442
+//
3443
+// Object3D node = nodes.get(index);
3444
+// temp.set(vertices.get(index)); // temprep.GetVertex(k));
3445
+// // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z);
3446
+//
3447
+// LA.xformPos(temp, node.GlobalTransformInv(), temp);
3448
+//
3449
+// // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z);
3450
+//
3451
+// if (g.toParent == null)
3452
+// {
3453
+// g.toParent = LA.newMatrix();
3454
+// g.fromParent = LA.newMatrix();
3455
+// }
3456
+// LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
3457
+// LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
3458
+//
3459
+// g.add(GrafreeD.clipboard);
3460
+//
3461
+// buffer.add(g);
3462
+// }
3463
+//
3464
+// makeSomething(buffer, i==group.selection.size()-1);
3465
+// }
3466
+//
3467
+// GrafreeD.epsequal = epsequal;
3468
+//
3469
+// //buffer = null;
3470
+// temprep = null;
3471
+// nodes = null;
3472
+//
3473
+// refreshContents();
3474
+// }
3475
+
31843476 void ParseVertices()
31853477 {
3186
- //if (group.selection.size() != 1)
3187
- // return;
3188
-
3189
- temprep = new BoundaryRep();
3190
- nodes = new Object3D();
3191
- vertices = new Vector<Vertex>();
3192
-
3193
- boolean epsequal = GraphreeD.epsequal;
3194
- GraphreeD.epsequal = true;
3478
+ boolean epsequal = GrafreeD.epsequal;
3479
+ GrafreeD.epsequal = true;
31953480
31963481 for (int i=0; i<group.selection.size(); i++)
31973482 {
3198
- Object3D buffer = new cGroup(group.selection.get(i).name + "+");
3483
+ final cGroup buffer = new cGroup(group.selection.get(i).name + "+");
31993484
3200
- group.selection.get(i).Parse(this);
3201
-
3202
- int repsize = temprep.VertexCount();
3203
- int tablesize = temprep.vertextable.size();
3204
- int nodesize = nodes.size();
3485
+ group.selection.get(i).Parse(
3486
+
3487
+ new iParse()
3488
+ {
3489
+ public void Vertex(Object3D node, Vertex v)
3490
+ {
3491
+ temp.set(v);
3492
+ LA.xformPos(temp, node.GlobalTransformInv(), temp);
32053493
3206
- assert(vertices.size() == nodes.size());
3207
-
3208
- temprep.vertextable.elements();
3209
-
3210
- java.util.Set<java.util.Map.Entry<Vertex,Vertex>> set = temprep.vertextable.entrySet();
3494
+ cGroup g = new cGroup();
32113495
3212
- for (java.util.Map.Entry<Vertex,Vertex> entry : set)
3213
- {
3214
- cGroup g = new cGroup();
3496
+ if (g.toParent == null)
3497
+ {
3498
+ g.toParent = LA.newMatrix();
3499
+ g.fromParent = LA.newMatrix();
3500
+ }
3501
+ LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
3502
+ LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
32153503
3216
- int index = vertices.indexOf(entry.getValue()); // temprep.vertextable.(k));
3217
- Object3D node = nodes.get(index);
3218
- temp.set(vertices.get(index)); // temprep.GetVertex(k));
3219
- // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z);
3504
+ g.add(GrafreeD.clipboard);
32203505
3221
- LA.xformPos(temp, node.GlobalTransformInv(), temp);
3222
-
3223
- // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z);
3224
-
3225
- if (g.toParent == null)
3226
- {
3227
- g.toParent = LA.newMatrix();
3228
- g.fromParent = LA.newMatrix();
3229
- }
3230
- LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
3231
- LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
3506
+ buffer.add(g);
3507
+ }
32323508
3233
- g.add(GraphreeD.clipboard);
3509
+ public void Face(Object3D node, Face f)
3510
+ {
32343511
3235
- buffer.add(g);
3236
- }
3512
+ }
3513
+ }
3514
+ );
32373515
32383516 makeSomething(buffer, i==group.selection.size()-1);
32393517 }
32403518
3241
- GraphreeD.epsequal = epsequal;
3242
-
3243
- //buffer = null;
3244
- temprep = null;
3245
- nodes = null;
3519
+ GrafreeD.epsequal = epsequal;
32463520
32473521 refreshContents();
32483522 }
3249
-
3523
+
3524
+ void TextureVertices()
3525
+ {
3526
+ for (int i=0; i<group.selection.size(); i++)
3527
+ {
3528
+ group.selection.get(i).Parse(
3529
+ new iParse()
3530
+ {
3531
+ public void Vertex(Object3D node, Vertex v)
3532
+ {
3533
+ cTexture tex = node.GetTextures();
3534
+ String pigment = Object3D.GetPigment(tex);
3535
+ //String bump = Object3D.GetBump(tex);
3536
+
3537
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3538
+
3539
+ double s = v.s;
3540
+
3541
+ if (s == 1)
3542
+ s = 0;
3543
+
3544
+ double t = v.t;
3545
+
3546
+ if (t == 1)
3547
+ t = 0;
3548
+
3549
+ int indexs = (int) (texturedata.getWidth() * s);
3550
+ int indext = (int) (texturedata.getHeight() * t);
3551
+
3552
+ int index = indext * texturedata.getWidth() + indexs;
3553
+
3554
+ java.nio.ByteBuffer bytebuf = (java.nio.ByteBuffer)texturedata.getBuffer();
3555
+
3556
+ int slide = bytebuf.capacity() / texturedata.getWidth() / texturedata.getHeight();
3557
+
3558
+ float scale = bytebuf.get(index*slide) & 0xFF;
3559
+ scale += bytebuf.get(index*slide+1) & 0xFF;
3560
+ scale += bytebuf.get(index*slide+2) & 0xFF;
3561
+ scale /= 3;
3562
+
3563
+ scale /= 0xFF;
3564
+ // c'est quoi ca? scale /= 4;
3565
+
3566
+ //v.AO = scale;
3567
+
3568
+ v.x += v.norm.x * scale;
3569
+ v.y += v.norm.y * scale;
3570
+ v.z += v.norm.z * scale;
3571
+ }
3572
+
3573
+ public void Face(Object3D node, Face f)
3574
+ {
3575
+ }
3576
+ }
3577
+ );
3578
+ }
3579
+
3580
+ refreshContents();
3581
+ }
3582
+
32503583 void Align()
32513584 {
3585
+ if (group.selection.size() == 0)
3586
+ return;
3587
+
3588
+ cVector bbmin = new cVector();
3589
+ cVector bbmax = new cVector();
3590
+
3591
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3592
+
3593
+ double dx = bbmax.x - bbmin.x;
3594
+ double dy = bbmax.y - bbmin.y;
3595
+ double dz = bbmax.z - bbmin.z;
3596
+
3597
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3598
+
32523599 for (int i=0; i<group.selection.size(); i++)
32533600 {
32543601 Object3D obj = group.selection.get(i);
32553602
3256
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3257
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3603
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3604
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
32583605 }
32593606
32603607 refreshContents();
....@@ -3267,7 +3614,7 @@
32673614 // ref.SaveSupports();
32683615 // Object3D par = ref.parent;
32693616 // ref.parent = null;
3270
-// Object3D lowres = (Object3D) GraphreeD.clone(ref);
3617
+// Object3D lowres = (Object3D) GrafreeD.clone(ref);
32713618 // ref.parent = par;
32723619 // ref.RestoreSupports();
32733620
....@@ -3297,7 +3644,7 @@
32973644 // lowres.SaveSupports();
32983645 // par = lowres.parent;
32993646 // lowres.parent = null;
3300
-// Object3D newlow = (Object3D) GraphreeD.clone(lowres);
3647
+// Object3D newlow = (Object3D) GrafreeD.clone(lowres);
33013648 Object3D newlow = CloneObject(lowres, false);
33023649 newlow.name = sn.switchobject.get(i).name;
33033650 System.out.println(" pose#" + i + " = " + newlow);
....@@ -3319,7 +3666,7 @@
33193666 return;
33203667
33213668 Object3D poses = group.selection.get(0);
3322
- Object3D ref = GraphreeD.clipboard.get(0);
3669
+ Object3D ref = GrafreeD.clipboard.get(0);
33233670
33243671 Object3D newgroup = new Object3D("Po:" + poses.name);
33253672
....@@ -3488,7 +3835,7 @@
34883835 group.selection.RelinkToSupport(); // july 2014
34893836 System.out.println("DONE.");
34903837 refreshContents();
3491
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3838
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
34923839 }
34933840
34943841 void ReduceMesh(boolean reduction34)
....@@ -3513,20 +3860,20 @@
35133860
35143861 void ClipMesh()
35153862 {
3516
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
3863
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
35173864 {
3518
- Object3D content = GraphreeD.clipboard.get(0);
3865
+ Object3D content = GrafreeD.clipboard.get(0);
35193866
35203867 if (content instanceof cGroup && ((cGroup)content).transientlink )
35213868 content = ((cGroup)content).get(0);
35223869
35233870 // for (int i=0; i<group.selection.size(); i++)
35243871 // {
3525
-// group.selection.get(i).ClipMesh(GraphreeD.clipboard);
3872
+// group.selection.get(i).ClipMesh(GrafreeD.clipboard);
35263873 // }
3527
- group.selection.ClipMesh(GraphreeD.clipboard);
3874
+ group.selection.ClipMesh(GrafreeD.clipboard);
35283875 }
3529
-// group.selection.ClipMesh(GraphreeD.clipboard);
3876
+// group.selection.ClipMesh(GrafreeD.clipboard);
35303877 System.out.println("DONE.");
35313878 refreshContents();
35323879 }
....@@ -3764,25 +4111,25 @@
37644111 System.err.println("info : " + child.GetPath());
37654112 }
37664113 }
3767
- else
3768
- {
3769
- objEditor.SetMaterial(group); // .GetMaterial());
3770
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3771
- System.err.println("info : " + group.GetPath());
3772
- }
4114
+// else
4115
+// {
4116
+// objEditor.SetMaterial(group); // .GetMaterial());
4117
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4118
+// System.err.println("info : " + group.GetPath());
4119
+// }
37734120
37744121 objEditor.SetText(); // jan 2014
37754122
3776
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4123
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
37774124 CameraPane.flash = true;
37784125
37794126 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
37804127 // a camera
37814128 {
37824129 CameraPane.camerachangeframe = 0; // don't refuse it
3783
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
3784
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
3785
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4130
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4131
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4132
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
37864133 }
37874134
37884135 refreshContents();
....@@ -3864,12 +4211,12 @@
38644211 {
38654212 if (group.selection.isEmpty())
38664213 return;
3867
- GraphreeD.clipboardIsTempGroup = false;
4214
+ GrafreeD.clipboardIsTempGroup = false;
38684215 Composite tGroup = null;
38694216 if (group.selection.size() > 0) // 1)
38704217 {
38714218 tGroup = new cGroup();
3872
- GraphreeD.clipboardIsTempGroup = true;
4219
+ GrafreeD.clipboardIsTempGroup = true;
38734220 }
38744221
38754222 if (cut)
....@@ -3909,16 +4256,16 @@
39094256 //System.out.println("cut " + child);
39104257 //System.out.println("parent = " + child.parent);
39114258 // tmp.addChild(child);
3912
- if (GraphreeD.clipboardIsTempGroup)
4259
+ if (GrafreeD.clipboardIsTempGroup)
39134260 tGroup.add/*Child*/(tmp);
39144261 else
3915
- GraphreeD.clipboard = tmp;
4262
+ GrafreeD.clipboard = tmp;
39164263 }
39174264 else
3918
- if (GraphreeD.clipboardIsTempGroup)
4265
+ if (GrafreeD.clipboardIsTempGroup)
39194266 tGroup.add/*Child*/(child);
39204267 else
3921
- GraphreeD.clipboard = child;
4268
+ GrafreeD.clipboard = child;
39224269 }
39234270
39244271 //ResetModel();
....@@ -3950,21 +4297,21 @@
39504297 //System.out.println("cut " + elem);
39514298 //System.out.println("parent = " + elem.parent);
39524299 // tmp.addChild(elem);
3953
- if (GraphreeD.clipboardIsTempGroup)
4300
+ if (GrafreeD.clipboardIsTempGroup)
39544301 tGroup.add/*Child*/(tmp);
39554302 else
3956
- GraphreeD.clipboard = tmp;
4303
+ GrafreeD.clipboard = tmp;
39574304 }
39584305 else
3959
- if (GraphreeD.clipboardIsTempGroup)
4306
+ if (GrafreeD.clipboardIsTempGroup)
39604307 tGroup.add/*Child*/(child);
39614308 else
3962
- GraphreeD.clipboard = child;
4309
+ GrafreeD.clipboard = child;
39634310 }
39644311
39654312 }
3966
- if (GraphreeD.clipboardIsTempGroup)
3967
- GraphreeD.clipboard = tGroup;
4313
+ if (GrafreeD.clipboardIsTempGroup)
4314
+ GrafreeD.clipboard = tGroup;
39684315 if (cut)
39694316 {
39704317 ResetModel();
....@@ -3974,11 +4321,11 @@
39744321
39754322 void paste(boolean expand)
39764323 {
3977
- // if (GraphreeD.clipboard == null)
4324
+ // if (GrafreeD.clipboard == null)
39784325 // return;
39794326 boolean first = true;
39804327
3981
- if (GraphreeD.clipboardIsTempGroup)
4328
+ if (GrafreeD.clipboardIsTempGroup)
39824329 {
39834330 Composite temp;
39844331
....@@ -3989,7 +4336,7 @@
39894336 temp = (Composite)Applet3D.clipboard.deepCopy();
39904337 */
39914338 Object3D elem;
3992
- for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4339
+ for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
39934340 {
39944341 Object3D child = (Object3D)e.nextElement();
39954342
....@@ -4003,7 +4350,7 @@
40034350 else
40044351 elem = child.deepCopy(); // ?
40054352 child.parent = keepparent;
4006
- //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
4353
+ //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
40074354 // elem = elem.get(0);
40084355 makeSomething(elem, true); // ?? first);
40094356 //group.addChild(elem);
....@@ -4023,14 +4370,14 @@
40234370 //Object3D cb = Applet3D.clipboard;
40244371 //temp.addChild(cb);
40254372 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4026
- assert(GraphreeD.clipboard.parent == null);
4027
- Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent;
4028
- GraphreeD.clipboard.get(0).parent = null; // Avoid copy?
4029
- if (LA.isIdentity(GraphreeD.clipboard.toParent))
4030
- makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy());
4373
+ assert(GrafreeD.clipboard.parent == null);
4374
+ Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4375
+ GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4376
+ if (LA.isIdentity(GrafreeD.clipboard.toParent))
4377
+ makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
40314378 else
4032
- makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy());
4033
- GraphreeD.clipboard.get(0).parent = keepparent;
4379
+ makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4380
+ GrafreeD.clipboard.get(0).parent = keepparent;
40344381 }
40354382
40364383 ResetModel();
....@@ -4039,7 +4386,7 @@
40394386
40404387 void pasteInto(boolean copyit)
40414388 {
4042
-// if (GraphreeD.clipboard == null)
4389
+// if (GrafreeD.clipboard == null)
40434390 // return;
40444391
40454392 if (group.selection.size() != 1)
....@@ -4072,9 +4419,9 @@
40724419 {
40734420 boolean first = true;
40744421
4075
- if (GraphreeD.clipboardIsTempGroup)
4422
+ if (GrafreeD.clipboardIsTempGroup)
40764423 {
4077
- Composite temp = (Composite)GraphreeD.clipboard;
4424
+ Composite temp = (Composite)GrafreeD.clipboard;
40784425 Object3D copy;
40794426 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
40804427 {
....@@ -4084,7 +4431,7 @@
40844431 }
40854432 } else
40864433 {
4087
- linkSomething(GraphreeD.clipboard); //.get(0));
4434
+ linkSomething(GrafreeD.clipboard); //.get(0));
40884435 }
40894436 }
40904437 }
....@@ -4276,6 +4623,26 @@
42764623 makeSomething(csg);
42774624 }
42784625
4626
+ void Ungroup(Object3D g)
4627
+ {
4628
+ if (g instanceof HiddenObject)
4629
+ {
4630
+ HiddenObject h = (HiddenObject) g;
4631
+
4632
+ for (int i=0; i<h.ActualSize(); i++)
4633
+ {
4634
+ objEditor.makeSomething(h.get(i), false);
4635
+ }
4636
+ }
4637
+ else
4638
+ {
4639
+ for (int i=0; i<g.Size(); i++)
4640
+ {
4641
+ objEditor.makeSomething(g.get(i), false);
4642
+ }
4643
+ }
4644
+ }
4645
+
42794646 void ungroup()
42804647 {
42814648 /*
....@@ -4471,7 +4838,7 @@
44714838
44724839 void ImportGFD()
44734840 {
4474
- FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD);
4841
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
44754842 browser.show();
44764843 String filename = browser.getFile();
44774844 if (filename != null && filename.length() > 0)
....@@ -4509,7 +4876,7 @@
45094876
45104877 void ImportVRMLX3D()
45114878 {
4512
- if (GraphreeD.standAlone)
4879
+ if (GrafreeD.standAlone)
45134880 {
45144881 /**/
45154882 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4526,7 +4893,7 @@
45264893
45274894 String GetFile(String dialogName)
45284895 {
4529
- if (GraphreeD.standAlone)
4896
+ if (GrafreeD.standAlone)
45304897 {
45314898 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
45324899 browser.show();
....@@ -4635,6 +5002,7 @@
46355002 private MenuItem resetsupportItem;
46365003 private MenuItem resetreferencesItem;
46375004 private MenuItem linkverticesItem;
5005
+ private MenuItem relinkverticesItem;
46385006 private MenuItem setMasterItem;
46395007 private MenuItem resetMeshItem;
46405008 private MenuItem stepAllItem;
....@@ -4653,8 +5021,10 @@
46535021 private MenuItem clearItem;
46545022 private MenuItem clearAllItem;
46555023 private MenuItem genUVItem;
5024
+ private MenuItem genNormalsMESHItem;
46565025 private MenuItem genNormalsCADItem;
46575026 private MenuItem genNormalsORGANItem;
5027
+ private MenuItem genNormalsMINEItem;
46585028 private MenuItem stripifyItem;
46595029 private MenuItem unstripifyItem;
46605030 private MenuItem trimItem;
....@@ -4696,6 +5066,7 @@
46965066 private MenuItem resetCentroidItem;
46975067 private MenuItem transformgeometryItem;
46985068 private MenuItem resetTransformItem;
5069
+ private MenuItem hideItem;
46995070 private MenuItem grabItem;
47005071 private MenuItem backItem;
47015072 private MenuItem frontItem;
....@@ -4716,6 +5087,7 @@
47165087
47175088 private MenuItem resetParentItem;
47185089 private MenuItem repairParentItem;
5090
+ private MenuItem repairShadowItem;
47195091 private MenuItem sortbysizeItem;
47205092 private MenuItem sortbynameItem;
47215093
....@@ -4728,12 +5100,15 @@
47285100 private MenuItem particleItem;
47295101 private MenuItem ragdollItem;
47305102 private MenuItem ragdoll2Item;
5103
+ private MenuItem heightFieldItem;
5104
+ private MenuItem textureFieldItem;
47315105 private MenuItem gridItem;
47325106 private MenuItem rectoidItem;
47335107 private MenuItem ellipsoidItem;
47345108 private MenuItem coneItem;
47355109 private MenuItem torusItem;
47365110 private MenuItem superItem;
5111
+ private MenuItem kleinItem;
47375112 private MenuItem blobItem;
47385113 private MenuItem latheItem;
47395114 private MenuItem bezierItem;
....@@ -4746,6 +5121,7 @@
47465121 private MenuItem csgItem;
47475122 private MenuItem templateItem;
47485123 private MenuItem textureItem;
5124
+ private MenuItem billboardItem;
47495125 private MenuItem shadowXItem;
47505126 private MenuItem shadowYItem;
47515127 private MenuItem shadowZItem;