Normand Briere
2019-05-01 20c1a07b76c39462594aedfedfe6e6adb17cd552
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,30 @@
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);
443
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
444
+ fastCB.setToolTipText("Fast mode");
434445 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);
446
+
447
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
448
+ trackCB.setToolTipText("Enable tracking");
476449 trackCB.addItemListener(this);
477450
478
- oe.aConstraints.gridx += 1;
479
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
451
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
452
+ screenfitButton.setToolTipText("Screen fit");
480453 screenfitButton.addActionListener(this);
481
- oe.aConstraints.gridx += 1;
454
+
482455 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
483456 // screenfitpointButton.addActionListener(this);
484457 // oe.aConstraints.gridx += 1;
485
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
458
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
486459 snapobjectButton.addActionListener(this);
460
+ snapobjectButton.setToolTipText("Snap Object");
487461 oe.aConstraints.gridx += 1;
488462
489463 //aConstraints.gridx = 0;
....@@ -491,65 +465,66 @@
491465 oe.aConstraints.weighty = 0;
492466 oe.aConstraints.gridwidth = 1;
493467
494
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
468
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
469
+ flashSelectionButton.setToolTipText("Show selection");
495470 flashSelectionButton.addActionListener(this);
496
- oe.aConstraints.gridx += 1;
497
- oe.aConstraints.weighty = 0;
498
- oe.aConstraints.gridwidth = 1;
499471
500
- //
501
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
472
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
473
+
474
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
475
+ twoButton.setToolTipText("Show center view only");
502476 twoButton.addActionListener(this);
503
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
477
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504478 fourButton.addActionListener(this);
505
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
479
+ fourButton.setToolTipText("Show left panel only");
480
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
481
+ sixButton.setToolTipText("2-column layout left");
506482 sixButton.addActionListener(this);
507
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
483
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
484
+ threeButton.setToolTipText("2-column layout right");
508485 threeButton.addActionListener(this);
509
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
486
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
487
+ sevenButton.setToolTipText("3-column layout");
510488 sevenButton.addActionListener(this);
511489 //
512490
513
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
491
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492
+ rootButton.setToolTipText("Edit selection in new tab");
514493 rootButton.addActionListener(this);
515
- oe.aConstraints.gridx += 1;
516
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
494
+
495
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
496
+ closeButton.setToolTipText("Close tab");
517497 closeButton.addActionListener(this);
518498 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
519499 //clearButton.addActionListener(this);
520
- oe.aConstraints.gridx += 1;
521500
522
- oe.aConstraints.gridx = 1; //
523
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
501
+ cGridBag commandsPanel = new cGridBag();
502
+
503
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504
+ editButton.setToolTipText("Edit selection");
524505 editButton.addActionListener(this);
525
- oe.aConstraints.gridx += 1;
526
- oe.aConstraints.weighty = 0;
527
- oe.aConstraints.gridwidth = 1;
528506
529
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
507
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
508
+ uneditButton.setToolTipText("Unedit selection");
530509 uneditButton.addActionListener(this);
531510
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);
511
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
512
+ clearPanelButton.setToolTipText("Clear edit panel");
537513 clearPanelButton.addActionListener(this);
538514
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);
515
+ commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516
+ allParamsButton.setToolTipText("All params??");
544517 allParamsButton.addActionListener(this);
545518
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);
519
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
520
+ unselectButton.setToolTipText("Unselect");
551521 unselectButton.addActionListener(this);
552522
523
+ commandsPanel.preferredHeight = 1;
524
+
525
+ oe.treePanel.add(commandsPanel);
526
+ oe.treePanel.Return();
527
+
553528 // oe.aConstraints.gridx += 1;
554529 // oe.aConstraints.weighty = 0;
555530 // oe.aConstraints.gridwidth = 1;
....@@ -561,40 +536,37 @@
561536 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
562537 // gcButton.addActionListener(this);
563538
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;
539
+ cGridBag jSPPanel = new cGridBag();
540
+
541
+ JScrollPane jSP;
575542 //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);
543
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
577544 ResetModel();
578
- oe.aConstraints.weighty = 0.5;
579
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
580
- oe.aConstraints.gridy += 1;
581
- oe.aConstraints.gridwidth = 1;
545
+
546
+ oe.treePanel.add(jSPPanel);
547
+ oe.treePanel.Return();
582548
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);
549
+ cGridBag copyOptionsPanel = new cGridBag();
550
+
551
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
552
+ colorCB.setToolTipText("Copy color when dropped");
587553 colorCB.addItemListener(this);
588
- oe.aConstraints.gridx += 2;
589
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
554
+
555
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
556
+ materialCB.setToolTipText("Copy material when dropped");
590557 materialCB.addItemListener(this);
591
- oe.aConstraints.gridx += 2;
592
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
558
+
559
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
560
+ textureCB.setToolTipText("Copy texture when dropped");
593561 textureCB.addItemListener(this);
594562
595
- oe.aConstraints.gridx = 0;
596
- oe.aConstraints.gridy += 1;
563
+ copyOptionsPanel.preferredHeight = 1;
564
+ oe.treePanel.add(copyOptionsPanel);
565
+ oe.treePanel.Return();
597566
567
+// mainPanel.setDividerLocation(0.5); //1.0);
568
+// mainPanel.setResizeWeight(0.5);
569
+
598570 //jList.addListSelectionListener(this);
599571 oe.jTree.addTreeSelectionListener(this);
600572 //jTree.setRootVisible(false);
....@@ -616,17 +588,85 @@
616588 radio.layout = sevenButton;
617589 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
618590 }
591
+
592
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
593
+ {
594
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
595
+ supportCB.setToolTipText("Enabled rigging");
596
+ supportCB.addItemListener(this);
597
+
598
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
599
+ // localCB.addItemListener(this);
600
+
601
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
602
+ crowdCB.setToolTipText("Used for crowds");
603
+ crowdCB.addItemListener(this);
604
+
605
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
606
+ smoothCB.setToolTipText("Snapping delay");
607
+ smoothCB.addItemListener(this);
608
+
609
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
610
+ slowCB.setToolTipText("Smooth interpolation");
611
+ slowCB.addItemListener(this);
612
+
613
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
614
+ boxCB.setToolTipText("Display bounding boxes");
615
+ boxCB.addItemListener(this);
616
+
617
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
618
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
619
+ zoomBoxCB.addItemListener(this);
620
+
621
+// constraints.gridy += 1;
622
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
623
+// speakerMocapCB.addItemListener(this);
624
+
625
+ if (false)
626
+ {
627
+ // handled in scripts
628
+ //constraints.gridy += 1;
629
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
630
+ speakerCameraCB.addItemListener(this);
631
+
632
+ //constraints.gridy += 1;
633
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
634
+ speakerFocusCB.addItemListener(this);
635
+
636
+ //constraints.gridy += 1;
637
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
638
+ smoothfocusCB.addItemListener(this);
639
+ }
640
+
641
+//constraints.gridx += 1;
642
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
643
+// debugCB.addItemListener(this);
644
+
645
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
646
+ oeilCB.addItemListener(this);
647
+
648
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
649
+ lookAtCB.setToolTipText("Look-at target");
650
+ lookAtCB.addItemListener(this);
651
+
652
+ cGridBag fill = new cGridBag();
653
+
654
+ fill.preferredHeight = 200;
655
+
656
+ panel.add(fill);
657
+
658
+ }
619659
620660 void EditObject(Object3D obj)
621661 {
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();
662
+ cRadio radioButton = new cRadio(obj.name);
663
+ radioButton.SetObject(obj);
664
+ radioButton.layout = sevenButton;
665
+ radioButton.SetCamera(cameraView.renderCamera, false);
666
+ radioButton.addActionListener(this);
667
+ radioPanel.add(radioButton);
668
+ buttonGroup.add(radioButton);
669
+ radioButton.doClick();
630670 }
631671 void SetupViews(ObjEditor oe)
632672 {
....@@ -646,6 +686,7 @@
646686 JCheckBox fastCB;
647687 JCheckBox slowCB;
648688 JCheckBox boxCB;
689
+ JCheckBox zoomBoxCB;
649690 JCheckBox trackCB;
650691 JCheckBox smoothfocusCB;
651692 // JCheckBox speakerMocapCB;
....@@ -688,8 +729,7 @@
688729 dropAttributes |= Object3D.TEXTURE;
689730 else
690731 dropAttributes &= ~Object3D.TEXTURE;
691
- }
692
- else if(e.getSource() == liveCB)
732
+ } else if(e.getSource() == liveCB)
693733 {
694734 cameraView.ToggleLive();
695735 }
....@@ -726,6 +766,10 @@
726766 Recompile();
727767 cameraView.repaint();
728768 // refreshContents();
769
+ }
770
+ else if(e.getSource() == zoomBoxCB)
771
+ {
772
+ cameraView.ToggleZoomBoxMode();
729773 }
730774 else if(e.getSource() == smoothfocusCB)
731775 {
....@@ -1002,6 +1046,8 @@
10021046
10031047 void buildCreateMenu(Menu menu)
10041048 {
1049
+ //heightFieldItem = menu.add(new MenuItem("Height Field"));
1050
+ //heightFieldItem.addActionListener(this);
10051051 gridItem = menu.add(new MenuItem("Grid"));
10061052 gridItem.addActionListener(this);
10071053 rectoidItem = menu.add(new MenuItem("Box"));
....@@ -1014,6 +1060,8 @@
10141060 torusItem.addActionListener(this);
10151061 superItem = menu.add(new MenuItem("Superellipsoid"));
10161062 superItem.addActionListener(this);
1063
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1064
+ kleinItem.addActionListener(this);
10171065 particleItem = menu.add(new MenuItem("Particle system"));
10181066 particleItem.addActionListener(this);
10191067 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1048,26 +1096,19 @@
10481096 doubleItem.addActionListener(this);
10491097 tripleItem = menu.add(new MenuItem("Trident"));
10501098 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);
10601099 }
10611100
10621101 void buildToolsMenu(Menu menu)
10631102 {
10641103 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10651104 animationItem.addItemListener(this);
1066
- animationItem.setState(CameraPane.ANIMATION);
1105
+ animationItem.setState(Globals.ANIMATION);
10671106
10681107 menu.add("-");
10691108 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10701109 parseverticesItem.addActionListener(this);
1110
+ textureFieldItem = menu.add(new MenuItem("Texture Field"));
1111
+ textureFieldItem.addActionListener(this);
10711112 alignItem = menu.add(new MenuItem("Align"));
10721113 alignItem.addActionListener(this);
10731114 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
....@@ -1094,6 +1135,8 @@
10941135 resetParentItem.addActionListener(this);
10951136 repairParentItem = menu.add(new MenuItem("Repair Parent"));
10961137 repairParentItem.addActionListener(this);
1138
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1139
+ repairShadowItem.addActionListener(this);
10971140 menu.add(invariantsItem = new MenuItem("Invariants"));
10981141 invariantsItem.addActionListener(this);
10991142 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1429,9 +1472,9 @@
14291472
14301473 void Overwrite(int mask)
14311474 {
1432
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1475
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
14331476 {
1434
- Object3D content = GraphreeD.clipboard.get(0);
1477
+ Object3D content = GrafreeD.clipboard.get(0);
14351478
14361479 if (content instanceof cGroup && ((cGroup)content).transientlink )
14371480 content = ((cGroup)content).get(0);
....@@ -1454,6 +1497,7 @@
14541497 //
14551498 public void actionPerformed(ActionEvent event) // , Object arg)
14561499 {
1500
+ Object source = event.getSource();
14571501 /*
14581502 if (event.getSource() == nameField)
14591503 {
....@@ -1465,11 +1509,11 @@
14651509 }
14661510 else
14671511 */
1468
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1512
+ if (source == lookAtItem || source == lookFromItem)
14691513 {
14701514 ScreenFit();
14711515 } else
1472
- if (event.getSource() == switchItem)
1516
+ if (source == switchItem)
14731517 {
14741518 cVector v1 = new cVector();
14751519 cVector v2 = new cVector();
....@@ -1478,11 +1522,11 @@
14781522 objEditor.cameraView.renderCamera.setAim(v2, v1);
14791523 objEditor.cameraView.repaint();
14801524 } else
1481
- if (event.getSource() == rectoidItem)
1525
+ if (source == rectoidItem)
14821526 {
14831527 makeSomething(new Box());
14841528 } else
1485
- if (event.getSource() == particleItem)
1529
+ if (source == particleItem)
14861530 {
14871531 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
14881532 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1503,9 +1547,9 @@
15031547 applyExample(particleGeom, "SMOKE");
15041548 makeSomething(particleGeom);
15051549 } else
1506
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1550
+ if (source == ragdollItem || source == ragdoll2Item)
15071551 {
1508
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1552
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15091553
15101554 ragdoll.toParent = LA.newMatrix();
15111555 ragdoll.fromParent = LA.newMatrix();
....@@ -1521,27 +1565,71 @@
15211565 makeSomething(ragdoll);
15221566 //makeSomething(new VehicleDemo());
15231567 } else
1524
- if (event.getSource() == gridItem)
1568
+ /*
1569
+ */
1570
+ if (source == heightFieldItem)
1571
+ {
1572
+ Object3D obj = new Object3D();
1573
+
1574
+ obj.CreateMaterial();
1575
+ obj.bRep = new BoundaryRep();
1576
+
1577
+ obj.bRep.CreateMesh(new iHeightField()
1578
+ {
1579
+ public double f(double x, double y)
1580
+ {
1581
+ // The Mandelbrot set is represented by coloring
1582
+ // each point (x,y) according to the number of
1583
+ // iterations it takes before the while loop in
1584
+ // this method ends. For points that are actually
1585
+ // in the Mandelbrot set, or very close to it, the
1586
+ // count will reach the maximum value, 80. These
1587
+ // points will be colored purple. All other colors
1588
+ // represent points that are definitely NOT in the set.
1589
+ x -= 600;
1590
+ y -= 500;
1591
+ x /= 200;
1592
+ y /= 200;
1593
+ int count = 0;
1594
+ double zx = x;
1595
+ double zy = y;
1596
+ while (count < 80 && Math.abs(x) < 100 && Math.abs(zy) < 100) {
1597
+ double new_zx = zx*zx - zy*zy + x;
1598
+ zy = 2*zx*zy + y;
1599
+ zx = new_zx;
1600
+ count++;
1601
+ }
1602
+ return count; // Math.sqrt(count);
1603
+ }
1604
+ }, 1000,1000);
1605
+
1606
+ makeSomething(obj);
1607
+ } else
1608
+ if (source == gridItem)
15251609 {
15261610 makeSomething(new Grid());
15271611 } else
1528
- if (event.getSource() == ellipsoidItem)
1612
+ if (source == ellipsoidItem)
15291613 {
15301614 makeSomething(new Sphere());
15311615 } else
1532
- if (event.getSource() == coneItem)
1616
+ if (source == coneItem)
15331617 {
15341618 makeSomething(new Cone());
15351619 } else
1536
- if (event.getSource() == torusItem)
1620
+ if (source == torusItem)
15371621 {
15381622 makeSomething(new Torus());
15391623 } else
1540
- if (event.getSource() == superItem)
1624
+ if (source == superItem)
15411625 {
15421626 makeSomething(new Superellipsoid());
15431627 } else
1544
- if (event.getSource() == blobItem)
1628
+ if (source == kleinItem)
1629
+ {
1630
+ makeSomething(new Klein());
1631
+ } else
1632
+ if (source == blobItem)
15451633 {
15461634 Blob blob = new Blob();
15471635 BlobComponent comp = new BlobComponent();
....@@ -1549,15 +1637,15 @@
15491637 //blob.retile();
15501638 makeSomething(blob);
15511639 } else
1552
- if (event.getSource() == latheItem)
1640
+ if (source == latheItem)
15531641 {
15541642 makeSomething(new Lathe());
15551643 } else
1556
- if (event.getSource() == bezierItem)
1644
+ if (source == bezierItem)
15571645 {
15581646 makeSomething(new BezierSurface());
15591647 } else
1560
- if (event.getSource() == checkerItem)
1648
+ if (source == checkerItem)
15611649 {
15621650 /*
15631651 Object3D obj = new BezierSurface(5,8);
....@@ -1570,9 +1658,9 @@
15701658 LA.matConcat(obj.toParent, cameraView.renderCamera.fromParent, obj.toParent);
15711659 LA.matInvert(obj.toParent, obj.fromParent);
15721660 */
1573
- makeSomething(new CheckerIG());
1661
+ makeSomething(new Checker());
15741662 } else
1575
- if (event.getSource() == meshItem)
1663
+ if (source == meshItem)
15761664 {
15771665 Object3D itemtomake = new Object3D();
15781666 Object3D child;
....@@ -1593,35 +1681,35 @@
15931681 makeSomething(child);
15941682 }
15951683 } else
1596
- if (event.getSource() == springItem)
1684
+ if (source == springItem)
15971685 {
15981686 cSpring s = new cSpring();
15991687 s.setup();
16001688 makeSomething(s);
16011689 } else
1602
- if (event.getSource() == flagItem)
1690
+ if (source == flagItem)
16031691 {
16041692 cSpring s = new cFlag();
16051693 s.setup();
16061694 makeSomething(s);
16071695 } else
1608
- if (event.getSource() == lightItem)
1696
+ if (source == lightItem)
16091697 {
16101698 makeSomething(new Light());
16111699 } else
1612
- if (event.getSource() == csgItem)
1700
+ if (source == csgItem)
16131701 {
16141702 group(new CSG());
16151703 } else
1616
- if (event.getSource() == templateItem)
1704
+ if (source == templateItem)
16171705 {
16181706 group(new cTemplate());
16191707 } else
1620
- if (event.getSource() == attributeItem)
1708
+ if (source == attributeItem)
16211709 {
16221710 makeSomething(new Attribute());
16231711 } else
1624
- if (event.getSource() == pointflowItem)
1712
+ if (source == pointflowItem)
16251713 {
16261714 makeSomething(new PointFlow());
16271715 } else
....@@ -1633,7 +1721,7 @@
16331721 } else
16341722 */
16351723
1636
- if (event.getSource() == superLoopItem)
1724
+ if (source == superLoopItem)
16371725 {
16381726 Composite g = new cGroup();
16391727 for (int i=0; i<15; i++)
....@@ -1655,7 +1743,7 @@
16551743
16561744 group(g);
16571745 } else
1658
- if (event.getSource() == loopItem)
1746
+ if (source == loopItem)
16591747 {
16601748 Composite csg = new GroupLeaf();
16611749 csg.count = 5;
....@@ -1664,7 +1752,7 @@
16641752 csg.addChild(child);
16651753 child.addChild(csg);
16661754 } else
1667
- if (event.getSource() == doubleItem)
1755
+ if (source == doubleItem)
16681756 {
16691757 Composite csg = new GroupLeaf();
16701758 csg.count = 5;
....@@ -1676,7 +1764,7 @@
16761764 csg.addChild(child);
16771765 child.addChild(csg);
16781766 } else
1679
- if (event.getSource() == tripleItem)
1767
+ if (source == tripleItem)
16801768 {
16811769 Composite csg = new GroupLeaf();
16821770 csg.count = 4;
....@@ -1692,70 +1780,70 @@
16921780 child.addChild(csg);
16931781 } else
16941782
1695
- if (event.getSource() == importGFDItem)
1783
+ if (source == importGFDItem)
16961784 {
16971785 ImportGFD();
16981786 } else
1699
- if (event.getSource() == importVRMLX3DItem)
1787
+ if (source == importVRMLX3DItem)
17001788 {
17011789 ImportVRMLX3D();
17021790 } else
1703
- if (event.getSource() == import3DSItem)
1791
+ if (source == import3DSItem)
17041792 {
17051793 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17061794 } else
1707
- if (event.getSource() == importOBJItem)
1795
+ if (source == importOBJItem)
17081796 {
17091797 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17101798 } else
1711
- if (event.getSource() == computeAOItem)
1799
+ if (source == computeAOItem)
17121800 {
1713
- CameraPane.drawMode = CameraPane.OCCLUSION;
1714
- CameraPane.theRenderer.repaint();
1801
+ Globals.drawMode = CameraPane.OCCLUSION;
1802
+ Globals.theRenderer.repaint();
17151803 } else
1716
- if (event.getSource() == recompileItem)
1804
+ if (source == recompileItem)
17171805 {
17181806 Recompile();
17191807 refreshContents();
17201808 } else
1721
- if (event.getSource() == editScriptItem)
1809
+ if (source == editScriptItem)
17221810 {
17231811 OpenDialog();
17241812 refreshContents();
17251813 } else
1726
- if (event.getSource() == invariantsItem)
1814
+ if (source == invariantsItem)
17271815 {
17281816 System.out.println("Invariants:");
1729
- GraphreeD.theApplet3D.universe.invariants();
1817
+ GrafreeD.grafreeD.universe.invariants();
17301818 } else
1731
- if (event.getSource() == memoryItem)
1819
+ if (source == memoryItem)
17321820 {
17331821 //System.out.println("Invariants:");
17341822 PrintMemory();
17351823 } else
1736
- if (event.getSource() == pathItem)
1824
+ if (source == pathItem)
17371825 {
17381826 PrintPath();
17391827 } else
1740
- if (event.getSource() == analyzeItem)
1828
+ if (source == analyzeItem)
17411829 {
17421830 AnalyzeObject();
17431831 } else
1744
- if (event.getSource() == dumpItem)
1832
+ if (source == dumpItem)
17451833 {
17461834 DumpObject();
17471835 } else
1748
- if (event.getSource() == screenfitButton)
1836
+ if (source == screenfitButton)
17491837 {
17501838 //Reload(lastConverter, lastFilename, true);
17511839 ScreenFit();
17521840 } else
1753
- if (event.getSource() == screenfitpointButton)
1841
+ if (source == screenfitpointButton)
17541842 {
17551843 //Reload(lastConverter, lastFilename, true);
17561844 ScreenFitPoint();
17571845 } else
1758
- if (event.getSource() == snapobjectButton)
1846
+ if (source == snapobjectButton)
17591847 {
17601848 //Reload(lastConverter, lastFilename, true);
17611849 SnapObject();
....@@ -1766,13 +1854,13 @@
17661854 // Recompile();
17671855 // refreshContents();
17681856 // } else
1769
- if (event.getSource() == gcButton)
1857
+ if (source == gcButton)
17701858 {
17711859 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
17721860 System.gc();
17731861 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
17741862 } else
1775
- if (event.getSource() == editLeafItem)
1863
+ if (source == editLeafItem)
17761864 {
17771865 Object3D obj;
17781866 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1786,65 +1874,66 @@
17861874 }
17871875 refreshContents(true);
17881876 } else
1789
- if (event.getSource() == openWindowItem)
1877
+ if (source == openWindowItem)
17901878 {
17911879 EditSelection(true);
17921880 } else
1793
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1881
+ if (source == cutItem || source == clearButton)
17941882 {
17951883 loadClipboard(true);
17961884 } else
1797
- if (event.getSource() == duplicateItem)
1885
+ if (source == duplicateItem)
17981886 {
1799
- Object3D keep = GraphreeD.clipboard;
1887
+ Object3D keep = GrafreeD.clipboard;
18001888 loadClipboard(false);
18011889 paste(false);
1802
- GraphreeD.clipboard = keep;
1890
+ GrafreeD.clipboard = keep;
18031891 } else
1804
- if (event.getSource() == cloneItem)
1892
+ if (source == cloneItem)
18051893 {
18061894 CloneSelection(false);
18071895 } else
1808
- if (event.getSource() == cloneSupportItem)
1896
+ if (source == cloneSupportItem)
18091897 {
18101898 CloneSelection(true);
18111899 } else
1812
- if (event.getSource() == copyItem)
1900
+ if (source == copyItem)
18131901 {
18141902 loadClipboard(false);
18151903 } else
1816
- if (event.getSource() == pasteItem)
1904
+ if (source == pasteItem)
18171905 {
18181906 paste(false);
18191907 } else
1820
- if (event.getSource() == pasteLinkItem)
1908
+ if (source == pasteLinkItem)
18211909 {
18221910 pasteInto(false);
18231911 } else
1824
- if (event.getSource() == pasteCloneItem)
1912
+ if (source == pasteCloneItem)
18251913 {
18261914 pasteInto(true);
18271915 } else
1828
- if (event.getSource() == pasteExpandItem)
1916
+ if (source == pasteExpandItem)
18291917 {
18301918 paste(true);
18311919 } else
1832
- if (event.getSource() == synchronizeItem)
1920
+ if (source == synchronizeItem)
18331921 {
18341922 Overwrite(Object3D.TRANSFORM);
18351923 } else
1836
- if (event.getSource() == overwriteNameItem)
1924
+ if (source == overwriteNameItem)
18371925 {
18381926 Overwrite(Object3D.NAME);
18391927 } else
1840
- if (event.getSource() == overwriteUVItem)
1928
+ if (source == overwriteUVItem)
18411929 {
18421930 Overwrite(Object3D.UV);
18431931 } else
1844
- if (event.getSource() == overwriteMatItem)
1932
+ if (source == overwriteMatItem)
18451933 {
1934
+ /* july 2015
18461935 if ((dropAttributes & Object3D.TEXTURE) == 0)
1847
- Overwrite(Object3D.MATERIAL);
1936
+ Overwrite(Object3D.MATERIAL | Object3D.COLOR);
18481937 else
18491938 {
18501939 if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0)
....@@ -1856,13 +1945,16 @@
18561945 Overwrite(Object3D.MATERIAL | Object3D.TEXTURE);
18571946 }
18581947 }
1948
+ */
1949
+
1950
+ Overwrite(dropAttributes);
18591951 }
1860
- if (event.getSource() == overwriteGeoItem)
1952
+ if (source == overwriteGeoItem)
18611953 {
18621954 Overwrite(Object3D.GEOMETRY);
1863
-// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1955
+// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
18641956 // {
1865
-// Object3D content = GraphreeD.clipboard.get(0);
1957
+// Object3D content = GrafreeD.clipboard.get(0);
18661958 //
18671959 // if (content instanceof cGroup && ((cGroup)content).transientlink )
18681960 // content = ((cGroup)content).get(0);
....@@ -1874,7 +1966,7 @@
18741966 // refreshContents();
18751967 // }
18761968 } else
1877
- if (event.getSource() == generateMeshItem)
1969
+ if (source == generateMeshItem)
18781970 {
18791971 //if (group.selection.size() == 1)
18801972 // for (int i=0; i<group.selection.size(); i++)
....@@ -1885,7 +1977,7 @@
18851977 ResetModel();
18861978 refreshContents();
18871979 } else
1888
- if (event.getSource() == extractGeometriesItem)
1980
+ if (source == extractGeometriesItem)
18891981 {
18901982 boolean one = false;
18911983
....@@ -1912,7 +2004,7 @@
19122004 ResetModel();
19132005 refreshContents();
19142006 } else
1915
- if (event.getSource() == cloneGeometriesItem)
2007
+ if (source == cloneGeometriesItem)
19162008 {
19172009 boolean one = false;
19182010
....@@ -1938,32 +2030,37 @@
19382030 ResetModel();
19392031 refreshContents();
19402032 } else
1941
- if (event.getSource() == shareGeometriesItem)
2033
+ if (source == shareGeometriesItem)
19422034 {
19432035 boolean one = false;
19442036
19452037 if (group.selection.size() == 1)
19462038 one = true;
19472039
2040
+ Object3D merge = null;
2041
+
19482042 Object3D content = new cGroup();
19492043
19502044 for (int i=0; i<group.selection.size(); i++)
19512045 {
1952
- Object3D sel = new Merge(group.selection.get(i));
2046
+ merge = new Merge(group.selection.get(i));
19532047
19542048 if (one)
1955
- makeSomething(sel, false);
2049
+ makeSomething(merge, false);
19562050 else
1957
- content.addChild(sel);
2051
+ content.addChild(merge);
19582052 }
19592053
19602054 if (!one)
1961
- makeSomething(content, false);
1962
-
1963
- ResetModel();
1964
- refreshContents();
2055
+ makeSomething(content, true);
2056
+ else
2057
+ {
2058
+ ResetModel();
2059
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2060
+ refreshContents();
2061
+ }
19652062 } else
1966
- if (event.getSource() == mergeGeometriesItem)
2063
+ if (source == mergeGeometriesItem)
19672064 {
19682065 boolean one = false;
19692066
....@@ -1993,11 +2090,11 @@
19932090 ResetModel();
19942091 refreshContents();
19952092 } else
1996
- if (event.getSource() == linkverticesItem)
2093
+ if (source == linkverticesItem)
19972094 {
1998
-// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2095
+// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
19992096 // {
2000
-// Object3D content = GraphreeD.clipboard.get(0);
2097
+// Object3D content = GrafreeD.clipboard.get(0);
20012098 //
20022099 // if (content instanceof cGroup && ((cGroup)content).transientlink )
20032100 // content = ((cGroup)content).get(0);
....@@ -2006,14 +2103,14 @@
20062103 // group.selection.get(0).setMasterThis(content); // should be identity
20072104 // refreshContents();
20082105 // }
2009
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2106
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
20102107 {
2011
- Object3D content = GraphreeD.clipboard.get(0);
2108
+ Object3D content = GrafreeD.clipboard.get(0);
20122109
20132110 if (content instanceof cGroup && ((cGroup)content).transientlink )
20142111 content = ((cGroup)content).get(0);
20152112
2016
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2113
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20172114 for (int i=0; i<group.selection.size(); i++)
20182115 {
20192116 boolean random = CameraPane.RANDOM;
....@@ -2022,11 +2119,11 @@
20222119 // group.selection.get(i).setMasterThis(content); // should be identity
20232120 CameraPane.RANDOM = random;
20242121 }
2025
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2122
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20262123 refreshContents();
20272124 }
20282125 } else
2029
- if (event.getSource() == resetsupportItem)
2126
+ if (source == resetsupportItem)
20302127 {
20312128 for (int i=0; i<group.selection.size(); i++)
20322129 {
....@@ -2038,7 +2135,16 @@
20382135
20392136 refreshContents();
20402137 } else
2041
- if (event.getSource() == resetreferencesItem)
2138
+ if (source == relinkverticesItem)
2139
+ {
2140
+ boolean random = CameraPane.RANDOM;
2141
+ CameraPane.RANDOM = false; // parse all random nodes
2142
+ group.selection.RelinkToSupport();
2143
+ CameraPane.RANDOM = random;
2144
+
2145
+ refreshContents();
2146
+ } else
2147
+ if (source == resetreferencesItem)
20422148 {
20432149 for (int i=0; i<group.selection.size(); i++)
20442150 {
....@@ -2047,11 +2153,11 @@
20472153
20482154 refreshContents();
20492155 } else
2050
- if (event.getSource() == setMasterItem)
2156
+ if (source == setMasterItem)
20512157 {
2052
- if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2158
+ if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20532159 {
2054
- Object3D content = GraphreeD.clipboard.get(0);
2160
+ Object3D content = GrafreeD.clipboard.get(0);
20552161
20562162 if (content instanceof cGroup && ((cGroup)content).transientlink )
20572163 content = ((cGroup)content).get(0);
....@@ -2060,13 +2166,13 @@
20602166 refreshContents();
20612167 }
20622168 } else
2063
- if (event.getSource() == poseMeshItem)
2169
+ if (source == poseMeshItem)
20642170 {
20652171 if (group.selection.size() == 1)
20662172 {
2067
- if (GraphreeD.clipboard.size() == 1)
2173
+ if (GrafreeD.clipboard.size() == 1)
20682174 {
2069
- Object3D content = GraphreeD.clipboard.get(0);
2175
+ Object3D content = GrafreeD.clipboard.get(0);
20702176
20712177 if (content instanceof cGroup && ((cGroup)content).transientlink )
20722178 content = ((cGroup)content).get(0);
....@@ -2079,19 +2185,19 @@
20792185 }
20802186
20812187 } else
2082
- if (event.getSource() == revertMeshItem)
2188
+ if (source == revertMeshItem)
20832189 {
20842190 RevertMeshes();
20852191 } else
2086
- if (event.getSource() == resetMeshItem)
2192
+ if (source == resetMeshItem)
20872193 {
20882194 ResetAll();
20892195 } else
2090
- if (event.getSource() == stepAllItem)
2196
+ if (source == stepAllItem)
20912197 {
20922198 StepAll();
20932199 } else
2094
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2200
+ if (source == clearItem) // || event.getSource() == clearButton)
20952201 {
20962202 //int indices[] = jList.getSelectedIndices();
20972203 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2099,42 +2205,46 @@
20992205
21002206 ClearSelection(false);
21012207 } else
2102
- if (event.getSource() == clearAllItem)
2208
+ if (source == clearAllItem)
21032209 {
21042210 ClearSelection(true);
21052211 } else
2106
- if (event.getSource() == grabItem)
2212
+ if (source == grabItem)
21072213 {
21082214 group(new cGroup(), true);
21092215 } else
2110
- if (event.getSource() == frontItem)
2216
+ if (source == hideItem)
2217
+ {
2218
+ group(new HiddenObject());
2219
+ } else
2220
+ if (source == frontItem)
21112221 {
21122222 front();
21132223 } else
2114
- if (event.getSource() == backItem)
2224
+ if (source == backItem)
21152225 {
21162226 back();
21172227 } else
2118
- if (event.getSource() == cameraItem)
2228
+ if (source == cameraItem)
21192229 {
21202230 makeSomething(new Camera());
21212231 } else
2122
- if (event.getSource() == compositeItem)
2232
+ if (source == compositeItem)
21232233 {
21242234 group(new Composite());
21252235 } else
2126
- if (event.getSource() == randomItem)
2236
+ if (source == randomItem)
21272237 {
21282238 RandomNode random = new RandomNode();
21292239 group(random);
21302240 if (random.size() > 0)
21312241 random.name = random.get(0).name + "Rnd";
21322242 } else
2133
- if (event.getSource() == physicsItem)
2243
+ if (source == physicsItem)
21342244 {
21352245 group(new PhysicsNode());
21362246 } else
2137
- if (event.getSource() == frameselectorItem)
2247
+ if (source == frameselectorItem)
21382248 {
21392249 for (int i=0; i<group.selection.size(); i++)
21402250 {
....@@ -2146,7 +2256,7 @@
21462256 ResetModel();
21472257 refreshContents();
21482258 } else
2149
- if (event.getSource() == switchGeoItem)
2259
+ if (source == switchGeoItem)
21502260 {
21512261 for (int i=0; i<group.selection.size(); i++)
21522262 {
....@@ -2158,7 +2268,7 @@
21582268 ResetModel();
21592269 refreshContents();
21602270 } else
2161
- if (event.getSource() == switchTransfoItem)
2271
+ if (source == switchTransfoItem)
21622272 {
21632273 for (int i=0; i<group.selection.size(); i++)
21642274 {
....@@ -2170,7 +2280,7 @@
21702280 ResetModel();
21712281 refreshContents();
21722282 } else
2173
- if (event.getSource() == morphItem)
2283
+ if (source == morphItem)
21742284 {
21752285 for (int i=0; i<group.selection.size(); i++)
21762286 {
....@@ -2182,7 +2292,7 @@
21822292 ResetModel();
21832293 refreshContents();
21842294 } else
2185
- if (event.getSource() == scriptNodeItem)
2295
+ if (source == scriptNodeItem)
21862296 {
21872297 boolean atleastone = false;
21882298
....@@ -2221,191 +2331,215 @@
22212331 }
22222332 }
22232333 } else
2224
- if (event.getSource() == linkerItem)
2334
+ if (source == linkerItem)
22252335 {
22262336 group(new cLinker());
22272337 } else
2228
- if (event.getSource() == textureItem)
2338
+ if (source == textureItem)
22292339 {
22302340 group(new TextureNode());
22312341 } else
2232
- if (event.getSource() == shadowXItem)
2342
+ if (source == billboardItem)
2343
+ {
2344
+ group(new BillboardNode());
2345
+ } else
2346
+ if (source == shadowXItem)
22332347 {
22342348 CastShadow(0);
22352349 } else
2236
- if (event.getSource() == shadowYItem)
2350
+ if (source == shadowYItem)
22372351 {
22382352 CastShadow(1);
22392353 } else
2240
- if (event.getSource() == shadowZItem)
2354
+ if (source == shadowZItem)
22412355 {
22422356 CastShadow(2);
22432357 } else
2244
- if (event.getSource() == ungroupItem)
2358
+ if (source == ungroupItem)
22452359 {
2246
- ungroup();
2360
+ //ungroup();
2361
+ for (int i=0; i<group.selection.size(); i++)
2362
+ {
2363
+ Ungroup(group.selection.get(i));
2364
+ }
2365
+
2366
+ ClearSelection(false);
2367
+
2368
+ refreshContents();
22472369 } else
2248
- if (event.getSource() == genUVItem)
2370
+ if (source == genUVItem)
22492371 {
22502372 GenUV();
22512373 } else
2252
- if (event.getSource() == genNormalsCADItem)
2374
+ if (source == genNormalsCADItem)
22532375 {
22542376 GenNormals(true);
22552377 } else
2256
- if (event.getSource() == genNormalsORGANItem)
2378
+ if (source == genNormalsMESHItem)
2379
+ {
2380
+ GenNormals(true); // TODO
2381
+ } else
2382
+ if (source == genNormalsORGANItem)
22572383 {
22582384 GenNormals(false);
22592385 } else
2260
- if (event.getSource() == stripifyItem)
2386
+ if (source == genNormalsMINEItem)
2387
+ {
2388
+ GenNormalsMINE();
2389
+ } else
2390
+ if (source == stripifyItem)
22612391 {
22622392 Stripify();
22632393 } else
2264
- if (event.getSource() == unstripifyItem)
2394
+ if (source == unstripifyItem)
22652395 {
22662396 Unstripify();
22672397 } else
2268
- if (event.getSource() == trimItem)
2398
+ if (source == trimItem)
22692399 {
22702400 Trim();
22712401 } else
2272
- if (event.getSource() == untrimItem)
2402
+ if (source == untrimItem)
22732403 {
22742404 Untrim();
22752405 } else
2276
- if (event.getSource() == clearColorsItem)
2406
+ if (source == clearColorsItem)
22772407 {
22782408 ClearColors();
22792409 } else
2280
- if (event.getSource() == clearMaterialsItem)
2410
+ if (source == clearMaterialsItem)
22812411 {
22822412 ClearMaterials();
22832413 } else
2284
- if (event.getSource() == liveleavesItem)
2414
+ if (source == liveleavesItem)
22852415 {
22862416 LiveLeaves(true);
22872417 } else
2288
- if (event.getSource() == unliveleavesItem)
2418
+ if (source == unliveleavesItem)
22892419 {
22902420 LiveLeaves(false);
22912421 } else
2292
- if (event.getSource() == supportleavesItem)
2422
+ if (source == supportleavesItem)
22932423 {
22942424 SupportLeaves(true);
22952425 } else
2296
- if (event.getSource() == unsupportleavesItem)
2426
+ if (source == unsupportleavesItem)
22972427 {
22982428 SupportLeaves(false);
22992429 } else
2300
- if (event.getSource() == hideleavesItem)
2430
+ if (source == hideleavesItem)
23012431 {
23022432 HideLeaves(true);
23032433 } else
2304
- if (event.getSource() == showleavesItem)
2434
+ if (source == showleavesItem)
23052435 {
23062436 HideLeaves(false);
23072437 } else
2308
- if (event.getSource() == markleavesItem)
2438
+ if (source == markleavesItem)
23092439 {
23102440 MarkLeaves(true);
23112441 } else
2312
- if (event.getSource() == unmarkleavesItem)
2442
+ if (source == unmarkleavesItem)
23132443 {
23142444 MarkLeaves(false);
23152445 } else
2316
- if (event.getSource() == flipVItem)
2446
+ if (source == flipVItem)
23172447 {
23182448 FlipV(true);
23192449 } else
2320
- if (event.getSource() == unflipVItem)
2450
+ if (source == unflipVItem)
23212451 {
23222452 FlipV(false);
23232453 } else
2324
- if (event.getSource() == lowTexturesItem)
2454
+ if (source == lowTexturesItem)
23252455 {
23262456 SetTexRes(0);
23272457 } else
2328
- if (event.getSource() == normalTexturesItem)
2458
+ if (source == normalTexturesItem)
23292459 {
23302460 SetTexRes(1);
23312461 } else
2332
- if (event.getSource() == highTexturesItem)
2462
+ if (source == highTexturesItem)
23332463 {
23342464 SetTexRes(2);
23352465 } else
2336
- if (event.getSource() == veryhighTexturesItem)
2466
+ if (source == veryhighTexturesItem)
23372467 {
23382468 SetTexRes(3);
23392469 } else
2340
- if (event.getSource() == maxTexturesItem)
2470
+ if (source == maxTexturesItem)
23412471 {
23422472 SetTexRes(4);
23432473 } else
2344
- if (event.getSource() == panoTexturesItem)
2474
+ if (source == panoTexturesItem)
23452475 {
23462476 SetTexRes(5);
23472477 } else
2348
- if (event.getSource() == reverseNormalsItem)
2478
+ if (source == reverseNormalsItem)
23492479 {
23502480 ReverseNormals();
23512481 } else
2352
- if (event.getSource() == parseverticesItem)
2482
+ if (source == parseverticesItem)
23532483 {
23542484 ParseVertices();
23552485 } else
2356
- if (event.getSource() == alignItem)
2486
+ if (source == textureFieldItem)
2487
+ {
2488
+ TextureVertices();
2489
+ } else
2490
+ if (source == alignItem)
23572491 {
23582492 Align();
23592493 } else
2360
- if (event.getSource() == mirrorItem)
2494
+ if (source == mirrorItem)
23612495 {
23622496 MirrorPoses();
23632497 } else
2364
- if (event.getSource() == reduceMorphItem)
2498
+ if (source == reduceMorphItem)
23652499 {
23662500 MeshReduction(false);
23672501 } else
2368
- if (event.getSource() == reduce34MorphItem)
2502
+ if (source == reduce34MorphItem)
23692503 {
23702504 MeshReduction(true);
23712505 } else
2372
- if (event.getSource() == reverseTrianglesItem)
2506
+ if (source == reverseTrianglesItem)
23732507 {
23742508 ReverseTriangles();
23752509 } else
2376
- if (event.getSource() == reduceMeshItem)
2510
+ if (source == reduceMeshItem)
23772511 {
23782512 ReduceMesh(false);
23792513 } else
2380
- if (event.getSource() == reduce34MeshItem)
2514
+ if (source == reduce34MeshItem)
23812515 {
23822516 ReduceMesh(true);
23832517 } else
2384
- if (event.getSource() == increaseMeshItem)
2518
+ if (source == increaseMeshItem)
23852519 {
23862520 IncreaseMesh();
23872521 } else
2388
- if (event.getSource() == clipMeshItem)
2522
+ if (source == clipMeshItem)
23892523 {
23902524 ClipMesh();
23912525 } else
2392
- if (event.getSource() == smoothMeshItem)
2526
+ if (source == smoothMeshItem)
23932527 {
23942528 SmoothMesh();
23952529 } else
2396
- if (event.getSource() == transformgeometryItem)
2530
+ if (source == transformgeometryItem)
23972531 {
23982532 TransformGeometry();
23992533 } else
2400
- if (event.getSource() == resetTransformItem)
2534
+ if (source == resetTransformItem)
24012535 {
24022536 ResetTransform();
24032537 } else
2404
- if (event.getSource() == resetCentroidItem)
2538
+ if (source == resetCentroidItem)
24052539 {
24062540 ResetCentroid();
24072541 } else
2408
- if (event.getSource() == resetParentItem)
2542
+ if (source == resetParentItem)
24092543 {
24102544 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24112545 {
....@@ -2415,7 +2549,7 @@
24152549
24162550 refreshContents();
24172551 } else
2418
- if (event.getSource() == repairParentItem)
2552
+ if (source == repairParentItem)
24192553 {
24202554 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24212555 {
....@@ -2429,7 +2563,21 @@
24292563
24302564 refreshContents();
24312565 } else
2432
- if (event.getSource() == sortbysizeItem)
2566
+ if (source == repairShadowItem)
2567
+ {
2568
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2569
+ {
2570
+ Object3D obj = (Object3D)e.nextElement();
2571
+ obj.RepairShadow();
2572
+// for (int i=0; i<obj.size(); i++)
2573
+// {
2574
+// obj.get(i).parent = obj;
2575
+// }
2576
+ }
2577
+
2578
+ refreshContents();
2579
+ } else
2580
+ if (source == sortbysizeItem)
24332581 {
24342582 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24352583 {
....@@ -2441,7 +2589,7 @@
24412589 ResetModel();
24422590 refreshContents();
24432591 } else
2444
- if (event.getSource() == sortbynameItem)
2592
+ if (source == sortbynameItem)
24452593 {
24462594 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24472595 {
....@@ -2453,7 +2601,7 @@
24532601 ResetModel();
24542602 refreshContents();
24552603 } else
2456
- if (event.getSource() == attachPigmentItem)
2604
+ if (source == attachPigmentItem)
24572605 {
24582606 String texture = GetFile("Attach pigment");
24592607 Object3D obj;
....@@ -2465,7 +2613,7 @@
24652613
24662614 refreshContents();
24672615 } else
2468
- if (event.getSource() == detachPigmentItem)
2616
+ if (source == detachPigmentItem)
24692617 {
24702618 Object3D obj;
24712619 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2476,7 +2624,7 @@
24762624
24772625 refreshContents();
24782626 } else
2479
- if (event.getSource() == attachBumpItem)
2627
+ if (source == attachBumpItem)
24802628 {
24812629 String texture = GetFile("Attach bump");
24822630 Object3D obj;
....@@ -2488,7 +2636,7 @@
24882636
24892637 refreshContents();
24902638 } else
2491
- if (event.getSource() == detachBumpItem)
2639
+ if (source == detachBumpItem)
24922640 {
24932641 Object3D obj;
24942642 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2499,7 +2647,7 @@
24992647
25002648 refreshContents();
25012649 } else
2502
- if (event.getSource() == pigmentBumpItem)
2650
+ if (source == pigmentBumpItem)
25032651 {
25042652 Object3D obj;
25052653 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2510,158 +2658,195 @@
25102658
25112659 refreshContents();
25122660 } else
2513
- if (event.getSource() == flashSelectionButton)
2661
+ if (source == flashSelectionButton)
25142662 {
25152663 CameraPane.flash = true;
25162664 refreshContents();
25172665 } else
2518
- if (event.getSource() == oneButton)
2666
+ if (source == oneButton)
25192667 {
25202668 } else
2521
- if (event.getSource() == twoButton)
2669
+ if (source == twoButton)
25222670 {
25232671 radio.layout = twoButton;
25242672 // bug
25252673 //gridPanel.setDividerLocation(1.0);
25262674 //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();
2675
+// bigThree.remove(scenePanel);
2676
+// bigThree.remove(centralPanel);
2677
+// bigThree.remove(XYZPanel);
2678
+// aWindowConstraints.gridx = 0;
2679
+// aWindowConstraints.gridy = 0;
2680
+// aWindowConstraints.gridwidth = 1;
2681
+// // aConstraints.gridheight = 3;
2682
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2683
+// aWindowConstraints.weightx = 0;
2684
+// aWindowConstraints.weighty = 1;
2685
+// //bigThree.add(jtp, aWindowConstraints);
2686
+// aWindowConstraints.weightx = 1;
2687
+// aWindowConstraints.gridwidth = 3;
2688
+// // aConstraints.gridheight = 3;
2689
+// aWindowConstraints.gridx = 1;
2690
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2691
+// bigThree.add(centralPanel, aWindowConstraints);
2692
+// aWindowConstraints.weightx = 0;
2693
+// aWindowConstraints.gridx = 4;
2694
+// aWindowConstraints.gridwidth = 1;
2695
+// // aConstraints.gridheight = 3;
2696
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2697
+// //bigThree.add(XYZPanel, aWindowConstraints);
2698
+// scenePanel.setVisible(false);
2699
+// centralPanel.setVisible(true);
2700
+// XYZPanel.setVisible(false);
2701
+ bigThree.ClearUI();
2702
+ bigThree.add(centralPanel);
2703
+ bigThree.FlushUI();
25512704 } else
2552
- if (event.getSource() == threeButton)
2705
+ if (source == threeButton)
25532706 {
25542707 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();
2708
+
2709
+// bigThree.remove(scenePanel);
2710
+// bigThree.remove(centralPanel);
2711
+// bigThree.remove(XYZPanel);
2712
+// aWindowConstraints.gridx = 0;
2713
+// aWindowConstraints.gridy = 0;
2714
+// aWindowConstraints.gridwidth = 1;
2715
+// // aConstraints.gridheight = 3;
2716
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2717
+// aWindowConstraints.weightx = 0;
2718
+// aWindowConstraints.weighty = 1;
2719
+// //bigThree.add(jtp, aWindowConstraints);
2720
+// aWindowConstraints.weightx = 1;
2721
+// aWindowConstraints.gridwidth = 3;
2722
+// // aConstraints.gridheight = 3;
2723
+// aWindowConstraints.gridx = 1;
2724
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2725
+// bigThree.add(centralPanel, aWindowConstraints);
2726
+// aWindowConstraints.weightx = 0;
2727
+// aWindowConstraints.gridx = 4;
2728
+// aWindowConstraints.gridwidth = 1;
2729
+// // aConstraints.gridheight = 3;
2730
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2731
+// bigThree.add(XYZPanel, aWindowConstraints);
2732
+// bigThree.validate();
2733
+// scenePanel.setVisible(false);
2734
+// centralPanel.setVisible(true);
2735
+// XYZPanel.setVisible(true);
2736
+ bigThree.ClearUI();
2737
+ bigThree.add(centralPanel);
2738
+ bigThree.add(XYZPanel);
2739
+ bigThree.FlushUI();
25792740 } else
2580
- if (event.getSource() == fourButton)
2741
+ if (source == fourButton)
25812742 {
25822743 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();
2744
+
2745
+// bigThree.remove(scenePanel);
2746
+// bigThree.remove(centralPanel);
2747
+// bigThree.remove(XYZPanel);
2748
+// aWindowConstraints.gridx = 0;
2749
+// aWindowConstraints.gridy = 0;
2750
+// aWindowConstraints.gridwidth = 1;
2751
+// // aWindowConstraints.gridheight = 3;
2752
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2753
+// aWindowConstraints.weightx = 1;
2754
+// aWindowConstraints.weighty = 1;
2755
+// bigThree.add(scenePanel, aWindowConstraints);
2756
+// aWindowConstraints.weightx = 1;
2757
+// aWindowConstraints.gridwidth = 3;
2758
+// // aConstraints.gridheight = 3;
2759
+// aWindowConstraints.gridx = 1;
2760
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2761
+// //bigThree.add(cameraPanel, aWindowConstraints);
2762
+// aWindowConstraints.weightx = 0;
2763
+// aWindowConstraints.gridx = 4;
2764
+// aWindowConstraints.gridwidth = 1;
2765
+// // aWindowConstraints.gridheight = 3;
2766
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2767
+// //bigThree.add(XYZPanel, aWindowConstraints);
2768
+// bigThree.validate();
2769
+// scenePanel.setVisible(true);
2770
+// centralPanel.setVisible(false);
2771
+// XYZPanel.setVisible(false);
2772
+ bigThree.ClearUI();
2773
+ bigThree.add(scenePanel);
2774
+ bigThree.FlushUI();
26072775 } else
2608
- if (event.getSource() == sixButton)
2776
+ if (source == sixButton)
26092777 {
26102778 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();
2779
+
2780
+// bigThree.remove(scenePanel);
2781
+// bigThree.remove(centralPanel);
2782
+// bigThree.remove(XYZPanel);
2783
+// aWindowConstraints.gridx = 0;
2784
+// aWindowConstraints.gridy = 0;
2785
+// aWindowConstraints.gridwidth = 1;
2786
+// // aConstraints.gridheight = 3;
2787
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2788
+// aWindowConstraints.weightx = 0;
2789
+// aWindowConstraints.weighty = 1;
2790
+// bigThree.add(scenePanel, aWindowConstraints);
2791
+// aWindowConstraints.weightx = 1;
2792
+// aWindowConstraints.gridwidth = 3;
2793
+// // aWindowConstraints.gridheight = 3;
2794
+// aWindowConstraints.gridx = 1;
2795
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2796
+// bigThree.add(centralPanel, aWindowConstraints);
2797
+// aWindowConstraints.weightx = 0;
2798
+// aWindowConstraints.gridx = 4;
2799
+// aWindowConstraints.gridwidth = 1;
2800
+// // aWindowConstraints.gridheight = 3;
2801
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2802
+// //bigThree.add(XYZPanel, aConstraints);
2803
+// bigThree.validate();
2804
+// scenePanel.setVisible(true);
2805
+// centralPanel.setVisible(true);
2806
+// XYZPanel.setVisible(false);
2807
+ bigThree.ClearUI();
2808
+ bigThree.add(scenePanel);
2809
+ bigThree.add(centralPanel);
2810
+ bigThree.FlushUI();
26352811 } else
2636
- if (event.getSource() == sevenButton)
2812
+ if (source == sevenButton)
26372813 {
26382814 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();
2815
+
2816
+// bigThree.remove(scenePanel);
2817
+// bigThree.remove(centralPanel);
2818
+// bigThree.remove(XYZPanel);
2819
+// aWindowConstraints.gridx = 0;
2820
+// aWindowConstraints.gridy = 0;
2821
+// aWindowConstraints.gridwidth = 1;
2822
+// // aWindowConstraints.gridheight = 3;
2823
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2824
+// aWindowConstraints.weightx = 0;
2825
+// aWindowConstraints.weighty = 1;
2826
+// bigThree.add(scenePanel, aWindowConstraints);
2827
+// aWindowConstraints.weightx = 1;
2828
+// aWindowConstraints.gridwidth = 3;
2829
+// // aWindowConstraints.gridheight = 3;
2830
+// aWindowConstraints.gridx = 1;
2831
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2832
+// bigThree.add(centralPanel, aWindowConstraints);
2833
+// aWindowConstraints.weightx = 0;
2834
+// aWindowConstraints.gridx = 4;
2835
+// aWindowConstraints.gridwidth = 1;
2836
+// // aConstraints.gridheight = 3;
2837
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2838
+// bigThree.add(XYZPanel, aWindowConstraints);
2839
+// bigThree.validate();
2840
+// scenePanel.setVisible(true);
2841
+// centralPanel.setVisible(true);
2842
+// XYZPanel.setVisible(true);
2843
+ bigThree.ClearUI();
2844
+ bigThree.add(scenePanel);
2845
+ bigThree.add(centralPanel);
2846
+ bigThree.add(XYZPanel);
2847
+ bigThree.FlushUI();
26632848 } else
2664
- if (event.getSource() == rootButton)
2849
+ if (source == rootButton)
26652850 {
26662851 Object3D obj;
26672852 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2673,7 +2858,7 @@
26732858
26742859 refreshContents(true);
26752860 } else
2676
- if (event.getSource() == closeButton)
2861
+ if (source == closeButton)
26772862 {
26782863 //System.out.println("CLOSE: " + buttonGroup.getSelection());
26792864 cRadio ab;
....@@ -2694,11 +2879,11 @@
26942879 }
26952880 refreshContents(true);
26962881 } else
2697
- if (event.getSource() == editItem || event.getSource() == editButton)
2882
+ if (source == editItem || source == editButton)
26982883 {
26992884 EditSelection(false);
27002885 } else
2701
- if (event.getSource() == uneditButton)
2886
+ if (source == uneditButton)
27022887 {
27032888 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27042889 {
....@@ -2710,12 +2895,12 @@
27102895
27112896 child.editWindow = null; // ???????????
27122897 }
2713
- objEditor.ctrlPanel.revalidate();
2898
+ objEditor.ctrlPanel.validate();
27142899 //objEditor.jTree.clearSelection();
27152900 //objEditor.ResetSliders();
27162901 refreshContents(true);
27172902 } else
2718
- if (event.getSource() == clearPanelButton)
2903
+ if (source == clearPanelButton)
27192904 {
27202905 assert(copy == group);
27212906 //copy.ClearUI();
....@@ -2726,7 +2911,7 @@
27262911 listUI.clear();
27272912 refreshContents(true);
27282913 } else
2729
- if (event.getSource() == allParamsButton)
2914
+ if (source == allParamsButton)
27302915 {
27312916 assert(copy == group);
27322917
....@@ -2747,19 +2932,19 @@
27472932
27482933 refreshContents(true);
27492934 } else
2750
- if (event.getSource() == unselectButton)
2935
+ if (source == unselectButton)
27512936 {
27522937 objEditor.jTree.clearSelection();
2753
- // ?? oct 2012 GraphreeD.clipboard.clear();
2938
+ // ?? oct 2012 GrafreeD.clipboard.clear();
27542939 objEditor.ResetSliders();
27552940 refreshContents(true);
27562941 } else
2757
- if(event.getSource() instanceof cRadio)
2942
+ if(source instanceof cRadio)
27582943 {
27592944 group.parent = keepparent;
27602945 group.attributes = 0;
27612946 //group.editWindow = null;
2762
- /*cRadio*/ radio = (cRadio)event.getSource();
2947
+ /*cRadio*/ radio = (cRadio)source;
27632948 Object3D obj = radio.GetObject();
27642949 System.out.println("Edit " + obj);
27652950 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2779,7 +2964,7 @@
27792964 }
27802965
27812966 copy = group;
2782
- //CameraPane.theRenderer.object = group;
2967
+ //Globals.theRenderer.object = group;
27832968 if(!useclient)
27842969 {
27852970 cameraView.renderCamera = radio.camera;
....@@ -2788,7 +2973,8 @@
27882973 cameraView.cameras[cameraView.cameracount] = radio.camera;
27892974 cameraView.targetLookAt.set(radio.camera.lookAt);
27902975 cameraView.object = group;
2791
- cameraView.lighttouched = true;
2976
+ //cameraView.lighttouched = true;
2977
+ Globals.lighttouched = true;
27922978 topView.object = group;
27932979 frontView.object = group;
27942980 sideView.object = group;
....@@ -2824,7 +3010,7 @@
28243010 if (useclient)
28253011 {
28263012 cameraView.object = client;
2827
- cameraView.lighttouched = true;
3013
+ Globals.lighttouched = true;
28283014 //topView.object = client;
28293015 //frontView.object = client;
28303016 //sideView.object = client;
....@@ -2832,7 +3018,7 @@
28323018 else
28333019 {
28343020 cameraView.object = group;
2835
- cameraView.lighttouched = true;
3021
+ Globals.lighttouched = true;
28363022 //topView.object = group;
28373023 //frontView.object = group;
28383024 //sideView.object = group;
....@@ -3065,9 +3251,9 @@
30653251 obj = (Object3D)e.nextElement();
30663252
30673253 System.out.println("Object is: " + obj);
3068
- GraphreeD.AnalyzeObject(obj);
3254
+ GrafreeD.AnalyzeObject(obj);
30693255 System.out.println("Boundary rep: " + obj.bRep);
3070
- GraphreeD.AnalyzeObject(obj.bRep);
3256
+ GrafreeD.AnalyzeObject(obj.bRep);
30713257
30723258 // System.err.println((size/1024) + " KB is the size of " + obj);
30733259 }
....@@ -3109,6 +3295,13 @@
31093295 void GenNormals(boolean crease)
31103296 {
31113297 group.GenNormalsS(crease);
3298
+
3299
+ refreshContents();
3300
+ }
3301
+
3302
+ void GenNormalsMINE()
3303
+ {
3304
+ group.selection.GenNormalsMINE();
31123305
31133306 refreshContents();
31143307 }
....@@ -3157,104 +3350,250 @@
31573350
31583351 //Object3D buffer;
31593352 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
-
3353
+// BoundaryRep temprep;
3354
+// Object3D nodes;
3355
+// Vector<Vertex> vertices;
3356
+//
3357
+// cGroup buffer;
3358
+//
3359
+// public void Vertex(Object3D node, Vertex v)
3360
+// {
3361
+//// vertices.add(v);
3362
+//// nodes.addElement(node);
3363
+////
3364
+//// if (temprep.GetCache(v) != null)
3365
+//// {
3366
+//// temprep.Remove(v);
3367
+//// } else
3368
+//// {
3369
+//// temprep.Remember(v);
3370
+//// }
3371
+//
3372
+// //Object3D node = nodes.get(index);
3373
+// temp.set(v); // vertices.get(index)); // temprep.GetVertex(k));
3374
+// // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z);
3375
+//
3376
+// LA.xformPos(temp, node.GlobalTransformInv(), temp);
3377
+//
3378
+// // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z);
3379
+//
3380
+// cGroup g = new cGroup();
3381
+//
3382
+// if (g.toParent == null)
3383
+// {
3384
+// g.toParent = LA.newMatrix();
3385
+// g.fromParent = LA.newMatrix();
3386
+// }
3387
+// LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
3388
+// LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
3389
+//
3390
+// g.add(GrafreeD.clipboard);
3391
+//
3392
+// buffer.add(g);
3393
+// }
3394
+//
3395
+// public void Face(Object3D node, Face f)
3396
+// {
3397
+//
3398
+// }
3399
+//
3400
+// void ParseVerticesOld() // ??
3401
+// {
3402
+// //if (group.selection.size() != 1)
3403
+// // return;
3404
+//
3405
+// temprep = new BoundaryRep();
3406
+// nodes = new Object3D();
3407
+// vertices = new Vector<Vertex>();
3408
+//
3409
+// boolean epsequal = GrafreeD.epsequal;
3410
+// GrafreeD.epsequal = true;
3411
+//
3412
+// for (int i=0; i<group.selection.size(); i++)
3413
+// {
3414
+// Object3D buffer = new cGroup(group.selection.get(i).name + "+");
3415
+//
3416
+// group.selection.get(i).Parse(
3417
+//this );
3418
+//
3419
+// int repsize = temprep.VertexCount();
3420
+// int tablesize = temprep.vertextable.size();
3421
+// int nodesize = nodes.size();
3422
+//
3423
+// assert(vertices.size() == nodes.size());
3424
+//
3425
+// temprep.vertextable.elements();
3426
+//
3427
+// java.util.Set<java.util.Map.Entry<Vertex,Vertex>> set = temprep.vertextable.entrySet();
3428
+//
3429
+// for (java.util.Map.Entry<Vertex,Vertex> entry : set)
3430
+// {
3431
+// cGroup g = new cGroup();
3432
+//
3433
+// int index = vertices.indexOf(entry.getValue()); // temprep.vertextable.(k));
3434
+//
3435
+// Object3D node = nodes.get(index);
3436
+// temp.set(vertices.get(index)); // temprep.GetVertex(k));
3437
+// // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z);
3438
+//
3439
+// LA.xformPos(temp, node.GlobalTransformInv(), temp);
3440
+//
3441
+// // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z);
3442
+//
3443
+// if (g.toParent == null)
3444
+// {
3445
+// g.toParent = LA.newMatrix();
3446
+// g.fromParent = LA.newMatrix();
3447
+// }
3448
+// LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
3449
+// LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
3450
+//
3451
+// g.add(GrafreeD.clipboard);
3452
+//
3453
+// buffer.add(g);
3454
+// }
3455
+//
3456
+// makeSomething(buffer, i==group.selection.size()-1);
3457
+// }
3458
+//
3459
+// GrafreeD.epsequal = epsequal;
3460
+//
3461
+// //buffer = null;
3462
+// temprep = null;
3463
+// nodes = null;
3464
+//
3465
+// refreshContents();
3466
+// }
3467
+
31843468 void ParseVertices()
31853469 {
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;
3470
+ boolean epsequal = GrafreeD.epsequal;
3471
+ GrafreeD.epsequal = true;
31953472
31963473 for (int i=0; i<group.selection.size(); i++)
31973474 {
3198
- Object3D buffer = new cGroup(group.selection.get(i).name + "+");
3475
+ final cGroup buffer = new cGroup(group.selection.get(i).name + "+");
31993476
3200
- group.selection.get(i).Parse(this);
3201
-
3202
- int repsize = temprep.VertexCount();
3203
- int tablesize = temprep.vertextable.size();
3204
- int nodesize = nodes.size();
3477
+ group.selection.get(i).Parse(
3478
+
3479
+ new iParse()
3480
+ {
3481
+ public void Vertex(Object3D node, Vertex v)
3482
+ {
3483
+ temp.set(v);
3484
+ LA.xformPos(temp, node.GlobalTransformInv(), temp);
32053485
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();
3486
+ cGroup g = new cGroup();
32113487
3212
- for (java.util.Map.Entry<Vertex,Vertex> entry : set)
3213
- {
3214
- cGroup g = new cGroup();
3488
+ if (g.toParent == null)
3489
+ {
3490
+ g.toParent = LA.newMatrix();
3491
+ g.fromParent = LA.newMatrix();
3492
+ }
3493
+ LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
3494
+ LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
32153495
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);
3496
+ g.add(GrafreeD.clipboard);
32203497
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);
3498
+ buffer.add(g);
3499
+ }
32323500
3233
- g.add(GraphreeD.clipboard);
3501
+ public void Face(Object3D node, Face f)
3502
+ {
32343503
3235
- buffer.add(g);
3236
- }
3504
+ }
3505
+ }
3506
+ );
32373507
32383508 makeSomething(buffer, i==group.selection.size()-1);
32393509 }
32403510
3241
- GraphreeD.epsequal = epsequal;
3242
-
3243
- //buffer = null;
3244
- temprep = null;
3245
- nodes = null;
3511
+ GrafreeD.epsequal = epsequal;
32463512
32473513 refreshContents();
32483514 }
3249
-
3515
+
3516
+ void TextureVertices()
3517
+ {
3518
+ for (int i=0; i<group.selection.size(); i++)
3519
+ {
3520
+ group.selection.get(i).Parse(
3521
+ new iParse()
3522
+ {
3523
+ public void Vertex(Object3D node, Vertex v)
3524
+ {
3525
+ cTexture tex = node.GetTextures();
3526
+ String pigment = Object3D.GetPigment(tex);
3527
+ //String bump = Object3D.GetBump(tex);
3528
+
3529
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3530
+
3531
+ double s = v.s;
3532
+
3533
+ if (s == 1)
3534
+ s = 0;
3535
+
3536
+ double t = v.t;
3537
+
3538
+ if (t == 1)
3539
+ t = 0;
3540
+
3541
+ int indexs = (int) (texturedata.getWidth() * s);
3542
+ int indext = (int) (texturedata.getHeight() * t);
3543
+
3544
+ int index = indext * texturedata.getWidth() + indexs;
3545
+
3546
+ java.nio.ByteBuffer bytebuf = (java.nio.ByteBuffer)texturedata.getBuffer();
3547
+
3548
+ int slide = bytebuf.capacity() / texturedata.getWidth() / texturedata.getHeight();
3549
+
3550
+ float scale = bytebuf.get(index*slide) & 0xFF;
3551
+ scale += bytebuf.get(index*slide+1) & 0xFF;
3552
+ scale += bytebuf.get(index*slide+2) & 0xFF;
3553
+ scale /= 3;
3554
+
3555
+ scale /= 0xFF;
3556
+ // c'est quoi ca? scale /= 4;
3557
+
3558
+ //v.AO = scale;
3559
+
3560
+ v.x += v.norm.x * scale;
3561
+ v.y += v.norm.y * scale;
3562
+ v.z += v.norm.z * scale;
3563
+ }
3564
+
3565
+ public void Face(Object3D node, Face f)
3566
+ {
3567
+ }
3568
+ }
3569
+ );
3570
+ }
3571
+
3572
+ refreshContents();
3573
+ }
3574
+
32503575 void Align()
32513576 {
3577
+ if (group.selection.size() == 0)
3578
+ return;
3579
+
3580
+ cVector bbmin = new cVector();
3581
+ cVector bbmax = new cVector();
3582
+
3583
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3584
+
3585
+ double dx = bbmax.x - bbmin.x;
3586
+ double dy = bbmax.y - bbmin.y;
3587
+ double dz = bbmax.z - bbmin.z;
3588
+
3589
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3590
+
32523591 for (int i=0; i<group.selection.size(); i++)
32533592 {
32543593 Object3D obj = group.selection.get(i);
32553594
3256
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3257
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3595
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3596
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
32583597 }
32593598
32603599 refreshContents();
....@@ -3267,7 +3606,7 @@
32673606 // ref.SaveSupports();
32683607 // Object3D par = ref.parent;
32693608 // ref.parent = null;
3270
-// Object3D lowres = (Object3D) GraphreeD.clone(ref);
3609
+// Object3D lowres = (Object3D) GrafreeD.clone(ref);
32713610 // ref.parent = par;
32723611 // ref.RestoreSupports();
32733612
....@@ -3297,7 +3636,7 @@
32973636 // lowres.SaveSupports();
32983637 // par = lowres.parent;
32993638 // lowres.parent = null;
3300
-// Object3D newlow = (Object3D) GraphreeD.clone(lowres);
3639
+// Object3D newlow = (Object3D) GrafreeD.clone(lowres);
33013640 Object3D newlow = CloneObject(lowres, false);
33023641 newlow.name = sn.switchobject.get(i).name;
33033642 System.out.println(" pose#" + i + " = " + newlow);
....@@ -3319,7 +3658,7 @@
33193658 return;
33203659
33213660 Object3D poses = group.selection.get(0);
3322
- Object3D ref = GraphreeD.clipboard.get(0);
3661
+ Object3D ref = GrafreeD.clipboard.get(0);
33233662
33243663 Object3D newgroup = new Object3D("Po:" + poses.name);
33253664
....@@ -3488,7 +3827,7 @@
34883827 group.selection.RelinkToSupport(); // july 2014
34893828 System.out.println("DONE.");
34903829 refreshContents();
3491
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3830
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
34923831 }
34933832
34943833 void ReduceMesh(boolean reduction34)
....@@ -3513,20 +3852,20 @@
35133852
35143853 void ClipMesh()
35153854 {
3516
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
3855
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
35173856 {
3518
- Object3D content = GraphreeD.clipboard.get(0);
3857
+ Object3D content = GrafreeD.clipboard.get(0);
35193858
35203859 if (content instanceof cGroup && ((cGroup)content).transientlink )
35213860 content = ((cGroup)content).get(0);
35223861
35233862 // for (int i=0; i<group.selection.size(); i++)
35243863 // {
3525
-// group.selection.get(i).ClipMesh(GraphreeD.clipboard);
3864
+// group.selection.get(i).ClipMesh(GrafreeD.clipboard);
35263865 // }
3527
- group.selection.ClipMesh(GraphreeD.clipboard);
3866
+ group.selection.ClipMesh(GrafreeD.clipboard);
35283867 }
3529
-// group.selection.ClipMesh(GraphreeD.clipboard);
3868
+// group.selection.ClipMesh(GrafreeD.clipboard);
35303869 System.out.println("DONE.");
35313870 refreshContents();
35323871 }
....@@ -3764,25 +4103,25 @@
37644103 System.err.println("info : " + child.GetPath());
37654104 }
37664105 }
3767
- else
3768
- {
3769
- objEditor.SetMaterial(group); // .GetMaterial());
3770
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3771
- System.err.println("info : " + group.GetPath());
3772
- }
4106
+// else
4107
+// {
4108
+// objEditor.SetMaterial(group); // .GetMaterial());
4109
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4110
+// System.err.println("info : " + group.GetPath());
4111
+// }
37734112
37744113 objEditor.SetText(); // jan 2014
37754114
3776
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4115
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
37774116 CameraPane.flash = true;
37784117
37794118 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
37804119 // a camera
37814120 {
37824121 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;
4122
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4123
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4124
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
37864125 }
37874126
37884127 refreshContents();
....@@ -3864,12 +4203,12 @@
38644203 {
38654204 if (group.selection.isEmpty())
38664205 return;
3867
- GraphreeD.clipboardIsTempGroup = false;
4206
+ GrafreeD.clipboardIsTempGroup = false;
38684207 Composite tGroup = null;
38694208 if (group.selection.size() > 0) // 1)
38704209 {
38714210 tGroup = new cGroup();
3872
- GraphreeD.clipboardIsTempGroup = true;
4211
+ GrafreeD.clipboardIsTempGroup = true;
38734212 }
38744213
38754214 if (cut)
....@@ -3909,16 +4248,16 @@
39094248 //System.out.println("cut " + child);
39104249 //System.out.println("parent = " + child.parent);
39114250 // tmp.addChild(child);
3912
- if (GraphreeD.clipboardIsTempGroup)
4251
+ if (GrafreeD.clipboardIsTempGroup)
39134252 tGroup.add/*Child*/(tmp);
39144253 else
3915
- GraphreeD.clipboard = tmp;
4254
+ GrafreeD.clipboard = tmp;
39164255 }
39174256 else
3918
- if (GraphreeD.clipboardIsTempGroup)
4257
+ if (GrafreeD.clipboardIsTempGroup)
39194258 tGroup.add/*Child*/(child);
39204259 else
3921
- GraphreeD.clipboard = child;
4260
+ GrafreeD.clipboard = child;
39224261 }
39234262
39244263 //ResetModel();
....@@ -3950,21 +4289,21 @@
39504289 //System.out.println("cut " + elem);
39514290 //System.out.println("parent = " + elem.parent);
39524291 // tmp.addChild(elem);
3953
- if (GraphreeD.clipboardIsTempGroup)
4292
+ if (GrafreeD.clipboardIsTempGroup)
39544293 tGroup.add/*Child*/(tmp);
39554294 else
3956
- GraphreeD.clipboard = tmp;
4295
+ GrafreeD.clipboard = tmp;
39574296 }
39584297 else
3959
- if (GraphreeD.clipboardIsTempGroup)
4298
+ if (GrafreeD.clipboardIsTempGroup)
39604299 tGroup.add/*Child*/(child);
39614300 else
3962
- GraphreeD.clipboard = child;
4301
+ GrafreeD.clipboard = child;
39634302 }
39644303
39654304 }
3966
- if (GraphreeD.clipboardIsTempGroup)
3967
- GraphreeD.clipboard = tGroup;
4305
+ if (GrafreeD.clipboardIsTempGroup)
4306
+ GrafreeD.clipboard = tGroup;
39684307 if (cut)
39694308 {
39704309 ResetModel();
....@@ -3974,11 +4313,11 @@
39744313
39754314 void paste(boolean expand)
39764315 {
3977
- // if (GraphreeD.clipboard == null)
4316
+ // if (GrafreeD.clipboard == null)
39784317 // return;
39794318 boolean first = true;
39804319
3981
- if (GraphreeD.clipboardIsTempGroup)
4320
+ if (GrafreeD.clipboardIsTempGroup)
39824321 {
39834322 Composite temp;
39844323
....@@ -3989,7 +4328,7 @@
39894328 temp = (Composite)Applet3D.clipboard.deepCopy();
39904329 */
39914330 Object3D elem;
3992
- for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4331
+ for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
39934332 {
39944333 Object3D child = (Object3D)e.nextElement();
39954334
....@@ -4003,7 +4342,7 @@
40034342 else
40044343 elem = child.deepCopy(); // ?
40054344 child.parent = keepparent;
4006
- //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
4345
+ //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
40074346 // elem = elem.get(0);
40084347 makeSomething(elem, true); // ?? first);
40094348 //group.addChild(elem);
....@@ -4023,14 +4362,14 @@
40234362 //Object3D cb = Applet3D.clipboard;
40244363 //temp.addChild(cb);
40254364 //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());
4365
+ assert(GrafreeD.clipboard.parent == null);
4366
+ Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4367
+ GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4368
+ if (LA.isIdentity(GrafreeD.clipboard.toParent))
4369
+ makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
40314370 else
4032
- makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy());
4033
- GraphreeD.clipboard.get(0).parent = keepparent;
4371
+ makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4372
+ GrafreeD.clipboard.get(0).parent = keepparent;
40344373 }
40354374
40364375 ResetModel();
....@@ -4039,7 +4378,7 @@
40394378
40404379 void pasteInto(boolean copyit)
40414380 {
4042
-// if (GraphreeD.clipboard == null)
4381
+// if (GrafreeD.clipboard == null)
40434382 // return;
40444383
40454384 if (group.selection.size() != 1)
....@@ -4072,9 +4411,9 @@
40724411 {
40734412 boolean first = true;
40744413
4075
- if (GraphreeD.clipboardIsTempGroup)
4414
+ if (GrafreeD.clipboardIsTempGroup)
40764415 {
4077
- Composite temp = (Composite)GraphreeD.clipboard;
4416
+ Composite temp = (Composite)GrafreeD.clipboard;
40784417 Object3D copy;
40794418 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
40804419 {
....@@ -4084,7 +4423,7 @@
40844423 }
40854424 } else
40864425 {
4087
- linkSomething(GraphreeD.clipboard); //.get(0));
4426
+ linkSomething(GrafreeD.clipboard); //.get(0));
40884427 }
40894428 }
40904429 }
....@@ -4276,6 +4615,26 @@
42764615 makeSomething(csg);
42774616 }
42784617
4618
+ void Ungroup(Object3D g)
4619
+ {
4620
+ if (g instanceof HiddenObject)
4621
+ {
4622
+ HiddenObject h = (HiddenObject) g;
4623
+
4624
+ for (int i=0; i<h.ActualSize(); i++)
4625
+ {
4626
+ objEditor.makeSomething(h.get(i), false);
4627
+ }
4628
+ }
4629
+ else
4630
+ {
4631
+ for (int i=0; i<g.Size(); i++)
4632
+ {
4633
+ objEditor.makeSomething(g.get(i), false);
4634
+ }
4635
+ }
4636
+ }
4637
+
42794638 void ungroup()
42804639 {
42814640 /*
....@@ -4471,7 +4830,7 @@
44714830
44724831 void ImportGFD()
44734832 {
4474
- FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD);
4833
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
44754834 browser.show();
44764835 String filename = browser.getFile();
44774836 if (filename != null && filename.length() > 0)
....@@ -4509,7 +4868,7 @@
45094868
45104869 void ImportVRMLX3D()
45114870 {
4512
- if (GraphreeD.standAlone)
4871
+ if (GrafreeD.standAlone)
45134872 {
45144873 /**/
45154874 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4526,7 +4885,7 @@
45264885
45274886 String GetFile(String dialogName)
45284887 {
4529
- if (GraphreeD.standAlone)
4888
+ if (GrafreeD.standAlone)
45304889 {
45314890 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
45324891 browser.show();
....@@ -4635,6 +4994,7 @@
46354994 private MenuItem resetsupportItem;
46364995 private MenuItem resetreferencesItem;
46374996 private MenuItem linkverticesItem;
4997
+ private MenuItem relinkverticesItem;
46384998 private MenuItem setMasterItem;
46394999 private MenuItem resetMeshItem;
46405000 private MenuItem stepAllItem;
....@@ -4653,8 +5013,10 @@
46535013 private MenuItem clearItem;
46545014 private MenuItem clearAllItem;
46555015 private MenuItem genUVItem;
5016
+ private MenuItem genNormalsMESHItem;
46565017 private MenuItem genNormalsCADItem;
46575018 private MenuItem genNormalsORGANItem;
5019
+ private MenuItem genNormalsMINEItem;
46585020 private MenuItem stripifyItem;
46595021 private MenuItem unstripifyItem;
46605022 private MenuItem trimItem;
....@@ -4696,6 +5058,7 @@
46965058 private MenuItem resetCentroidItem;
46975059 private MenuItem transformgeometryItem;
46985060 private MenuItem resetTransformItem;
5061
+ private MenuItem hideItem;
46995062 private MenuItem grabItem;
47005063 private MenuItem backItem;
47015064 private MenuItem frontItem;
....@@ -4716,6 +5079,7 @@
47165079
47175080 private MenuItem resetParentItem;
47185081 private MenuItem repairParentItem;
5082
+ private MenuItem repairShadowItem;
47195083 private MenuItem sortbysizeItem;
47205084 private MenuItem sortbynameItem;
47215085
....@@ -4728,12 +5092,15 @@
47285092 private MenuItem particleItem;
47295093 private MenuItem ragdollItem;
47305094 private MenuItem ragdoll2Item;
5095
+ private MenuItem heightFieldItem;
5096
+ private MenuItem textureFieldItem;
47315097 private MenuItem gridItem;
47325098 private MenuItem rectoidItem;
47335099 private MenuItem ellipsoidItem;
47345100 private MenuItem coneItem;
47355101 private MenuItem torusItem;
47365102 private MenuItem superItem;
5103
+ private MenuItem kleinItem;
47375104 private MenuItem blobItem;
47385105 private MenuItem latheItem;
47395106 private MenuItem bezierItem;
....@@ -4746,6 +5113,7 @@
47465113 private MenuItem csgItem;
47475114 private MenuItem templateItem;
47485115 private MenuItem textureItem;
5116
+ private MenuItem billboardItem;
47495117 private MenuItem shadowXItem;
47505118 private MenuItem shadowYItem;
47515119 private MenuItem shadowZItem;