.. | .. |
---|
12 | 12 | import com.jme.math.Vector3f; |
---|
13 | 13 | import com.jme.renderer.ColorRGBA; |
---|
14 | 14 | |
---|
| 15 | +import grafeme.ui.*; |
---|
15 | 16 | //import buoy.widget.BFileChooser; |
---|
16 | 17 | |
---|
17 | | -class GroupEditor extends ObjEditor implements iParse, //iCallBack, |
---|
| 18 | +class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
18 | 19 | ObjectUI, |
---|
19 | 20 | Runnable, |
---|
20 | 21 | ActionListener, |
---|
.. | .. |
---|
83 | 84 | |
---|
84 | 85 | void CloneSelection(boolean supports) |
---|
85 | 86 | { |
---|
86 | | - // Object3D keep = GraphreeD.clipboard; |
---|
| 87 | + // Object3D keep = GrafreeD.clipboard; |
---|
87 | 88 | //Object3D obj; |
---|
88 | 89 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
89 | 90 | { |
---|
.. | .. |
---|
97 | 98 | |
---|
98 | 99 | void CloneClipboard(boolean supports) |
---|
99 | 100 | { |
---|
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)); |
---|
105 | 106 | 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; |
---|
108 | 109 | } |
---|
109 | 110 | |
---|
110 | 111 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
118 | 119 | // obj.support = null; |
---|
119 | 120 | if (!supports) |
---|
120 | 121 | obj.SaveSupports(); |
---|
121 | | - Object3D clone = (Object3D)GraphreeD.clone(obj); |
---|
| 122 | + Object3D clone = (Object3D)GrafreeD.clone(obj); |
---|
122 | 123 | obj.parent = parent; |
---|
123 | 124 | // obj.support = support; |
---|
124 | 125 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
188 | 189 | clearItem.addActionListener(this); |
---|
189 | 190 | clearAllItem = menu.add(new MenuItem("Clear All")); |
---|
190 | 191 | 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")); |
---|
193 | 195 | resetMeshItem.addActionListener(this); |
---|
194 | 196 | stepAllItem = menu.add(new MenuItem("Step All")); |
---|
195 | 197 | stepAllItem.addActionListener(this); |
---|
.. | .. |
---|
218 | 220 | resetsupportItem.addActionListener(this); |
---|
219 | 221 | linkverticesItem = menu.add(new MenuItem("Link to Support")); |
---|
220 | 222 | linkverticesItem.addActionListener(this); |
---|
| 223 | + relinkverticesItem = menu.add(new MenuItem("Re-link to Support")); |
---|
| 224 | + relinkverticesItem.addActionListener(this); |
---|
221 | 225 | setMasterItem = menu.add(new MenuItem("Set Master Mesh")); |
---|
222 | 226 | setMasterItem.addActionListener(this); |
---|
223 | 227 | |
---|
224 | | - oe.menuBar.add(menu = new Menu("Object")); |
---|
| 228 | + oe.menuBar.add(menu = new Menu("Group")); |
---|
225 | 229 | grabItem = menu.add(new MenuItem("Grab")); |
---|
226 | 230 | grabItem.addActionListener(this); |
---|
227 | | - frontItem = menu.add(new MenuItem("Front")); |
---|
228 | | - frontItem.addActionListener(this); |
---|
229 | 231 | backItem = menu.add(new MenuItem("Back")); |
---|
230 | 232 | backItem.addActionListener(this); |
---|
| 233 | + frontItem = menu.add(new MenuItem("Front")); |
---|
| 234 | + frontItem.addActionListener(this); |
---|
231 | 235 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
232 | 236 | 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); |
---|
233 | 241 | menu.add("-"); |
---|
234 | 242 | randomItem = menu.add(new MenuItem("Random")); |
---|
235 | 243 | randomItem.addActionListener(this); |
---|
.. | .. |
---|
247 | 255 | scriptNodeItem.addActionListener(this); |
---|
248 | 256 | cameraItem = menu.add(new MenuItem("Camera")); |
---|
249 | 257 | cameraItem.addActionListener(this); |
---|
250 | | - menu.add("-"); |
---|
| 258 | + |
---|
| 259 | + oe.menuBar.add(menu = new Menu("Object")); |
---|
251 | 260 | textureItem = menu.add(new MenuItem("Texture")); |
---|
252 | 261 | textureItem.addActionListener(this); |
---|
| 262 | + billboardItem = menu.add(new MenuItem("Billboard")); |
---|
| 263 | + billboardItem.addActionListener(this); |
---|
253 | 264 | csgItem = menu.add(new MenuItem("CSG")); |
---|
254 | 265 | csgItem.addActionListener(this); |
---|
255 | 266 | shadowXItem = menu.add(new MenuItem("Shadow X")); |
---|
.. | .. |
---|
267 | 278 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
268 | 279 | pointflowItem.addActionListener(this); |
---|
269 | 280 | menu.add("-"); |
---|
270 | | - transformgeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
271 | | - transformgeometryItem.addActionListener(this); |
---|
272 | 281 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
273 | 282 | resetTransformItem.addActionListener(this); |
---|
274 | 283 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
275 | 284 | 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); |
---|
278 | 287 | |
---|
279 | 288 | oe.menuBar.add(menu = new Menu("Geometry")); |
---|
280 | 289 | genUVItem = menu.add(new MenuItem("Generate UV")); |
---|
.. | .. |
---|
283 | 292 | genNormalsORGANItem.addActionListener(this); |
---|
284 | 293 | genNormalsCADItem = menu.add(new MenuItem("CAD Normals")); |
---|
285 | 294 | 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); |
---|
286 | 299 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
287 | 300 | stripifyItem.addActionListener(this); |
---|
288 | 301 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
292 | 305 | untrimItem = menu.add(new MenuItem("Untrim")); |
---|
293 | 306 | untrimItem.addActionListener(this); |
---|
294 | 307 | menu.add("-"); |
---|
295 | | - clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
296 | | - clearMaterialsItem.addActionListener(this); |
---|
297 | 308 | clearColorsItem = menu.add(new MenuItem("Clear AO")); |
---|
298 | 309 | clearColorsItem.addActionListener(this); |
---|
299 | 310 | reverseNormalsItem = menu.add(new MenuItem("Reverse Normals")); |
---|
.. | .. |
---|
310 | 321 | smoothMeshItem.addActionListener(this); |
---|
311 | 322 | clipMeshItem = menu.add(new MenuItem("Clip mesh")); |
---|
312 | 323 | clipMeshItem.addActionListener(this); |
---|
| 324 | + |
---|
| 325 | + oe.menuBar.add(menu = new Menu("Attributes")); |
---|
| 326 | + clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
| 327 | + clearMaterialsItem.addActionListener(this); |
---|
313 | 328 | menu.add("-"); |
---|
314 | 329 | liveleavesItem = menu.add(new MenuItem("Live Leaves")); |
---|
315 | 330 | liveleavesItem.addActionListener(this); |
---|
.. | .. |
---|
332 | 347 | flipVItem.addActionListener(this); |
---|
333 | 348 | unflipVItem = menu.add(new MenuItem("Unflip V")); |
---|
334 | 349 | unflipVItem.addActionListener(this); |
---|
335 | | - lowTexturesItem = menu.add(new MenuItem("Low Texture")); |
---|
| 350 | + lowTexturesItem = menu.add(new MenuItem("Low Texture (256)")); |
---|
336 | 351 | lowTexturesItem.addActionListener(this); |
---|
337 | | - normalTexturesItem = menu.add(new MenuItem("Normal Texture")); |
---|
| 352 | + normalTexturesItem = menu.add(new MenuItem("Normal Texture (512)")); |
---|
338 | 353 | normalTexturesItem.addActionListener(this); |
---|
339 | | - highTexturesItem = menu.add(new MenuItem("High Texture")); |
---|
| 354 | + highTexturesItem = menu.add(new MenuItem("High Texture (1024)")); |
---|
340 | 355 | highTexturesItem.addActionListener(this); |
---|
341 | | - veryhighTexturesItem = menu.add(new MenuItem("Very high Texture")); |
---|
| 356 | + veryhighTexturesItem = menu.add(new MenuItem("Very high Texture (2048)")); |
---|
342 | 357 | veryhighTexturesItem.addActionListener(this); |
---|
343 | | - maxTexturesItem = menu.add(new MenuItem("Max Texture")); |
---|
| 358 | + maxTexturesItem = menu.add(new MenuItem("Max Texture (4096)")); |
---|
344 | 359 | maxTexturesItem.addActionListener(this); |
---|
345 | | - panoTexturesItem = menu.add(new MenuItem("Panoramic Texture")); |
---|
| 360 | + panoTexturesItem = menu.add(new MenuItem("Panoramic Texture (8192)")); |
---|
346 | 361 | 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); |
---|
356 | 362 | |
---|
357 | 363 | oe.menuBar.add(menu = new Menu("Selection")); |
---|
358 | 364 | attachPigmentItem = menu.add(new MenuItem("Attach Pigment...")); |
---|
.. | .. |
---|
370 | 376 | sortbysizeItem.addActionListener(this); |
---|
371 | 377 | sortbynameItem = menu.add(new MenuItem("Sort by name")); |
---|
372 | 378 | 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 | + |
---|
373 | 389 | oe.menuBar.add(menu = new Menu("Insert")); |
---|
374 | 390 | 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")); |
---|
376 | 404 | buildToolsMenu(menu); |
---|
377 | 405 | } |
---|
378 | 406 | |
---|
.. | .. |
---|
406 | 434 | oe.radioPanel.add(dummyButton); |
---|
407 | 435 | oe.buttonGroup.add(dummyButton); |
---|
408 | 436 | */ |
---|
409 | | - aConstraints.gridy += 1; |
---|
410 | | - oe.aConstraints.gridwidth = 1; |
---|
411 | | - oe.aConstraints.gridx = 0; |
---|
| 437 | + //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
412 | 438 | |
---|
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"); |
---|
414 | 441 | liveCB.addItemListener(this); |
---|
415 | 442 | |
---|
416 | | - oe.aConstraints.gridx += 1; |
---|
417 | | - oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints); |
---|
418 | | - supportCB.addItemListener(this); |
---|
419 | | - |
---|
420 | | - // oe.aConstraints.gridx += 1; |
---|
421 | | - // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints); |
---|
422 | | - // localCB.addItemListener(this); |
---|
423 | | - |
---|
424 | | - oe.aConstraints.gridx += 1; |
---|
425 | | - oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints); |
---|
426 | | - crowdCB.addItemListener(this); |
---|
427 | | - |
---|
428 | | - oe.aConstraints.gridx += 1; |
---|
429 | | - oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints); |
---|
430 | | - smoothCB.addItemListener(this); |
---|
431 | | - |
---|
432 | | - oe.aConstraints.gridx += 1; |
---|
433 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints); |
---|
434 | | - fastCB.addItemListener(this); |
---|
435 | | - oe.aConstraints.gridx += 1; |
---|
436 | | - oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints); |
---|
437 | | - slowCB.addItemListener(this); |
---|
438 | | - oe.aConstraints.gridx += 1; |
---|
439 | | - oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints); |
---|
440 | | - boxCB.addItemListener(this); |
---|
441 | | - |
---|
442 | | -// oe.aConstraints.gridx += 1; |
---|
443 | | -// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints); |
---|
444 | | -// speakerMocapCB.addItemListener(this); |
---|
445 | | - |
---|
446 | | - if (false) |
---|
447 | | - { |
---|
448 | | - // handled in scripts |
---|
449 | | - oe.aConstraints.gridx += 1; |
---|
450 | | - oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints); |
---|
451 | | - speakerCameraCB.addItemListener(this); |
---|
452 | | - |
---|
453 | | - oe.aConstraints.gridx += 1; |
---|
454 | | - oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints); |
---|
455 | | - speakerFocusCB.addItemListener(this); |
---|
456 | | - |
---|
457 | | - oe.aConstraints.gridx += 1; |
---|
458 | | - oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints); |
---|
459 | | - smoothfocusCB.addItemListener(this); |
---|
460 | | - } |
---|
461 | | - |
---|
462 | | -//oe.aConstraints.gridx += 1; |
---|
463 | | -//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints); |
---|
464 | | -// debugCB.addItemListener(this); |
---|
465 | | - |
---|
466 | | - oe.aConstraints.gridx += 1; |
---|
467 | | - oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints); |
---|
468 | | - oeilCB.addItemListener(this); |
---|
469 | | - |
---|
470 | | - oe.aConstraints.gridx += 1; |
---|
471 | | - oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints); |
---|
472 | | - lookAtCB.addItemListener(this); |
---|
473 | | - |
---|
474 | | - oe.aConstraints.gridx += 1; |
---|
475 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints); |
---|
| 443 | + oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 444 | + trackCB.setToolTipText("Enable tracking"); |
---|
476 | 445 | trackCB.addItemListener(this); |
---|
477 | 446 | |
---|
478 | | - oe.aConstraints.gridx += 1; |
---|
479 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 447 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 448 | + screenfitButton.setToolTipText("Screen fit"); |
---|
480 | 449 | screenfitButton.addActionListener(this); |
---|
481 | | - oe.aConstraints.gridx += 1; |
---|
| 450 | + |
---|
482 | 451 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
483 | 452 | // screenfitpointButton.addActionListener(this); |
---|
484 | 453 | // oe.aConstraints.gridx += 1; |
---|
485 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
| 454 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
486 | 455 | snapobjectButton.addActionListener(this); |
---|
| 456 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
487 | 457 | oe.aConstraints.gridx += 1; |
---|
488 | 458 | |
---|
489 | 459 | //aConstraints.gridx = 0; |
---|
.. | .. |
---|
491 | 461 | oe.aConstraints.weighty = 0; |
---|
492 | 462 | oe.aConstraints.gridwidth = 1; |
---|
493 | 463 | |
---|
494 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
| 464 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 465 | + flashSelectionButton.setToolTipText("Show selection"); |
---|
495 | 466 | flashSelectionButton.addActionListener(this); |
---|
496 | | - oe.aConstraints.gridx += 1; |
---|
497 | | - oe.aConstraints.weighty = 0; |
---|
498 | | - oe.aConstraints.gridwidth = 1; |
---|
499 | 467 | |
---|
500 | | - // |
---|
501 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 468 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 469 | + |
---|
| 470 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 471 | + twoButton.setToolTipText("Show center view only"); |
---|
502 | 472 | twoButton.addActionListener(this); |
---|
503 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 473 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
504 | 474 | fourButton.addActionListener(this); |
---|
505 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 475 | + fourButton.setToolTipText("Show left panel only"); |
---|
| 476 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 477 | + sixButton.setToolTipText("2-column layout left"); |
---|
506 | 478 | sixButton.addActionListener(this); |
---|
507 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 479 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 480 | + threeButton.setToolTipText("2-column layout right"); |
---|
508 | 481 | threeButton.addActionListener(this); |
---|
509 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 482 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 483 | + sevenButton.setToolTipText("3-column layout"); |
---|
510 | 484 | sevenButton.addActionListener(this); |
---|
511 | 485 | // |
---|
512 | 486 | |
---|
513 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints); |
---|
| 487 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 488 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
514 | 489 | rootButton.addActionListener(this); |
---|
515 | | - oe.aConstraints.gridx += 1; |
---|
516 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 490 | + |
---|
| 491 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 492 | + closeButton.setToolTipText("Close tab"); |
---|
517 | 493 | closeButton.addActionListener(this); |
---|
518 | 494 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
519 | 495 | //clearButton.addActionListener(this); |
---|
520 | | - oe.aConstraints.gridx += 1; |
---|
521 | 496 | |
---|
522 | | - oe.aConstraints.gridx = 1; // |
---|
523 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
| 497 | + cGridBag commandsPanel = new cGridBag(); |
---|
| 498 | + |
---|
| 499 | + commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 500 | + editButton.setToolTipText("Edit selection"); |
---|
524 | 501 | editButton.addActionListener(this); |
---|
525 | | - oe.aConstraints.gridx += 1; |
---|
526 | | - oe.aConstraints.weighty = 0; |
---|
527 | | - oe.aConstraints.gridwidth = 1; |
---|
528 | 502 | |
---|
529 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 503 | + commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 504 | + uneditButton.setToolTipText("Unedit selection"); |
---|
530 | 505 | uneditButton.addActionListener(this); |
---|
531 | 506 | |
---|
532 | | - oe.aConstraints.gridx += 1; |
---|
533 | | - oe.aConstraints.weighty = 0; |
---|
534 | | - oe.aConstraints.gridwidth = 1; |
---|
535 | | - |
---|
536 | | - oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints); |
---|
| 507 | + commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 508 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
537 | 509 | clearPanelButton.addActionListener(this); |
---|
538 | 510 | |
---|
539 | | - oe.aConstraints.gridx += 1; |
---|
540 | | - oe.aConstraints.weighty = 0; |
---|
541 | | - oe.aConstraints.gridwidth = 1; |
---|
542 | | - |
---|
543 | | - oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints); |
---|
| 511 | + commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 512 | + allParamsButton.setToolTipText("All params??"); |
---|
544 | 513 | allParamsButton.addActionListener(this); |
---|
545 | 514 | |
---|
546 | | - oe.aConstraints.gridx += 1; |
---|
547 | | - oe.aConstraints.weighty = 0; |
---|
548 | | - oe.aConstraints.gridwidth = 1; |
---|
549 | | - |
---|
550 | | - oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints); |
---|
| 515 | + commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 516 | + unselectButton.setToolTipText("Unselect"); |
---|
551 | 517 | unselectButton.addActionListener(this); |
---|
552 | 518 | |
---|
| 519 | + commandsPanel.preferredHeight = 1; |
---|
| 520 | + |
---|
| 521 | + oe.treePanel.add(commandsPanel); |
---|
| 522 | + oe.treePanel.Return(); |
---|
| 523 | + |
---|
553 | 524 | // oe.aConstraints.gridx += 1; |
---|
554 | 525 | // oe.aConstraints.weighty = 0; |
---|
555 | 526 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
561 | 532 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
562 | 533 | // gcButton.addActionListener(this); |
---|
563 | 534 | |
---|
564 | | - oe.aConstraints.gridx = 0; |
---|
565 | | - oe.aConstraints.gridy += 1; |
---|
566 | | - |
---|
567 | | - //ctrlPanel.add(objList = new List(5, true)); |
---|
568 | | - oe.aConstraints.gridwidth = 100; |
---|
569 | | - // oe.aConstraints.gridheight = 100; |
---|
570 | | - oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL; |
---|
571 | | - oe.aConstraints.gridheight = 1; |
---|
572 | | - oe.aConstraints.weighty = 0.5; |
---|
573 | | - oe.aConstraints.gridx = 0; |
---|
574 | | - JScrollPane jSP; |
---|
| 535 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 536 | + |
---|
| 537 | + JScrollPane jSP; |
---|
575 | 538 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
576 | | - oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints); |
---|
| 539 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
577 | 540 | ResetModel(); |
---|
578 | | - oe.aConstraints.weighty = 0.5; |
---|
579 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
580 | | - oe.aConstraints.gridy += 1; |
---|
581 | | - oe.aConstraints.gridwidth = 1; |
---|
| 541 | + |
---|
| 542 | + oe.treePanel.add(jSPPanel); |
---|
| 543 | + oe.treePanel.Return(); |
---|
582 | 544 | |
---|
583 | | - oe.aConstraints.weighty = 0; |
---|
584 | | - oe.aConstraints.gridwidth = 2; |
---|
585 | | - |
---|
586 | | - oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints); |
---|
| 545 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 546 | + |
---|
| 547 | + copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 548 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
587 | 549 | colorCB.addItemListener(this); |
---|
588 | | - oe.aConstraints.gridx += 2; |
---|
589 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
| 550 | + |
---|
| 551 | + copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 552 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
590 | 553 | materialCB.addItemListener(this); |
---|
591 | | - oe.aConstraints.gridx += 2; |
---|
592 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
| 554 | + |
---|
| 555 | + copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 556 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
593 | 557 | textureCB.addItemListener(this); |
---|
594 | 558 | |
---|
595 | | - oe.aConstraints.gridx = 0; |
---|
596 | | - oe.aConstraints.gridy += 1; |
---|
| 559 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 560 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 561 | + oe.treePanel.Return(); |
---|
597 | 562 | |
---|
| 563 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 564 | +// mainPanel.setResizeWeight(0.5); |
---|
| 565 | + |
---|
598 | 566 | //jList.addListSelectionListener(this); |
---|
599 | 567 | oe.jTree.addTreeSelectionListener(this); |
---|
600 | 568 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
616 | 584 | radio.layout = sevenButton; |
---|
617 | 585 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
618 | 586 | } |
---|
| 587 | + |
---|
| 588 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 589 | + { |
---|
| 590 | + //constraints.gridx = 0; |
---|
| 591 | + //constraints.gridy = 0; |
---|
| 592 | + panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 593 | + fastCB.setToolTipText("Fast mode"); |
---|
| 594 | + fastCB.addItemListener(this); |
---|
| 595 | + //constraints.gridy += 1; |
---|
| 596 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 597 | + supportCB.setToolTipText("Enabled rigging"); |
---|
| 598 | + supportCB.addItemListener(this); |
---|
| 599 | + |
---|
| 600 | + // constraints.gridy += 1; |
---|
| 601 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 602 | + // localCB.addItemListener(this); |
---|
| 603 | + |
---|
| 604 | + //constraints.gridy += 1; |
---|
| 605 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 606 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 607 | + crowdCB.addItemListener(this); |
---|
| 608 | + |
---|
| 609 | + //constraints.gridy += 1; |
---|
| 610 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 611 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 612 | + smoothCB.addItemListener(this); |
---|
| 613 | + |
---|
| 614 | + //constraints.gridy += 1; |
---|
| 615 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 616 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 617 | + slowCB.addItemListener(this); |
---|
| 618 | + //constraints.gridy += 1; |
---|
| 619 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 620 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 621 | + boxCB.addItemListener(this); |
---|
| 622 | + //constraints.gridy += 1; |
---|
| 623 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 624 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 625 | + zoomBoxCB.addItemListener(this); |
---|
| 626 | + |
---|
| 627 | +// constraints.gridy += 1; |
---|
| 628 | +// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
| 629 | +// speakerMocapCB.addItemListener(this); |
---|
| 630 | + |
---|
| 631 | + if (false) |
---|
| 632 | + { |
---|
| 633 | + // handled in scripts |
---|
| 634 | + //constraints.gridy += 1; |
---|
| 635 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
| 636 | + speakerCameraCB.addItemListener(this); |
---|
| 637 | + |
---|
| 638 | + //constraints.gridy += 1; |
---|
| 639 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
| 640 | + speakerFocusCB.addItemListener(this); |
---|
| 641 | + |
---|
| 642 | + //constraints.gridy += 1; |
---|
| 643 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 644 | + smoothfocusCB.addItemListener(this); |
---|
| 645 | + } |
---|
| 646 | + |
---|
| 647 | +//constraints.gridx += 1; |
---|
| 648 | +//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
| 649 | +// debugCB.addItemListener(this); |
---|
| 650 | + |
---|
| 651 | + //constraints.gridy += 1; |
---|
| 652 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 653 | + oeilCB.addItemListener(this); |
---|
| 654 | + |
---|
| 655 | + //constraints.gridy += 1; |
---|
| 656 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
| 657 | + lookAtCB.setToolTipText("Look-at target"); |
---|
| 658 | + lookAtCB.addItemListener(this); |
---|
| 659 | + |
---|
| 660 | + cGridBag fill = new cGridBag(); |
---|
| 661 | + |
---|
| 662 | + fill.preferredHeight = 200; |
---|
| 663 | + |
---|
| 664 | + panel.add(fill); |
---|
| 665 | + |
---|
| 666 | + } |
---|
619 | 667 | |
---|
620 | 668 | void EditObject(Object3D obj) |
---|
621 | 669 | { |
---|
622 | | - cRadio dummyButton = new cRadio(obj.name); |
---|
623 | | - dummyButton.SetObject(obj); |
---|
624 | | - dummyButton.layout = sevenButton; |
---|
625 | | - dummyButton.SetCamera(cameraView.renderCamera, false); |
---|
626 | | - dummyButton.addActionListener(this); |
---|
627 | | - radioPanel.add(dummyButton); |
---|
628 | | - buttonGroup.add(dummyButton); |
---|
629 | | - dummyButton.doClick(); |
---|
| 670 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 671 | + radioButton.SetObject(obj); |
---|
| 672 | + radioButton.layout = sevenButton; |
---|
| 673 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 674 | + radioButton.addActionListener(this); |
---|
| 675 | + radioPanel.add(radioButton); |
---|
| 676 | + buttonGroup.add(radioButton); |
---|
| 677 | + radioButton.doClick(); |
---|
630 | 678 | } |
---|
631 | 679 | void SetupViews(ObjEditor oe) |
---|
632 | 680 | { |
---|
.. | .. |
---|
646 | 694 | JCheckBox fastCB; |
---|
647 | 695 | JCheckBox slowCB; |
---|
648 | 696 | JCheckBox boxCB; |
---|
| 697 | + JCheckBox zoomBoxCB; |
---|
649 | 698 | JCheckBox trackCB; |
---|
650 | 699 | JCheckBox smoothfocusCB; |
---|
651 | 700 | // JCheckBox speakerMocapCB; |
---|
.. | .. |
---|
688 | 737 | dropAttributes |= Object3D.TEXTURE; |
---|
689 | 738 | else |
---|
690 | 739 | dropAttributes &= ~Object3D.TEXTURE; |
---|
691 | | - } |
---|
692 | | - else if(e.getSource() == liveCB) |
---|
| 740 | + } else if(e.getSource() == liveCB) |
---|
693 | 741 | { |
---|
694 | 742 | cameraView.ToggleLive(); |
---|
695 | 743 | } |
---|
.. | .. |
---|
726 | 774 | Recompile(); |
---|
727 | 775 | cameraView.repaint(); |
---|
728 | 776 | // refreshContents(); |
---|
| 777 | + } |
---|
| 778 | + else if(e.getSource() == zoomBoxCB) |
---|
| 779 | + { |
---|
| 780 | + cameraView.ToggleZoomBoxMode(); |
---|
729 | 781 | } |
---|
730 | 782 | else if(e.getSource() == smoothfocusCB) |
---|
731 | 783 | { |
---|
.. | .. |
---|
1002 | 1054 | |
---|
1003 | 1055 | void buildCreateMenu(Menu menu) |
---|
1004 | 1056 | { |
---|
| 1057 | + //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
| 1058 | + //heightFieldItem.addActionListener(this); |
---|
1005 | 1059 | gridItem = menu.add(new MenuItem("Grid")); |
---|
1006 | 1060 | gridItem.addActionListener(this); |
---|
1007 | 1061 | rectoidItem = menu.add(new MenuItem("Box")); |
---|
.. | .. |
---|
1014 | 1068 | torusItem.addActionListener(this); |
---|
1015 | 1069 | superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1016 | 1070 | superItem.addActionListener(this); |
---|
| 1071 | + kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
| 1072 | + kleinItem.addActionListener(this); |
---|
1017 | 1073 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1018 | 1074 | particleItem.addActionListener(this); |
---|
1019 | 1075 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1048 | 1104 | doubleItem.addActionListener(this); |
---|
1049 | 1105 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1050 | 1106 | 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); |
---|
1060 | 1107 | } |
---|
1061 | 1108 | |
---|
1062 | 1109 | void buildToolsMenu(Menu menu) |
---|
.. | .. |
---|
1068 | 1115 | menu.add("-"); |
---|
1069 | 1116 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1070 | 1117 | parseverticesItem.addActionListener(this); |
---|
| 1118 | + textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
| 1119 | + textureFieldItem.addActionListener(this); |
---|
1071 | 1120 | alignItem = menu.add(new MenuItem("Align")); |
---|
1072 | 1121 | alignItem.addActionListener(this); |
---|
1073 | 1122 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
.. | .. |
---|
1094 | 1143 | resetParentItem.addActionListener(this); |
---|
1095 | 1144 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1096 | 1145 | repairParentItem.addActionListener(this); |
---|
| 1146 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1147 | + repairShadowItem.addActionListener(this); |
---|
1097 | 1148 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1098 | 1149 | invariantsItem.addActionListener(this); |
---|
1099 | 1150 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1429 | 1480 | |
---|
1430 | 1481 | void Overwrite(int mask) |
---|
1431 | 1482 | { |
---|
1432 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1483 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1433 | 1484 | { |
---|
1434 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1485 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
1435 | 1486 | |
---|
1436 | 1487 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1437 | 1488 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1454 | 1505 | // |
---|
1455 | 1506 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1456 | 1507 | { |
---|
| 1508 | + Object source = event.getSource(); |
---|
1457 | 1509 | /* |
---|
1458 | 1510 | if (event.getSource() == nameField) |
---|
1459 | 1511 | { |
---|
.. | .. |
---|
1465 | 1517 | } |
---|
1466 | 1518 | else |
---|
1467 | 1519 | */ |
---|
1468 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1520 | + if (source == lookAtItem || source == lookFromItem) |
---|
1469 | 1521 | { |
---|
1470 | 1522 | ScreenFit(); |
---|
1471 | 1523 | } else |
---|
1472 | | - if (event.getSource() == switchItem) |
---|
| 1524 | + if (source == switchItem) |
---|
1473 | 1525 | { |
---|
1474 | 1526 | cVector v1 = new cVector(); |
---|
1475 | 1527 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1478 | 1530 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1479 | 1531 | objEditor.cameraView.repaint(); |
---|
1480 | 1532 | } else |
---|
1481 | | - if (event.getSource() == rectoidItem) |
---|
| 1533 | + if (source == rectoidItem) |
---|
1482 | 1534 | { |
---|
1483 | 1535 | makeSomething(new Box()); |
---|
1484 | 1536 | } else |
---|
1485 | | - if (event.getSource() == particleItem) |
---|
| 1537 | + if (source == particleItem) |
---|
1486 | 1538 | { |
---|
1487 | 1539 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1488 | 1540 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1503 | 1555 | applyExample(particleGeom, "SMOKE"); |
---|
1504 | 1556 | makeSomething(particleGeom); |
---|
1505 | 1557 | } else |
---|
1506 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1558 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1507 | 1559 | { |
---|
1508 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1560 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1509 | 1561 | |
---|
1510 | 1562 | ragdoll.toParent = LA.newMatrix(); |
---|
1511 | 1563 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1521 | 1573 | makeSomething(ragdoll); |
---|
1522 | 1574 | //makeSomething(new VehicleDemo()); |
---|
1523 | 1575 | } else |
---|
1524 | | - if (event.getSource() == gridItem) |
---|
| 1576 | + /* |
---|
| 1577 | + */ |
---|
| 1578 | + if (source == heightFieldItem) |
---|
| 1579 | + { |
---|
| 1580 | + Object3D obj = new Object3D(); |
---|
| 1581 | + |
---|
| 1582 | + obj.CreateMaterial(); |
---|
| 1583 | + obj.bRep = new BoundaryRep(); |
---|
| 1584 | + |
---|
| 1585 | + obj.bRep.CreateMesh(new iHeightField() |
---|
| 1586 | + { |
---|
| 1587 | + public double f(double x, double y) |
---|
| 1588 | + { |
---|
| 1589 | + // The Mandelbrot set is represented by coloring |
---|
| 1590 | + // each point (x,y) according to the number of |
---|
| 1591 | + // iterations it takes before the while loop in |
---|
| 1592 | + // this method ends. For points that are actually |
---|
| 1593 | + // in the Mandelbrot set, or very close to it, the |
---|
| 1594 | + // count will reach the maximum value, 80. These |
---|
| 1595 | + // points will be colored purple. All other colors |
---|
| 1596 | + // represent points that are definitely NOT in the set. |
---|
| 1597 | + x -= 600; |
---|
| 1598 | + y -= 500; |
---|
| 1599 | + x /= 200; |
---|
| 1600 | + y /= 200; |
---|
| 1601 | + int count = 0; |
---|
| 1602 | + double zx = x; |
---|
| 1603 | + double zy = y; |
---|
| 1604 | + while (count < 80 && Math.abs(x) < 100 && Math.abs(zy) < 100) { |
---|
| 1605 | + double new_zx = zx*zx - zy*zy + x; |
---|
| 1606 | + zy = 2*zx*zy + y; |
---|
| 1607 | + zx = new_zx; |
---|
| 1608 | + count++; |
---|
| 1609 | + } |
---|
| 1610 | + return count; // Math.sqrt(count); |
---|
| 1611 | + } |
---|
| 1612 | + }, 1000,1000); |
---|
| 1613 | + |
---|
| 1614 | + makeSomething(obj); |
---|
| 1615 | + } else |
---|
| 1616 | + if (source == gridItem) |
---|
1525 | 1617 | { |
---|
1526 | 1618 | makeSomething(new Grid()); |
---|
1527 | 1619 | } else |
---|
1528 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1620 | + if (source == ellipsoidItem) |
---|
1529 | 1621 | { |
---|
1530 | 1622 | makeSomething(new Sphere()); |
---|
1531 | 1623 | } else |
---|
1532 | | - if (event.getSource() == coneItem) |
---|
| 1624 | + if (source == coneItem) |
---|
1533 | 1625 | { |
---|
1534 | 1626 | makeSomething(new Cone()); |
---|
1535 | 1627 | } else |
---|
1536 | | - if (event.getSource() == torusItem) |
---|
| 1628 | + if (source == torusItem) |
---|
1537 | 1629 | { |
---|
1538 | 1630 | makeSomething(new Torus()); |
---|
1539 | 1631 | } else |
---|
1540 | | - if (event.getSource() == superItem) |
---|
| 1632 | + if (source == superItem) |
---|
1541 | 1633 | { |
---|
1542 | 1634 | makeSomething(new Superellipsoid()); |
---|
1543 | 1635 | } else |
---|
1544 | | - if (event.getSource() == blobItem) |
---|
| 1636 | + if (source == kleinItem) |
---|
| 1637 | + { |
---|
| 1638 | + makeSomething(new Klein()); |
---|
| 1639 | + } else |
---|
| 1640 | + if (source == blobItem) |
---|
1545 | 1641 | { |
---|
1546 | 1642 | Blob blob = new Blob(); |
---|
1547 | 1643 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1549 | 1645 | //blob.retile(); |
---|
1550 | 1646 | makeSomething(blob); |
---|
1551 | 1647 | } else |
---|
1552 | | - if (event.getSource() == latheItem) |
---|
| 1648 | + if (source == latheItem) |
---|
1553 | 1649 | { |
---|
1554 | 1650 | makeSomething(new Lathe()); |
---|
1555 | 1651 | } else |
---|
1556 | | - if (event.getSource() == bezierItem) |
---|
| 1652 | + if (source == bezierItem) |
---|
1557 | 1653 | { |
---|
1558 | 1654 | makeSomething(new BezierSurface()); |
---|
1559 | 1655 | } else |
---|
1560 | | - if (event.getSource() == checkerItem) |
---|
| 1656 | + if (source == checkerItem) |
---|
1561 | 1657 | { |
---|
1562 | 1658 | /* |
---|
1563 | 1659 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1570 | 1666 | LA.matConcat(obj.toParent, cameraView.renderCamera.fromParent, obj.toParent); |
---|
1571 | 1667 | LA.matInvert(obj.toParent, obj.fromParent); |
---|
1572 | 1668 | */ |
---|
1573 | | - makeSomething(new CheckerIG()); |
---|
| 1669 | + makeSomething(new Checker()); |
---|
1574 | 1670 | } else |
---|
1575 | | - if (event.getSource() == meshItem) |
---|
| 1671 | + if (source == meshItem) |
---|
1576 | 1672 | { |
---|
1577 | 1673 | Object3D itemtomake = new Object3D(); |
---|
1578 | 1674 | Object3D child; |
---|
.. | .. |
---|
1593 | 1689 | makeSomething(child); |
---|
1594 | 1690 | } |
---|
1595 | 1691 | } else |
---|
1596 | | - if (event.getSource() == springItem) |
---|
| 1692 | + if (source == springItem) |
---|
1597 | 1693 | { |
---|
1598 | 1694 | cSpring s = new cSpring(); |
---|
1599 | 1695 | s.setup(); |
---|
1600 | 1696 | makeSomething(s); |
---|
1601 | 1697 | } else |
---|
1602 | | - if (event.getSource() == flagItem) |
---|
| 1698 | + if (source == flagItem) |
---|
1603 | 1699 | { |
---|
1604 | 1700 | cSpring s = new cFlag(); |
---|
1605 | 1701 | s.setup(); |
---|
1606 | 1702 | makeSomething(s); |
---|
1607 | 1703 | } else |
---|
1608 | | - if (event.getSource() == lightItem) |
---|
| 1704 | + if (source == lightItem) |
---|
1609 | 1705 | { |
---|
1610 | 1706 | makeSomething(new Light()); |
---|
1611 | 1707 | } else |
---|
1612 | | - if (event.getSource() == csgItem) |
---|
| 1708 | + if (source == csgItem) |
---|
1613 | 1709 | { |
---|
1614 | 1710 | group(new CSG()); |
---|
1615 | 1711 | } else |
---|
1616 | | - if (event.getSource() == templateItem) |
---|
| 1712 | + if (source == templateItem) |
---|
1617 | 1713 | { |
---|
1618 | 1714 | group(new cTemplate()); |
---|
1619 | 1715 | } else |
---|
1620 | | - if (event.getSource() == attributeItem) |
---|
| 1716 | + if (source == attributeItem) |
---|
1621 | 1717 | { |
---|
1622 | 1718 | makeSomething(new Attribute()); |
---|
1623 | 1719 | } else |
---|
1624 | | - if (event.getSource() == pointflowItem) |
---|
| 1720 | + if (source == pointflowItem) |
---|
1625 | 1721 | { |
---|
1626 | 1722 | makeSomething(new PointFlow()); |
---|
1627 | 1723 | } else |
---|
.. | .. |
---|
1633 | 1729 | } else |
---|
1634 | 1730 | */ |
---|
1635 | 1731 | |
---|
1636 | | - if (event.getSource() == superLoopItem) |
---|
| 1732 | + if (source == superLoopItem) |
---|
1637 | 1733 | { |
---|
1638 | 1734 | Composite g = new cGroup(); |
---|
1639 | 1735 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1655 | 1751 | |
---|
1656 | 1752 | group(g); |
---|
1657 | 1753 | } else |
---|
1658 | | - if (event.getSource() == loopItem) |
---|
| 1754 | + if (source == loopItem) |
---|
1659 | 1755 | { |
---|
1660 | 1756 | Composite csg = new GroupLeaf(); |
---|
1661 | 1757 | csg.count = 5; |
---|
.. | .. |
---|
1664 | 1760 | csg.addChild(child); |
---|
1665 | 1761 | child.addChild(csg); |
---|
1666 | 1762 | } else |
---|
1667 | | - if (event.getSource() == doubleItem) |
---|
| 1763 | + if (source == doubleItem) |
---|
1668 | 1764 | { |
---|
1669 | 1765 | Composite csg = new GroupLeaf(); |
---|
1670 | 1766 | csg.count = 5; |
---|
.. | .. |
---|
1676 | 1772 | csg.addChild(child); |
---|
1677 | 1773 | child.addChild(csg); |
---|
1678 | 1774 | } else |
---|
1679 | | - if (event.getSource() == tripleItem) |
---|
| 1775 | + if (source == tripleItem) |
---|
1680 | 1776 | { |
---|
1681 | 1777 | Composite csg = new GroupLeaf(); |
---|
1682 | 1778 | csg.count = 4; |
---|
.. | .. |
---|
1692 | 1788 | child.addChild(csg); |
---|
1693 | 1789 | } else |
---|
1694 | 1790 | |
---|
1695 | | - if (event.getSource() == importGFDItem) |
---|
| 1791 | + if (source == importGFDItem) |
---|
1696 | 1792 | { |
---|
1697 | 1793 | ImportGFD(); |
---|
1698 | 1794 | } else |
---|
1699 | | - if (event.getSource() == importVRMLX3DItem) |
---|
| 1795 | + if (source == importVRMLX3DItem) |
---|
1700 | 1796 | { |
---|
1701 | 1797 | ImportVRMLX3D(); |
---|
1702 | 1798 | } else |
---|
1703 | | - if (event.getSource() == import3DSItem) |
---|
| 1799 | + if (source == import3DSItem) |
---|
1704 | 1800 | { |
---|
1705 | 1801 | objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1706 | 1802 | } else |
---|
1707 | | - if (event.getSource() == importOBJItem) |
---|
| 1803 | + if (source == importOBJItem) |
---|
1708 | 1804 | { |
---|
1709 | 1805 | objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1710 | 1806 | } else |
---|
1711 | | - if (event.getSource() == computeAOItem) |
---|
| 1807 | + if (source == computeAOItem) |
---|
1712 | 1808 | { |
---|
1713 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1714 | | - CameraPane.theRenderer.repaint(); |
---|
| 1809 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 1810 | + Globals.theRenderer.repaint(); |
---|
1715 | 1811 | } else |
---|
1716 | | - if (event.getSource() == recompileItem) |
---|
| 1812 | + if (source == recompileItem) |
---|
1717 | 1813 | { |
---|
1718 | 1814 | Recompile(); |
---|
1719 | 1815 | refreshContents(); |
---|
1720 | 1816 | } else |
---|
1721 | | - if (event.getSource() == editScriptItem) |
---|
| 1817 | + if (source == editScriptItem) |
---|
1722 | 1818 | { |
---|
1723 | 1819 | OpenDialog(); |
---|
1724 | 1820 | refreshContents(); |
---|
1725 | 1821 | } else |
---|
1726 | | - if (event.getSource() == invariantsItem) |
---|
| 1822 | + if (source == invariantsItem) |
---|
1727 | 1823 | { |
---|
1728 | 1824 | System.out.println("Invariants:"); |
---|
1729 | | - GraphreeD.theApplet3D.universe.invariants(); |
---|
| 1825 | + GrafreeD.grafreeD.universe.invariants(); |
---|
1730 | 1826 | } else |
---|
1731 | | - if (event.getSource() == memoryItem) |
---|
| 1827 | + if (source == memoryItem) |
---|
1732 | 1828 | { |
---|
1733 | 1829 | //System.out.println("Invariants:"); |
---|
1734 | 1830 | PrintMemory(); |
---|
1735 | 1831 | } else |
---|
1736 | | - if (event.getSource() == pathItem) |
---|
| 1832 | + if (source == pathItem) |
---|
1737 | 1833 | { |
---|
1738 | 1834 | PrintPath(); |
---|
1739 | 1835 | } else |
---|
1740 | | - if (event.getSource() == analyzeItem) |
---|
| 1836 | + if (source == analyzeItem) |
---|
1741 | 1837 | { |
---|
1742 | 1838 | AnalyzeObject(); |
---|
1743 | 1839 | } else |
---|
1744 | | - if (event.getSource() == dumpItem) |
---|
| 1840 | + if (source == dumpItem) |
---|
1745 | 1841 | { |
---|
1746 | 1842 | DumpObject(); |
---|
1747 | 1843 | } else |
---|
1748 | | - if (event.getSource() == screenfitButton) |
---|
| 1844 | + if (source == screenfitButton) |
---|
1749 | 1845 | { |
---|
1750 | 1846 | //Reload(lastConverter, lastFilename, true); |
---|
1751 | 1847 | ScreenFit(); |
---|
1752 | 1848 | } else |
---|
1753 | | - if (event.getSource() == screenfitpointButton) |
---|
| 1849 | + if (source == screenfitpointButton) |
---|
1754 | 1850 | { |
---|
1755 | 1851 | //Reload(lastConverter, lastFilename, true); |
---|
1756 | 1852 | ScreenFitPoint(); |
---|
1757 | 1853 | } else |
---|
1758 | | - if (event.getSource() == snapobjectButton) |
---|
| 1854 | + if (source == snapobjectButton) |
---|
1759 | 1855 | { |
---|
1760 | 1856 | //Reload(lastConverter, lastFilename, true); |
---|
1761 | 1857 | SnapObject(); |
---|
.. | .. |
---|
1766 | 1862 | // Recompile(); |
---|
1767 | 1863 | // refreshContents(); |
---|
1768 | 1864 | // } else |
---|
1769 | | - if (event.getSource() == gcButton) |
---|
| 1865 | + if (source == gcButton) |
---|
1770 | 1866 | { |
---|
1771 | 1867 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1772 | 1868 | System.gc(); |
---|
1773 | 1869 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1774 | 1870 | } else |
---|
1775 | | - if (event.getSource() == editLeafItem) |
---|
| 1871 | + if (source == editLeafItem) |
---|
1776 | 1872 | { |
---|
1777 | 1873 | Object3D obj; |
---|
1778 | 1874 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1786 | 1882 | } |
---|
1787 | 1883 | refreshContents(true); |
---|
1788 | 1884 | } else |
---|
1789 | | - if (event.getSource() == openWindowItem) |
---|
| 1885 | + if (source == openWindowItem) |
---|
1790 | 1886 | { |
---|
1791 | 1887 | EditSelection(true); |
---|
1792 | 1888 | } else |
---|
1793 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 1889 | + if (source == cutItem || source == clearButton) |
---|
1794 | 1890 | { |
---|
1795 | 1891 | loadClipboard(true); |
---|
1796 | 1892 | } else |
---|
1797 | | - if (event.getSource() == duplicateItem) |
---|
| 1893 | + if (source == duplicateItem) |
---|
1798 | 1894 | { |
---|
1799 | | - Object3D keep = GraphreeD.clipboard; |
---|
| 1895 | + Object3D keep = GrafreeD.clipboard; |
---|
1800 | 1896 | loadClipboard(false); |
---|
1801 | 1897 | paste(false); |
---|
1802 | | - GraphreeD.clipboard = keep; |
---|
| 1898 | + GrafreeD.clipboard = keep; |
---|
1803 | 1899 | } else |
---|
1804 | | - if (event.getSource() == cloneItem) |
---|
| 1900 | + if (source == cloneItem) |
---|
1805 | 1901 | { |
---|
1806 | 1902 | CloneSelection(false); |
---|
1807 | 1903 | } else |
---|
1808 | | - if (event.getSource() == cloneSupportItem) |
---|
| 1904 | + if (source == cloneSupportItem) |
---|
1809 | 1905 | { |
---|
1810 | 1906 | CloneSelection(true); |
---|
1811 | 1907 | } else |
---|
1812 | | - if (event.getSource() == copyItem) |
---|
| 1908 | + if (source == copyItem) |
---|
1813 | 1909 | { |
---|
1814 | 1910 | loadClipboard(false); |
---|
1815 | 1911 | } else |
---|
1816 | | - if (event.getSource() == pasteItem) |
---|
| 1912 | + if (source == pasteItem) |
---|
1817 | 1913 | { |
---|
1818 | 1914 | paste(false); |
---|
1819 | 1915 | } else |
---|
1820 | | - if (event.getSource() == pasteLinkItem) |
---|
| 1916 | + if (source == pasteLinkItem) |
---|
1821 | 1917 | { |
---|
1822 | 1918 | pasteInto(false); |
---|
1823 | 1919 | } else |
---|
1824 | | - if (event.getSource() == pasteCloneItem) |
---|
| 1920 | + if (source == pasteCloneItem) |
---|
1825 | 1921 | { |
---|
1826 | 1922 | pasteInto(true); |
---|
1827 | 1923 | } else |
---|
1828 | | - if (event.getSource() == pasteExpandItem) |
---|
| 1924 | + if (source == pasteExpandItem) |
---|
1829 | 1925 | { |
---|
1830 | 1926 | paste(true); |
---|
1831 | 1927 | } else |
---|
1832 | | - if (event.getSource() == synchronizeItem) |
---|
| 1928 | + if (source == synchronizeItem) |
---|
1833 | 1929 | { |
---|
1834 | 1930 | Overwrite(Object3D.TRANSFORM); |
---|
1835 | 1931 | } else |
---|
1836 | | - if (event.getSource() == overwriteNameItem) |
---|
| 1932 | + if (source == overwriteNameItem) |
---|
1837 | 1933 | { |
---|
1838 | 1934 | Overwrite(Object3D.NAME); |
---|
1839 | 1935 | } else |
---|
1840 | | - if (event.getSource() == overwriteUVItem) |
---|
| 1936 | + if (source == overwriteUVItem) |
---|
1841 | 1937 | { |
---|
1842 | 1938 | Overwrite(Object3D.UV); |
---|
1843 | 1939 | } else |
---|
1844 | | - if (event.getSource() == overwriteMatItem) |
---|
| 1940 | + if (source == overwriteMatItem) |
---|
1845 | 1941 | { |
---|
| 1942 | + /* july 2015 |
---|
1846 | 1943 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
1847 | | - Overwrite(Object3D.MATERIAL); |
---|
| 1944 | + Overwrite(Object3D.MATERIAL | Object3D.COLOR); |
---|
1848 | 1945 | else |
---|
1849 | 1946 | { |
---|
1850 | 1947 | if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0) |
---|
.. | .. |
---|
1856 | 1953 | Overwrite(Object3D.MATERIAL | Object3D.TEXTURE); |
---|
1857 | 1954 | } |
---|
1858 | 1955 | } |
---|
| 1956 | + */ |
---|
| 1957 | + |
---|
| 1958 | + Overwrite(dropAttributes); |
---|
1859 | 1959 | } |
---|
1860 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 1960 | + if (source == overwriteGeoItem) |
---|
1861 | 1961 | { |
---|
1862 | 1962 | Overwrite(Object3D.GEOMETRY); |
---|
1863 | | -// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1963 | +// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1864 | 1964 | // { |
---|
1865 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1965 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
1866 | 1966 | // |
---|
1867 | 1967 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1868 | 1968 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1874 | 1974 | // refreshContents(); |
---|
1875 | 1975 | // } |
---|
1876 | 1976 | } else |
---|
1877 | | - if (event.getSource() == generateMeshItem) |
---|
| 1977 | + if (source == generateMeshItem) |
---|
1878 | 1978 | { |
---|
1879 | 1979 | //if (group.selection.size() == 1) |
---|
1880 | 1980 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1885 | 1985 | ResetModel(); |
---|
1886 | 1986 | refreshContents(); |
---|
1887 | 1987 | } else |
---|
1888 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 1988 | + if (source == extractGeometriesItem) |
---|
1889 | 1989 | { |
---|
1890 | 1990 | boolean one = false; |
---|
1891 | 1991 | |
---|
.. | .. |
---|
1912 | 2012 | ResetModel(); |
---|
1913 | 2013 | refreshContents(); |
---|
1914 | 2014 | } else |
---|
1915 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2015 | + if (source == cloneGeometriesItem) |
---|
1916 | 2016 | { |
---|
1917 | 2017 | boolean one = false; |
---|
1918 | 2018 | |
---|
.. | .. |
---|
1938 | 2038 | ResetModel(); |
---|
1939 | 2039 | refreshContents(); |
---|
1940 | 2040 | } else |
---|
1941 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2041 | + if (source == shareGeometriesItem) |
---|
1942 | 2042 | { |
---|
1943 | 2043 | boolean one = false; |
---|
1944 | 2044 | |
---|
1945 | 2045 | if (group.selection.size() == 1) |
---|
1946 | 2046 | one = true; |
---|
1947 | 2047 | |
---|
| 2048 | + Object3D merge = null; |
---|
| 2049 | + |
---|
1948 | 2050 | Object3D content = new cGroup(); |
---|
1949 | 2051 | |
---|
1950 | 2052 | for (int i=0; i<group.selection.size(); i++) |
---|
1951 | 2053 | { |
---|
1952 | | - Object3D sel = new Merge(group.selection.get(i)); |
---|
| 2054 | + merge = new Merge(group.selection.get(i)); |
---|
1953 | 2055 | |
---|
1954 | 2056 | if (one) |
---|
1955 | | - makeSomething(sel, false); |
---|
| 2057 | + makeSomething(merge, false); |
---|
1956 | 2058 | else |
---|
1957 | | - content.addChild(sel); |
---|
| 2059 | + content.addChild(merge); |
---|
1958 | 2060 | } |
---|
1959 | 2061 | |
---|
1960 | 2062 | if (!one) |
---|
1961 | | - makeSomething(content, false); |
---|
1962 | | - |
---|
1963 | | - ResetModel(); |
---|
1964 | | - refreshContents(); |
---|
| 2063 | + makeSomething(content, true); |
---|
| 2064 | + else |
---|
| 2065 | + { |
---|
| 2066 | + ResetModel(); |
---|
| 2067 | + Select(merge.GetTreePath(), true, false); // unselect... false); |
---|
| 2068 | + refreshContents(); |
---|
| 2069 | + } |
---|
1965 | 2070 | } else |
---|
1966 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2071 | + if (source == mergeGeometriesItem) |
---|
1967 | 2072 | { |
---|
1968 | 2073 | boolean one = false; |
---|
1969 | 2074 | |
---|
.. | .. |
---|
1993 | 2098 | ResetModel(); |
---|
1994 | 2099 | refreshContents(); |
---|
1995 | 2100 | } else |
---|
1996 | | - if (event.getSource() == linkverticesItem) |
---|
| 2101 | + if (source == linkverticesItem) |
---|
1997 | 2102 | { |
---|
1998 | | -// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2103 | +// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
1999 | 2104 | // { |
---|
2000 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2105 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
2001 | 2106 | // |
---|
2002 | 2107 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2003 | 2108 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2006 | 2111 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2007 | 2112 | // refreshContents(); |
---|
2008 | 2113 | // } |
---|
2009 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2114 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
2010 | 2115 | { |
---|
2011 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2116 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2012 | 2117 | |
---|
2013 | 2118 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2014 | 2119 | content = ((cGroup)content).get(0); |
---|
2015 | 2120 | |
---|
2016 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2121 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2017 | 2122 | for (int i=0; i<group.selection.size(); i++) |
---|
2018 | 2123 | { |
---|
2019 | 2124 | boolean random = CameraPane.RANDOM; |
---|
.. | .. |
---|
2022 | 2127 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2023 | 2128 | CameraPane.RANDOM = random; |
---|
2024 | 2129 | } |
---|
2025 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2130 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2026 | 2131 | refreshContents(); |
---|
2027 | 2132 | } |
---|
2028 | 2133 | } else |
---|
2029 | | - if (event.getSource() == resetsupportItem) |
---|
| 2134 | + if (source == resetsupportItem) |
---|
2030 | 2135 | { |
---|
2031 | 2136 | for (int i=0; i<group.selection.size(); i++) |
---|
2032 | 2137 | { |
---|
.. | .. |
---|
2038 | 2143 | |
---|
2039 | 2144 | refreshContents(); |
---|
2040 | 2145 | } else |
---|
2041 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2146 | + if (source == relinkverticesItem) |
---|
| 2147 | + { |
---|
| 2148 | + boolean random = CameraPane.RANDOM; |
---|
| 2149 | + CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2150 | + group.selection.RelinkToSupport(); |
---|
| 2151 | + CameraPane.RANDOM = random; |
---|
| 2152 | + |
---|
| 2153 | + refreshContents(); |
---|
| 2154 | + } else |
---|
| 2155 | + if (source == resetreferencesItem) |
---|
2042 | 2156 | { |
---|
2043 | 2157 | for (int i=0; i<group.selection.size(); i++) |
---|
2044 | 2158 | { |
---|
.. | .. |
---|
2047 | 2161 | |
---|
2048 | 2162 | refreshContents(); |
---|
2049 | 2163 | } else |
---|
2050 | | - if (event.getSource() == setMasterItem) |
---|
| 2164 | + if (source == setMasterItem) |
---|
2051 | 2165 | { |
---|
2052 | | - if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2166 | + if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2053 | 2167 | { |
---|
2054 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2168 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2055 | 2169 | |
---|
2056 | 2170 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2057 | 2171 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2060 | 2174 | refreshContents(); |
---|
2061 | 2175 | } |
---|
2062 | 2176 | } else |
---|
2063 | | - if (event.getSource() == poseMeshItem) |
---|
| 2177 | + if (source == poseMeshItem) |
---|
2064 | 2178 | { |
---|
2065 | 2179 | if (group.selection.size() == 1) |
---|
2066 | 2180 | { |
---|
2067 | | - if (GraphreeD.clipboard.size() == 1) |
---|
| 2181 | + if (GrafreeD.clipboard.size() == 1) |
---|
2068 | 2182 | { |
---|
2069 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2183 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2070 | 2184 | |
---|
2071 | 2185 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2072 | 2186 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2079 | 2193 | } |
---|
2080 | 2194 | |
---|
2081 | 2195 | } else |
---|
2082 | | - if (event.getSource() == revertMeshItem) |
---|
| 2196 | + if (source == revertMeshItem) |
---|
2083 | 2197 | { |
---|
2084 | 2198 | RevertMeshes(); |
---|
2085 | 2199 | } else |
---|
2086 | | - if (event.getSource() == resetMeshItem) |
---|
| 2200 | + if (source == resetMeshItem) |
---|
2087 | 2201 | { |
---|
2088 | 2202 | ResetAll(); |
---|
2089 | 2203 | } else |
---|
2090 | | - if (event.getSource() == stepAllItem) |
---|
| 2204 | + if (source == stepAllItem) |
---|
2091 | 2205 | { |
---|
2092 | 2206 | StepAll(); |
---|
2093 | 2207 | } else |
---|
2094 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2208 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2095 | 2209 | { |
---|
2096 | 2210 | //int indices[] = jList.getSelectedIndices(); |
---|
2097 | 2211 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2099 | 2213 | |
---|
2100 | 2214 | ClearSelection(false); |
---|
2101 | 2215 | } else |
---|
2102 | | - if (event.getSource() == clearAllItem) |
---|
| 2216 | + if (source == clearAllItem) |
---|
2103 | 2217 | { |
---|
2104 | 2218 | ClearSelection(true); |
---|
2105 | 2219 | } else |
---|
2106 | | - if (event.getSource() == grabItem) |
---|
| 2220 | + if (source == grabItem) |
---|
2107 | 2221 | { |
---|
2108 | 2222 | group(new cGroup(), true); |
---|
2109 | 2223 | } else |
---|
2110 | | - if (event.getSource() == frontItem) |
---|
| 2224 | + if (source == hideItem) |
---|
| 2225 | + { |
---|
| 2226 | + group(new HiddenObject()); |
---|
| 2227 | + } else |
---|
| 2228 | + if (source == frontItem) |
---|
2111 | 2229 | { |
---|
2112 | 2230 | front(); |
---|
2113 | 2231 | } else |
---|
2114 | | - if (event.getSource() == backItem) |
---|
| 2232 | + if (source == backItem) |
---|
2115 | 2233 | { |
---|
2116 | 2234 | back(); |
---|
2117 | 2235 | } else |
---|
2118 | | - if (event.getSource() == cameraItem) |
---|
| 2236 | + if (source == cameraItem) |
---|
2119 | 2237 | { |
---|
2120 | 2238 | makeSomething(new Camera()); |
---|
2121 | 2239 | } else |
---|
2122 | | - if (event.getSource() == compositeItem) |
---|
| 2240 | + if (source == compositeItem) |
---|
2123 | 2241 | { |
---|
2124 | 2242 | group(new Composite()); |
---|
2125 | 2243 | } else |
---|
2126 | | - if (event.getSource() == randomItem) |
---|
| 2244 | + if (source == randomItem) |
---|
2127 | 2245 | { |
---|
2128 | 2246 | RandomNode random = new RandomNode(); |
---|
2129 | 2247 | group(random); |
---|
2130 | 2248 | if (random.size() > 0) |
---|
2131 | 2249 | random.name = random.get(0).name + "Rnd"; |
---|
2132 | 2250 | } else |
---|
2133 | | - if (event.getSource() == physicsItem) |
---|
| 2251 | + if (source == physicsItem) |
---|
2134 | 2252 | { |
---|
2135 | 2253 | group(new PhysicsNode()); |
---|
2136 | 2254 | } else |
---|
2137 | | - if (event.getSource() == frameselectorItem) |
---|
| 2255 | + if (source == frameselectorItem) |
---|
2138 | 2256 | { |
---|
2139 | 2257 | for (int i=0; i<group.selection.size(); i++) |
---|
2140 | 2258 | { |
---|
.. | .. |
---|
2146 | 2264 | ResetModel(); |
---|
2147 | 2265 | refreshContents(); |
---|
2148 | 2266 | } else |
---|
2149 | | - if (event.getSource() == switchGeoItem) |
---|
| 2267 | + if (source == switchGeoItem) |
---|
2150 | 2268 | { |
---|
2151 | 2269 | for (int i=0; i<group.selection.size(); i++) |
---|
2152 | 2270 | { |
---|
.. | .. |
---|
2158 | 2276 | ResetModel(); |
---|
2159 | 2277 | refreshContents(); |
---|
2160 | 2278 | } else |
---|
2161 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2279 | + if (source == switchTransfoItem) |
---|
2162 | 2280 | { |
---|
2163 | 2281 | for (int i=0; i<group.selection.size(); i++) |
---|
2164 | 2282 | { |
---|
.. | .. |
---|
2170 | 2288 | ResetModel(); |
---|
2171 | 2289 | refreshContents(); |
---|
2172 | 2290 | } else |
---|
2173 | | - if (event.getSource() == morphItem) |
---|
| 2291 | + if (source == morphItem) |
---|
2174 | 2292 | { |
---|
2175 | 2293 | for (int i=0; i<group.selection.size(); i++) |
---|
2176 | 2294 | { |
---|
.. | .. |
---|
2182 | 2300 | ResetModel(); |
---|
2183 | 2301 | refreshContents(); |
---|
2184 | 2302 | } else |
---|
2185 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2303 | + if (source == scriptNodeItem) |
---|
2186 | 2304 | { |
---|
2187 | 2305 | boolean atleastone = false; |
---|
2188 | 2306 | |
---|
.. | .. |
---|
2221 | 2339 | } |
---|
2222 | 2340 | } |
---|
2223 | 2341 | } else |
---|
2224 | | - if (event.getSource() == linkerItem) |
---|
| 2342 | + if (source == linkerItem) |
---|
2225 | 2343 | { |
---|
2226 | 2344 | group(new cLinker()); |
---|
2227 | 2345 | } else |
---|
2228 | | - if (event.getSource() == textureItem) |
---|
| 2346 | + if (source == textureItem) |
---|
2229 | 2347 | { |
---|
2230 | 2348 | group(new TextureNode()); |
---|
2231 | 2349 | } else |
---|
2232 | | - if (event.getSource() == shadowXItem) |
---|
| 2350 | + if (source == billboardItem) |
---|
| 2351 | + { |
---|
| 2352 | + group(new BillboardNode()); |
---|
| 2353 | + } else |
---|
| 2354 | + if (source == shadowXItem) |
---|
2233 | 2355 | { |
---|
2234 | 2356 | CastShadow(0); |
---|
2235 | 2357 | } else |
---|
2236 | | - if (event.getSource() == shadowYItem) |
---|
| 2358 | + if (source == shadowYItem) |
---|
2237 | 2359 | { |
---|
2238 | 2360 | CastShadow(1); |
---|
2239 | 2361 | } else |
---|
2240 | | - if (event.getSource() == shadowZItem) |
---|
| 2362 | + if (source == shadowZItem) |
---|
2241 | 2363 | { |
---|
2242 | 2364 | CastShadow(2); |
---|
2243 | 2365 | } else |
---|
2244 | | - if (event.getSource() == ungroupItem) |
---|
| 2366 | + if (source == ungroupItem) |
---|
2245 | 2367 | { |
---|
2246 | | - ungroup(); |
---|
| 2368 | + //ungroup(); |
---|
| 2369 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2370 | + { |
---|
| 2371 | + Ungroup(group.selection.get(i)); |
---|
| 2372 | + } |
---|
| 2373 | + |
---|
| 2374 | + ClearSelection(false); |
---|
| 2375 | + |
---|
| 2376 | + refreshContents(); |
---|
2247 | 2377 | } else |
---|
2248 | | - if (event.getSource() == genUVItem) |
---|
| 2378 | + if (source == genUVItem) |
---|
2249 | 2379 | { |
---|
2250 | 2380 | GenUV(); |
---|
2251 | 2381 | } else |
---|
2252 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2382 | + if (source == genNormalsCADItem) |
---|
2253 | 2383 | { |
---|
2254 | 2384 | GenNormals(true); |
---|
2255 | 2385 | } else |
---|
2256 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2386 | + if (source == genNormalsMESHItem) |
---|
| 2387 | + { |
---|
| 2388 | + GenNormals(true); // TODO |
---|
| 2389 | + } else |
---|
| 2390 | + if (source == genNormalsORGANItem) |
---|
2257 | 2391 | { |
---|
2258 | 2392 | GenNormals(false); |
---|
2259 | 2393 | } else |
---|
2260 | | - if (event.getSource() == stripifyItem) |
---|
| 2394 | + if (source == genNormalsMINEItem) |
---|
| 2395 | + { |
---|
| 2396 | + GenNormalsMINE(); |
---|
| 2397 | + } else |
---|
| 2398 | + if (source == stripifyItem) |
---|
2261 | 2399 | { |
---|
2262 | 2400 | Stripify(); |
---|
2263 | 2401 | } else |
---|
2264 | | - if (event.getSource() == unstripifyItem) |
---|
| 2402 | + if (source == unstripifyItem) |
---|
2265 | 2403 | { |
---|
2266 | 2404 | Unstripify(); |
---|
2267 | 2405 | } else |
---|
2268 | | - if (event.getSource() == trimItem) |
---|
| 2406 | + if (source == trimItem) |
---|
2269 | 2407 | { |
---|
2270 | 2408 | Trim(); |
---|
2271 | 2409 | } else |
---|
2272 | | - if (event.getSource() == untrimItem) |
---|
| 2410 | + if (source == untrimItem) |
---|
2273 | 2411 | { |
---|
2274 | 2412 | Untrim(); |
---|
2275 | 2413 | } else |
---|
2276 | | - if (event.getSource() == clearColorsItem) |
---|
| 2414 | + if (source == clearColorsItem) |
---|
2277 | 2415 | { |
---|
2278 | 2416 | ClearColors(); |
---|
2279 | 2417 | } else |
---|
2280 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2418 | + if (source == clearMaterialsItem) |
---|
2281 | 2419 | { |
---|
2282 | 2420 | ClearMaterials(); |
---|
2283 | 2421 | } else |
---|
2284 | | - if (event.getSource() == liveleavesItem) |
---|
| 2422 | + if (source == liveleavesItem) |
---|
2285 | 2423 | { |
---|
2286 | 2424 | LiveLeaves(true); |
---|
2287 | 2425 | } else |
---|
2288 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2426 | + if (source == unliveleavesItem) |
---|
2289 | 2427 | { |
---|
2290 | 2428 | LiveLeaves(false); |
---|
2291 | 2429 | } else |
---|
2292 | | - if (event.getSource() == supportleavesItem) |
---|
| 2430 | + if (source == supportleavesItem) |
---|
2293 | 2431 | { |
---|
2294 | 2432 | SupportLeaves(true); |
---|
2295 | 2433 | } else |
---|
2296 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2434 | + if (source == unsupportleavesItem) |
---|
2297 | 2435 | { |
---|
2298 | 2436 | SupportLeaves(false); |
---|
2299 | 2437 | } else |
---|
2300 | | - if (event.getSource() == hideleavesItem) |
---|
| 2438 | + if (source == hideleavesItem) |
---|
2301 | 2439 | { |
---|
2302 | 2440 | HideLeaves(true); |
---|
2303 | 2441 | } else |
---|
2304 | | - if (event.getSource() == showleavesItem) |
---|
| 2442 | + if (source == showleavesItem) |
---|
2305 | 2443 | { |
---|
2306 | 2444 | HideLeaves(false); |
---|
2307 | 2445 | } else |
---|
2308 | | - if (event.getSource() == markleavesItem) |
---|
| 2446 | + if (source == markleavesItem) |
---|
2309 | 2447 | { |
---|
2310 | 2448 | MarkLeaves(true); |
---|
2311 | 2449 | } else |
---|
2312 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2450 | + if (source == unmarkleavesItem) |
---|
2313 | 2451 | { |
---|
2314 | 2452 | MarkLeaves(false); |
---|
2315 | 2453 | } else |
---|
2316 | | - if (event.getSource() == flipVItem) |
---|
| 2454 | + if (source == flipVItem) |
---|
2317 | 2455 | { |
---|
2318 | 2456 | FlipV(true); |
---|
2319 | 2457 | } else |
---|
2320 | | - if (event.getSource() == unflipVItem) |
---|
| 2458 | + if (source == unflipVItem) |
---|
2321 | 2459 | { |
---|
2322 | 2460 | FlipV(false); |
---|
2323 | 2461 | } else |
---|
2324 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2462 | + if (source == lowTexturesItem) |
---|
2325 | 2463 | { |
---|
2326 | 2464 | SetTexRes(0); |
---|
2327 | 2465 | } else |
---|
2328 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2466 | + if (source == normalTexturesItem) |
---|
2329 | 2467 | { |
---|
2330 | 2468 | SetTexRes(1); |
---|
2331 | 2469 | } else |
---|
2332 | | - if (event.getSource() == highTexturesItem) |
---|
| 2470 | + if (source == highTexturesItem) |
---|
2333 | 2471 | { |
---|
2334 | 2472 | SetTexRes(2); |
---|
2335 | 2473 | } else |
---|
2336 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2474 | + if (source == veryhighTexturesItem) |
---|
2337 | 2475 | { |
---|
2338 | 2476 | SetTexRes(3); |
---|
2339 | 2477 | } else |
---|
2340 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2478 | + if (source == maxTexturesItem) |
---|
2341 | 2479 | { |
---|
2342 | 2480 | SetTexRes(4); |
---|
2343 | 2481 | } else |
---|
2344 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2482 | + if (source == panoTexturesItem) |
---|
2345 | 2483 | { |
---|
2346 | 2484 | SetTexRes(5); |
---|
2347 | 2485 | } else |
---|
2348 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2486 | + if (source == reverseNormalsItem) |
---|
2349 | 2487 | { |
---|
2350 | 2488 | ReverseNormals(); |
---|
2351 | 2489 | } else |
---|
2352 | | - if (event.getSource() == parseverticesItem) |
---|
| 2490 | + if (source == parseverticesItem) |
---|
2353 | 2491 | { |
---|
2354 | 2492 | ParseVertices(); |
---|
2355 | 2493 | } else |
---|
2356 | | - if (event.getSource() == alignItem) |
---|
| 2494 | + if (source == textureFieldItem) |
---|
| 2495 | + { |
---|
| 2496 | + TextureVertices(); |
---|
| 2497 | + } else |
---|
| 2498 | + if (source == alignItem) |
---|
2357 | 2499 | { |
---|
2358 | 2500 | Align(); |
---|
2359 | 2501 | } else |
---|
2360 | | - if (event.getSource() == mirrorItem) |
---|
| 2502 | + if (source == mirrorItem) |
---|
2361 | 2503 | { |
---|
2362 | 2504 | MirrorPoses(); |
---|
2363 | 2505 | } else |
---|
2364 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2506 | + if (source == reduceMorphItem) |
---|
2365 | 2507 | { |
---|
2366 | 2508 | MeshReduction(false); |
---|
2367 | 2509 | } else |
---|
2368 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2510 | + if (source == reduce34MorphItem) |
---|
2369 | 2511 | { |
---|
2370 | 2512 | MeshReduction(true); |
---|
2371 | 2513 | } else |
---|
2372 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2514 | + if (source == reverseTrianglesItem) |
---|
2373 | 2515 | { |
---|
2374 | 2516 | ReverseTriangles(); |
---|
2375 | 2517 | } else |
---|
2376 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2518 | + if (source == reduceMeshItem) |
---|
2377 | 2519 | { |
---|
2378 | 2520 | ReduceMesh(false); |
---|
2379 | 2521 | } else |
---|
2380 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2522 | + if (source == reduce34MeshItem) |
---|
2381 | 2523 | { |
---|
2382 | 2524 | ReduceMesh(true); |
---|
2383 | 2525 | } else |
---|
2384 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2526 | + if (source == increaseMeshItem) |
---|
2385 | 2527 | { |
---|
2386 | 2528 | IncreaseMesh(); |
---|
2387 | 2529 | } else |
---|
2388 | | - if (event.getSource() == clipMeshItem) |
---|
| 2530 | + if (source == clipMeshItem) |
---|
2389 | 2531 | { |
---|
2390 | 2532 | ClipMesh(); |
---|
2391 | 2533 | } else |
---|
2392 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2534 | + if (source == smoothMeshItem) |
---|
2393 | 2535 | { |
---|
2394 | 2536 | SmoothMesh(); |
---|
2395 | 2537 | } else |
---|
2396 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2538 | + if (source == transformgeometryItem) |
---|
2397 | 2539 | { |
---|
2398 | 2540 | TransformGeometry(); |
---|
2399 | 2541 | } else |
---|
2400 | | - if (event.getSource() == resetTransformItem) |
---|
| 2542 | + if (source == resetTransformItem) |
---|
2401 | 2543 | { |
---|
2402 | 2544 | ResetTransform(); |
---|
2403 | 2545 | } else |
---|
2404 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2546 | + if (source == resetCentroidItem) |
---|
2405 | 2547 | { |
---|
2406 | 2548 | ResetCentroid(); |
---|
2407 | 2549 | } else |
---|
2408 | | - if (event.getSource() == resetParentItem) |
---|
| 2550 | + if (source == resetParentItem) |
---|
2409 | 2551 | { |
---|
2410 | 2552 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2411 | 2553 | { |
---|
.. | .. |
---|
2415 | 2557 | |
---|
2416 | 2558 | refreshContents(); |
---|
2417 | 2559 | } else |
---|
2418 | | - if (event.getSource() == repairParentItem) |
---|
| 2560 | + if (source == repairParentItem) |
---|
2419 | 2561 | { |
---|
2420 | 2562 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2421 | 2563 | { |
---|
.. | .. |
---|
2429 | 2571 | |
---|
2430 | 2572 | refreshContents(); |
---|
2431 | 2573 | } else |
---|
2432 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2574 | + if (source == repairShadowItem) |
---|
| 2575 | + { |
---|
| 2576 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2577 | + { |
---|
| 2578 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2579 | + obj.RepairShadow(); |
---|
| 2580 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2581 | +// { |
---|
| 2582 | +// obj.get(i).parent = obj; |
---|
| 2583 | +// } |
---|
| 2584 | + } |
---|
| 2585 | + |
---|
| 2586 | + refreshContents(); |
---|
| 2587 | + } else |
---|
| 2588 | + if (source == sortbysizeItem) |
---|
2433 | 2589 | { |
---|
2434 | 2590 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2435 | 2591 | { |
---|
.. | .. |
---|
2441 | 2597 | ResetModel(); |
---|
2442 | 2598 | refreshContents(); |
---|
2443 | 2599 | } else |
---|
2444 | | - if (event.getSource() == sortbynameItem) |
---|
| 2600 | + if (source == sortbynameItem) |
---|
2445 | 2601 | { |
---|
2446 | 2602 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2447 | 2603 | { |
---|
.. | .. |
---|
2453 | 2609 | ResetModel(); |
---|
2454 | 2610 | refreshContents(); |
---|
2455 | 2611 | } else |
---|
2456 | | - if (event.getSource() == attachPigmentItem) |
---|
| 2612 | + if (source == attachPigmentItem) |
---|
2457 | 2613 | { |
---|
2458 | 2614 | String texture = GetFile("Attach pigment"); |
---|
2459 | 2615 | Object3D obj; |
---|
.. | .. |
---|
2465 | 2621 | |
---|
2466 | 2622 | refreshContents(); |
---|
2467 | 2623 | } else |
---|
2468 | | - if (event.getSource() == detachPigmentItem) |
---|
| 2624 | + if (source == detachPigmentItem) |
---|
2469 | 2625 | { |
---|
2470 | 2626 | Object3D obj; |
---|
2471 | 2627 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2476 | 2632 | |
---|
2477 | 2633 | refreshContents(); |
---|
2478 | 2634 | } else |
---|
2479 | | - if (event.getSource() == attachBumpItem) |
---|
| 2635 | + if (source == attachBumpItem) |
---|
2480 | 2636 | { |
---|
2481 | 2637 | String texture = GetFile("Attach bump"); |
---|
2482 | 2638 | Object3D obj; |
---|
.. | .. |
---|
2488 | 2644 | |
---|
2489 | 2645 | refreshContents(); |
---|
2490 | 2646 | } else |
---|
2491 | | - if (event.getSource() == detachBumpItem) |
---|
| 2647 | + if (source == detachBumpItem) |
---|
2492 | 2648 | { |
---|
2493 | 2649 | Object3D obj; |
---|
2494 | 2650 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2499 | 2655 | |
---|
2500 | 2656 | refreshContents(); |
---|
2501 | 2657 | } else |
---|
2502 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 2658 | + if (source == pigmentBumpItem) |
---|
2503 | 2659 | { |
---|
2504 | 2660 | Object3D obj; |
---|
2505 | 2661 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2510 | 2666 | |
---|
2511 | 2667 | refreshContents(); |
---|
2512 | 2668 | } else |
---|
2513 | | - if (event.getSource() == flashSelectionButton) |
---|
| 2669 | + if (source == flashSelectionButton) |
---|
2514 | 2670 | { |
---|
2515 | 2671 | CameraPane.flash = true; |
---|
2516 | 2672 | refreshContents(); |
---|
2517 | 2673 | } else |
---|
2518 | | - if (event.getSource() == oneButton) |
---|
| 2674 | + if (source == oneButton) |
---|
2519 | 2675 | { |
---|
2520 | 2676 | } else |
---|
2521 | | - if (event.getSource() == twoButton) |
---|
| 2677 | + if (source == twoButton) |
---|
2522 | 2678 | { |
---|
2523 | 2679 | radio.layout = twoButton; |
---|
2524 | 2680 | // bug |
---|
2525 | 2681 | //gridPanel.setDividerLocation(1.0); |
---|
2526 | 2682 | //bigPanel.setDividerLocation(0.0); |
---|
2527 | | - bigThree.remove(jtp); |
---|
2528 | | - bigThree.remove(cameraPanel); |
---|
2529 | | - bigThree.remove(XYZPanel); |
---|
2530 | | - aWindowConstraints.gridx = 0; |
---|
2531 | | - aWindowConstraints.gridy = 0; |
---|
2532 | | - aWindowConstraints.gridwidth = 1; |
---|
2533 | | - // aConstraints.gridheight = 3; |
---|
2534 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2535 | | - aWindowConstraints.weightx = 0; |
---|
2536 | | - aWindowConstraints.weighty = 1; |
---|
2537 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2538 | | - aWindowConstraints.weightx = 1; |
---|
2539 | | - aWindowConstraints.gridwidth = 3; |
---|
2540 | | - // aConstraints.gridheight = 3; |
---|
2541 | | - aWindowConstraints.gridx = 1; |
---|
2542 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2543 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2544 | | - aWindowConstraints.weightx = 0; |
---|
2545 | | - aWindowConstraints.gridx = 4; |
---|
2546 | | - aWindowConstraints.gridwidth = 1; |
---|
2547 | | - // aConstraints.gridheight = 3; |
---|
2548 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2549 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2550 | | - bigThree.revalidate(); |
---|
| 2683 | +// bigThree.remove(scenePanel); |
---|
| 2684 | +// bigThree.remove(centralPanel); |
---|
| 2685 | +// bigThree.remove(XYZPanel); |
---|
| 2686 | +// aWindowConstraints.gridx = 0; |
---|
| 2687 | +// aWindowConstraints.gridy = 0; |
---|
| 2688 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2689 | +// // aConstraints.gridheight = 3; |
---|
| 2690 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2691 | +// aWindowConstraints.weightx = 0; |
---|
| 2692 | +// aWindowConstraints.weighty = 1; |
---|
| 2693 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2694 | +// aWindowConstraints.weightx = 1; |
---|
| 2695 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2696 | +// // aConstraints.gridheight = 3; |
---|
| 2697 | +// aWindowConstraints.gridx = 1; |
---|
| 2698 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2699 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2700 | +// aWindowConstraints.weightx = 0; |
---|
| 2701 | +// aWindowConstraints.gridx = 4; |
---|
| 2702 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2703 | +// // aConstraints.gridheight = 3; |
---|
| 2704 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2705 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2706 | +// scenePanel.setVisible(false); |
---|
| 2707 | +// centralPanel.setVisible(true); |
---|
| 2708 | +// XYZPanel.setVisible(false); |
---|
| 2709 | + bigThree.ClearUI(); |
---|
| 2710 | + bigThree.add(centralPanel); |
---|
| 2711 | + bigThree.FlushUI(); |
---|
2551 | 2712 | } else |
---|
2552 | | - if (event.getSource() == threeButton) |
---|
| 2713 | + if (source == threeButton) |
---|
2553 | 2714 | { |
---|
2554 | 2715 | radio.layout = threeButton; |
---|
2555 | | - bigThree.remove(jtp); |
---|
2556 | | - bigThree.remove(cameraPanel); |
---|
2557 | | - bigThree.remove(XYZPanel); |
---|
2558 | | - aWindowConstraints.gridx = 0; |
---|
2559 | | - aWindowConstraints.gridy = 0; |
---|
2560 | | - aWindowConstraints.gridwidth = 1; |
---|
2561 | | - // aConstraints.gridheight = 3; |
---|
2562 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2563 | | - aWindowConstraints.weightx = 0; |
---|
2564 | | - aWindowConstraints.weighty = 1; |
---|
2565 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2566 | | - aWindowConstraints.weightx = 1; |
---|
2567 | | - aWindowConstraints.gridwidth = 3; |
---|
2568 | | - // aConstraints.gridheight = 3; |
---|
2569 | | - aWindowConstraints.gridx = 1; |
---|
2570 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2571 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2572 | | - aWindowConstraints.weightx = 0; |
---|
2573 | | - aWindowConstraints.gridx = 4; |
---|
2574 | | - aWindowConstraints.gridwidth = 1; |
---|
2575 | | - // aConstraints.gridheight = 3; |
---|
2576 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2577 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2578 | | - bigThree.revalidate(); |
---|
| 2716 | + |
---|
| 2717 | +// bigThree.remove(scenePanel); |
---|
| 2718 | +// bigThree.remove(centralPanel); |
---|
| 2719 | +// bigThree.remove(XYZPanel); |
---|
| 2720 | +// aWindowConstraints.gridx = 0; |
---|
| 2721 | +// aWindowConstraints.gridy = 0; |
---|
| 2722 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2723 | +// // aConstraints.gridheight = 3; |
---|
| 2724 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2725 | +// aWindowConstraints.weightx = 0; |
---|
| 2726 | +// aWindowConstraints.weighty = 1; |
---|
| 2727 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2728 | +// aWindowConstraints.weightx = 1; |
---|
| 2729 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2730 | +// // aConstraints.gridheight = 3; |
---|
| 2731 | +// aWindowConstraints.gridx = 1; |
---|
| 2732 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2733 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2734 | +// aWindowConstraints.weightx = 0; |
---|
| 2735 | +// aWindowConstraints.gridx = 4; |
---|
| 2736 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2737 | +// // aConstraints.gridheight = 3; |
---|
| 2738 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2739 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2740 | +// bigThree.validate(); |
---|
| 2741 | +// scenePanel.setVisible(false); |
---|
| 2742 | +// centralPanel.setVisible(true); |
---|
| 2743 | +// XYZPanel.setVisible(true); |
---|
| 2744 | + bigThree.ClearUI(); |
---|
| 2745 | + bigThree.add(centralPanel); |
---|
| 2746 | + bigThree.add(XYZPanel); |
---|
| 2747 | + bigThree.FlushUI(); |
---|
2579 | 2748 | } else |
---|
2580 | | - if (event.getSource() == fourButton) |
---|
| 2749 | + if (source == fourButton) |
---|
2581 | 2750 | { |
---|
2582 | 2751 | radio.layout = fourButton; |
---|
2583 | | - bigThree.remove(jtp); |
---|
2584 | | - bigThree.remove(cameraPanel); |
---|
2585 | | - bigThree.remove(XYZPanel); |
---|
2586 | | - aWindowConstraints.gridx = 0; |
---|
2587 | | - aWindowConstraints.gridy = 0; |
---|
2588 | | - aWindowConstraints.gridwidth = 1; |
---|
2589 | | - // aWindowConstraints.gridheight = 3; |
---|
2590 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2591 | | - aWindowConstraints.weightx = 1; |
---|
2592 | | - aWindowConstraints.weighty = 1; |
---|
2593 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2594 | | - aWindowConstraints.weightx = 1; |
---|
2595 | | - aWindowConstraints.gridwidth = 3; |
---|
2596 | | - // aConstraints.gridheight = 3; |
---|
2597 | | - aWindowConstraints.gridx = 1; |
---|
2598 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2599 | | - //bigThree.add(cameraPanel, aWindowConstraints); |
---|
2600 | | - aWindowConstraints.weightx = 0; |
---|
2601 | | - aWindowConstraints.gridx = 4; |
---|
2602 | | - aWindowConstraints.gridwidth = 1; |
---|
2603 | | - // aWindowConstraints.gridheight = 3; |
---|
2604 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2605 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2606 | | - bigThree.revalidate(); |
---|
| 2752 | + |
---|
| 2753 | +// bigThree.remove(scenePanel); |
---|
| 2754 | +// bigThree.remove(centralPanel); |
---|
| 2755 | +// bigThree.remove(XYZPanel); |
---|
| 2756 | +// aWindowConstraints.gridx = 0; |
---|
| 2757 | +// aWindowConstraints.gridy = 0; |
---|
| 2758 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2759 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2760 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2761 | +// aWindowConstraints.weightx = 1; |
---|
| 2762 | +// aWindowConstraints.weighty = 1; |
---|
| 2763 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2764 | +// aWindowConstraints.weightx = 1; |
---|
| 2765 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2766 | +// // aConstraints.gridheight = 3; |
---|
| 2767 | +// aWindowConstraints.gridx = 1; |
---|
| 2768 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2769 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2770 | +// aWindowConstraints.weightx = 0; |
---|
| 2771 | +// aWindowConstraints.gridx = 4; |
---|
| 2772 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2773 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2774 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2775 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2776 | +// bigThree.validate(); |
---|
| 2777 | +// scenePanel.setVisible(true); |
---|
| 2778 | +// centralPanel.setVisible(false); |
---|
| 2779 | +// XYZPanel.setVisible(false); |
---|
| 2780 | + bigThree.ClearUI(); |
---|
| 2781 | + bigThree.add(scenePanel); |
---|
| 2782 | + bigThree.FlushUI(); |
---|
2607 | 2783 | } else |
---|
2608 | | - if (event.getSource() == sixButton) |
---|
| 2784 | + if (source == sixButton) |
---|
2609 | 2785 | { |
---|
2610 | 2786 | radio.layout = sixButton; |
---|
2611 | | - bigThree.remove(jtp); |
---|
2612 | | - bigThree.remove(cameraPanel); |
---|
2613 | | - bigThree.remove(XYZPanel); |
---|
2614 | | - aWindowConstraints.gridx = 0; |
---|
2615 | | - aWindowConstraints.gridy = 0; |
---|
2616 | | - aWindowConstraints.gridwidth = 1; |
---|
2617 | | - // aConstraints.gridheight = 3; |
---|
2618 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2619 | | - aWindowConstraints.weightx = 0; |
---|
2620 | | - aWindowConstraints.weighty = 1; |
---|
2621 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2622 | | - aWindowConstraints.weightx = 1; |
---|
2623 | | - aWindowConstraints.gridwidth = 3; |
---|
2624 | | - // aWindowConstraints.gridheight = 3; |
---|
2625 | | - aWindowConstraints.gridx = 1; |
---|
2626 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2627 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2628 | | - aWindowConstraints.weightx = 0; |
---|
2629 | | - aWindowConstraints.gridx = 4; |
---|
2630 | | - aWindowConstraints.gridwidth = 1; |
---|
2631 | | - // aWindowConstraints.gridheight = 3; |
---|
2632 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2633 | | - //bigThree.add(XYZPanel, aConstraints); |
---|
2634 | | - bigThree.revalidate(); |
---|
| 2787 | + |
---|
| 2788 | +// bigThree.remove(scenePanel); |
---|
| 2789 | +// bigThree.remove(centralPanel); |
---|
| 2790 | +// bigThree.remove(XYZPanel); |
---|
| 2791 | +// aWindowConstraints.gridx = 0; |
---|
| 2792 | +// aWindowConstraints.gridy = 0; |
---|
| 2793 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2794 | +// // aConstraints.gridheight = 3; |
---|
| 2795 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2796 | +// aWindowConstraints.weightx = 0; |
---|
| 2797 | +// aWindowConstraints.weighty = 1; |
---|
| 2798 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2799 | +// aWindowConstraints.weightx = 1; |
---|
| 2800 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2801 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2802 | +// aWindowConstraints.gridx = 1; |
---|
| 2803 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2804 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2805 | +// aWindowConstraints.weightx = 0; |
---|
| 2806 | +// aWindowConstraints.gridx = 4; |
---|
| 2807 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2808 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2809 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2810 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 2811 | +// bigThree.validate(); |
---|
| 2812 | +// scenePanel.setVisible(true); |
---|
| 2813 | +// centralPanel.setVisible(true); |
---|
| 2814 | +// XYZPanel.setVisible(false); |
---|
| 2815 | + bigThree.ClearUI(); |
---|
| 2816 | + bigThree.add(scenePanel); |
---|
| 2817 | + bigThree.add(centralPanel); |
---|
| 2818 | + bigThree.FlushUI(); |
---|
2635 | 2819 | } else |
---|
2636 | | - if (event.getSource() == sevenButton) |
---|
| 2820 | + if (source == sevenButton) |
---|
2637 | 2821 | { |
---|
2638 | 2822 | radio.layout = sevenButton; |
---|
2639 | | - bigThree.remove(jtp); |
---|
2640 | | - bigThree.remove(cameraPanel); |
---|
2641 | | - bigThree.remove(XYZPanel); |
---|
2642 | | - aWindowConstraints.gridx = 0; |
---|
2643 | | - aWindowConstraints.gridy = 0; |
---|
2644 | | - aWindowConstraints.gridwidth = 1; |
---|
2645 | | - // aWindowConstraints.gridheight = 3; |
---|
2646 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2647 | | - aWindowConstraints.weightx = 0; |
---|
2648 | | - aWindowConstraints.weighty = 1; |
---|
2649 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2650 | | - aWindowConstraints.weightx = 1; |
---|
2651 | | - aWindowConstraints.gridwidth = 3; |
---|
2652 | | - // aWindowConstraints.gridheight = 3; |
---|
2653 | | - aWindowConstraints.gridx = 1; |
---|
2654 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2655 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2656 | | - aWindowConstraints.weightx = 0; |
---|
2657 | | - aWindowConstraints.gridx = 4; |
---|
2658 | | - aWindowConstraints.gridwidth = 1; |
---|
2659 | | - // aConstraints.gridheight = 3; |
---|
2660 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2661 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2662 | | - bigThree.revalidate(); |
---|
| 2823 | + |
---|
| 2824 | +// bigThree.remove(scenePanel); |
---|
| 2825 | +// bigThree.remove(centralPanel); |
---|
| 2826 | +// bigThree.remove(XYZPanel); |
---|
| 2827 | +// aWindowConstraints.gridx = 0; |
---|
| 2828 | +// aWindowConstraints.gridy = 0; |
---|
| 2829 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2830 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2831 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2832 | +// aWindowConstraints.weightx = 0; |
---|
| 2833 | +// aWindowConstraints.weighty = 1; |
---|
| 2834 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2835 | +// aWindowConstraints.weightx = 1; |
---|
| 2836 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2837 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2838 | +// aWindowConstraints.gridx = 1; |
---|
| 2839 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2840 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2841 | +// aWindowConstraints.weightx = 0; |
---|
| 2842 | +// aWindowConstraints.gridx = 4; |
---|
| 2843 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2844 | +// // aConstraints.gridheight = 3; |
---|
| 2845 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2846 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2847 | +// bigThree.validate(); |
---|
| 2848 | +// scenePanel.setVisible(true); |
---|
| 2849 | +// centralPanel.setVisible(true); |
---|
| 2850 | +// XYZPanel.setVisible(true); |
---|
| 2851 | + bigThree.ClearUI(); |
---|
| 2852 | + bigThree.add(scenePanel); |
---|
| 2853 | + bigThree.add(centralPanel); |
---|
| 2854 | + bigThree.add(XYZPanel); |
---|
| 2855 | + bigThree.FlushUI(); |
---|
2663 | 2856 | } else |
---|
2664 | | - if (event.getSource() == rootButton) |
---|
| 2857 | + if (source == rootButton) |
---|
2665 | 2858 | { |
---|
2666 | 2859 | Object3D obj; |
---|
2667 | 2860 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2673 | 2866 | |
---|
2674 | 2867 | refreshContents(true); |
---|
2675 | 2868 | } else |
---|
2676 | | - if (event.getSource() == closeButton) |
---|
| 2869 | + if (source == closeButton) |
---|
2677 | 2870 | { |
---|
2678 | 2871 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2679 | 2872 | cRadio ab; |
---|
.. | .. |
---|
2694 | 2887 | } |
---|
2695 | 2888 | refreshContents(true); |
---|
2696 | 2889 | } else |
---|
2697 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 2890 | + if (source == editItem || source == editButton) |
---|
2698 | 2891 | { |
---|
2699 | 2892 | EditSelection(false); |
---|
2700 | 2893 | } else |
---|
2701 | | - if (event.getSource() == uneditButton) |
---|
| 2894 | + if (source == uneditButton) |
---|
2702 | 2895 | { |
---|
2703 | 2896 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2704 | 2897 | { |
---|
.. | .. |
---|
2710 | 2903 | |
---|
2711 | 2904 | child.editWindow = null; // ??????????? |
---|
2712 | 2905 | } |
---|
2713 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2906 | + objEditor.ctrlPanel.validate(); |
---|
2714 | 2907 | //objEditor.jTree.clearSelection(); |
---|
2715 | 2908 | //objEditor.ResetSliders(); |
---|
2716 | 2909 | refreshContents(true); |
---|
2717 | 2910 | } else |
---|
2718 | | - if (event.getSource() == clearPanelButton) |
---|
| 2911 | + if (source == clearPanelButton) |
---|
2719 | 2912 | { |
---|
2720 | 2913 | assert(copy == group); |
---|
2721 | 2914 | //copy.ClearUI(); |
---|
.. | .. |
---|
2726 | 2919 | listUI.clear(); |
---|
2727 | 2920 | refreshContents(true); |
---|
2728 | 2921 | } else |
---|
2729 | | - if (event.getSource() == allParamsButton) |
---|
| 2922 | + if (source == allParamsButton) |
---|
2730 | 2923 | { |
---|
2731 | 2924 | assert(copy == group); |
---|
2732 | 2925 | |
---|
.. | .. |
---|
2747 | 2940 | |
---|
2748 | 2941 | refreshContents(true); |
---|
2749 | 2942 | } else |
---|
2750 | | - if (event.getSource() == unselectButton) |
---|
| 2943 | + if (source == unselectButton) |
---|
2751 | 2944 | { |
---|
2752 | 2945 | objEditor.jTree.clearSelection(); |
---|
2753 | | - // ?? oct 2012 GraphreeD.clipboard.clear(); |
---|
| 2946 | + // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2754 | 2947 | objEditor.ResetSliders(); |
---|
2755 | 2948 | refreshContents(true); |
---|
2756 | 2949 | } else |
---|
2757 | | - if(event.getSource() instanceof cRadio) |
---|
| 2950 | + if(source instanceof cRadio) |
---|
2758 | 2951 | { |
---|
2759 | 2952 | group.parent = keepparent; |
---|
2760 | 2953 | group.attributes = 0; |
---|
2761 | 2954 | //group.editWindow = null; |
---|
2762 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 2955 | + /*cRadio*/ radio = (cRadio)source; |
---|
2763 | 2956 | Object3D obj = radio.GetObject(); |
---|
2764 | 2957 | System.out.println("Edit " + obj); |
---|
2765 | 2958 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|
.. | .. |
---|
2779 | 2972 | } |
---|
2780 | 2973 | |
---|
2781 | 2974 | copy = group; |
---|
2782 | | - //CameraPane.theRenderer.object = group; |
---|
| 2975 | + //Globals.theRenderer.object = group; |
---|
2783 | 2976 | if(!useclient) |
---|
2784 | 2977 | { |
---|
2785 | 2978 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2788 | 2981 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2789 | 2982 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2790 | 2983 | cameraView.object = group; |
---|
2791 | | - cameraView.lighttouched = true; |
---|
| 2984 | + //cameraView.lighttouched = true; |
---|
| 2985 | + Globals.lighttouched = true; |
---|
2792 | 2986 | topView.object = group; |
---|
2793 | 2987 | frontView.object = group; |
---|
2794 | 2988 | sideView.object = group; |
---|
.. | .. |
---|
2824 | 3018 | if (useclient) |
---|
2825 | 3019 | { |
---|
2826 | 3020 | cameraView.object = client; |
---|
2827 | | - cameraView.lighttouched = true; |
---|
| 3021 | + Globals.lighttouched = true; |
---|
2828 | 3022 | //topView.object = client; |
---|
2829 | 3023 | //frontView.object = client; |
---|
2830 | 3024 | //sideView.object = client; |
---|
.. | .. |
---|
2832 | 3026 | else |
---|
2833 | 3027 | { |
---|
2834 | 3028 | cameraView.object = group; |
---|
2835 | | - cameraView.lighttouched = true; |
---|
| 3029 | + Globals.lighttouched = true; |
---|
2836 | 3030 | //topView.object = group; |
---|
2837 | 3031 | //frontView.object = group; |
---|
2838 | 3032 | //sideView.object = group; |
---|
.. | .. |
---|
3065 | 3259 | obj = (Object3D)e.nextElement(); |
---|
3066 | 3260 | |
---|
3067 | 3261 | System.out.println("Object is: " + obj); |
---|
3068 | | - GraphreeD.AnalyzeObject(obj); |
---|
| 3262 | + GrafreeD.AnalyzeObject(obj); |
---|
3069 | 3263 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3070 | | - GraphreeD.AnalyzeObject(obj.bRep); |
---|
| 3264 | + GrafreeD.AnalyzeObject(obj.bRep); |
---|
3071 | 3265 | |
---|
3072 | 3266 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3073 | 3267 | } |
---|
.. | .. |
---|
3109 | 3303 | void GenNormals(boolean crease) |
---|
3110 | 3304 | { |
---|
3111 | 3305 | group.GenNormalsS(crease); |
---|
| 3306 | + |
---|
| 3307 | + refreshContents(); |
---|
| 3308 | + } |
---|
| 3309 | + |
---|
| 3310 | + void GenNormalsMINE() |
---|
| 3311 | + { |
---|
| 3312 | + group.selection.GenNormalsMINE(); |
---|
3112 | 3313 | |
---|
3113 | 3314 | refreshContents(); |
---|
3114 | 3315 | } |
---|
.. | .. |
---|
3157 | 3358 | |
---|
3158 | 3359 | //Object3D buffer; |
---|
3159 | 3360 | cVector temp = new cVector(); |
---|
3160 | | - BoundaryRep temprep; |
---|
3161 | | - Object3D nodes; |
---|
3162 | | - Vector<Vertex> vertices; |
---|
3163 | | - |
---|
3164 | | - public void Vertex(Object3D node, Vertex v) |
---|
3165 | | - { |
---|
3166 | | - vertices.add(v); |
---|
3167 | | - nodes.addElement(node); |
---|
3168 | | - |
---|
3169 | | - if (temprep.GetCache(v) != null) |
---|
3170 | | - { |
---|
3171 | | - temprep.Remove(v); |
---|
3172 | | - } |
---|
3173 | | - else |
---|
3174 | | - { |
---|
3175 | | - temprep.Remember(v); |
---|
3176 | | - } |
---|
3177 | | - } |
---|
3178 | | - |
---|
3179 | | - public void Face(Object3D node, Face f) |
---|
3180 | | - { |
---|
3181 | | - |
---|
3182 | | - } |
---|
3183 | | - |
---|
| 3361 | +// BoundaryRep temprep; |
---|
| 3362 | +// Object3D nodes; |
---|
| 3363 | +// Vector<Vertex> vertices; |
---|
| 3364 | +// |
---|
| 3365 | +// cGroup buffer; |
---|
| 3366 | +// |
---|
| 3367 | +// public void Vertex(Object3D node, Vertex v) |
---|
| 3368 | +// { |
---|
| 3369 | +//// vertices.add(v); |
---|
| 3370 | +//// nodes.addElement(node); |
---|
| 3371 | +//// |
---|
| 3372 | +//// if (temprep.GetCache(v) != null) |
---|
| 3373 | +//// { |
---|
| 3374 | +//// temprep.Remove(v); |
---|
| 3375 | +//// } else |
---|
| 3376 | +//// { |
---|
| 3377 | +//// temprep.Remember(v); |
---|
| 3378 | +//// } |
---|
| 3379 | +// |
---|
| 3380 | +// //Object3D node = nodes.get(index); |
---|
| 3381 | +// temp.set(v); // vertices.get(index)); // temprep.GetVertex(k)); |
---|
| 3382 | +// // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3383 | +// |
---|
| 3384 | +// LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
| 3385 | +// |
---|
| 3386 | +// // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3387 | +// |
---|
| 3388 | +// cGroup g = new cGroup(); |
---|
| 3389 | +// |
---|
| 3390 | +// if (g.toParent == null) |
---|
| 3391 | +// { |
---|
| 3392 | +// g.toParent = LA.newMatrix(); |
---|
| 3393 | +// g.fromParent = LA.newMatrix(); |
---|
| 3394 | +// } |
---|
| 3395 | +// LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
| 3396 | +// LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
| 3397 | +// |
---|
| 3398 | +// g.add(GrafreeD.clipboard); |
---|
| 3399 | +// |
---|
| 3400 | +// buffer.add(g); |
---|
| 3401 | +// } |
---|
| 3402 | +// |
---|
| 3403 | +// public void Face(Object3D node, Face f) |
---|
| 3404 | +// { |
---|
| 3405 | +// |
---|
| 3406 | +// } |
---|
| 3407 | +// |
---|
| 3408 | +// void ParseVerticesOld() // ?? |
---|
| 3409 | +// { |
---|
| 3410 | +// //if (group.selection.size() != 1) |
---|
| 3411 | +// // return; |
---|
| 3412 | +// |
---|
| 3413 | +// temprep = new BoundaryRep(); |
---|
| 3414 | +// nodes = new Object3D(); |
---|
| 3415 | +// vertices = new Vector<Vertex>(); |
---|
| 3416 | +// |
---|
| 3417 | +// boolean epsequal = GrafreeD.epsequal; |
---|
| 3418 | +// GrafreeD.epsequal = true; |
---|
| 3419 | +// |
---|
| 3420 | +// for (int i=0; i<group.selection.size(); i++) |
---|
| 3421 | +// { |
---|
| 3422 | +// Object3D buffer = new cGroup(group.selection.get(i).name + "+"); |
---|
| 3423 | +// |
---|
| 3424 | +// group.selection.get(i).Parse( |
---|
| 3425 | +//this ); |
---|
| 3426 | +// |
---|
| 3427 | +// int repsize = temprep.VertexCount(); |
---|
| 3428 | +// int tablesize = temprep.vertextable.size(); |
---|
| 3429 | +// int nodesize = nodes.size(); |
---|
| 3430 | +// |
---|
| 3431 | +// assert(vertices.size() == nodes.size()); |
---|
| 3432 | +// |
---|
| 3433 | +// temprep.vertextable.elements(); |
---|
| 3434 | +// |
---|
| 3435 | +// java.util.Set<java.util.Map.Entry<Vertex,Vertex>> set = temprep.vertextable.entrySet(); |
---|
| 3436 | +// |
---|
| 3437 | +// for (java.util.Map.Entry<Vertex,Vertex> entry : set) |
---|
| 3438 | +// { |
---|
| 3439 | +// cGroup g = new cGroup(); |
---|
| 3440 | +// |
---|
| 3441 | +// int index = vertices.indexOf(entry.getValue()); // temprep.vertextable.(k)); |
---|
| 3442 | +// |
---|
| 3443 | +// Object3D node = nodes.get(index); |
---|
| 3444 | +// temp.set(vertices.get(index)); // temprep.GetVertex(k)); |
---|
| 3445 | +// // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3446 | +// |
---|
| 3447 | +// LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
| 3448 | +// |
---|
| 3449 | +// // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3450 | +// |
---|
| 3451 | +// if (g.toParent == null) |
---|
| 3452 | +// { |
---|
| 3453 | +// g.toParent = LA.newMatrix(); |
---|
| 3454 | +// g.fromParent = LA.newMatrix(); |
---|
| 3455 | +// } |
---|
| 3456 | +// LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
| 3457 | +// LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
| 3458 | +// |
---|
| 3459 | +// g.add(GrafreeD.clipboard); |
---|
| 3460 | +// |
---|
| 3461 | +// buffer.add(g); |
---|
| 3462 | +// } |
---|
| 3463 | +// |
---|
| 3464 | +// makeSomething(buffer, i==group.selection.size()-1); |
---|
| 3465 | +// } |
---|
| 3466 | +// |
---|
| 3467 | +// GrafreeD.epsequal = epsequal; |
---|
| 3468 | +// |
---|
| 3469 | +// //buffer = null; |
---|
| 3470 | +// temprep = null; |
---|
| 3471 | +// nodes = null; |
---|
| 3472 | +// |
---|
| 3473 | +// refreshContents(); |
---|
| 3474 | +// } |
---|
| 3475 | + |
---|
3184 | 3476 | void ParseVertices() |
---|
3185 | 3477 | { |
---|
3186 | | - //if (group.selection.size() != 1) |
---|
3187 | | - // return; |
---|
3188 | | - |
---|
3189 | | - temprep = new BoundaryRep(); |
---|
3190 | | - nodes = new Object3D(); |
---|
3191 | | - vertices = new Vector<Vertex>(); |
---|
3192 | | - |
---|
3193 | | - boolean epsequal = GraphreeD.epsequal; |
---|
3194 | | - GraphreeD.epsequal = true; |
---|
| 3478 | + boolean epsequal = GrafreeD.epsequal; |
---|
| 3479 | + GrafreeD.epsequal = true; |
---|
3195 | 3480 | |
---|
3196 | 3481 | for (int i=0; i<group.selection.size(); i++) |
---|
3197 | 3482 | { |
---|
3198 | | - Object3D buffer = new cGroup(group.selection.get(i).name + "+"); |
---|
| 3483 | + final cGroup buffer = new cGroup(group.selection.get(i).name + "+"); |
---|
3199 | 3484 | |
---|
3200 | | - group.selection.get(i).Parse(this); |
---|
3201 | | - |
---|
3202 | | - int repsize = temprep.VertexCount(); |
---|
3203 | | - int tablesize = temprep.vertextable.size(); |
---|
3204 | | - int nodesize = nodes.size(); |
---|
| 3485 | + group.selection.get(i).Parse( |
---|
| 3486 | + |
---|
| 3487 | + new iParse() |
---|
| 3488 | + { |
---|
| 3489 | + public void Vertex(Object3D node, Vertex v) |
---|
| 3490 | + { |
---|
| 3491 | + temp.set(v); |
---|
| 3492 | + LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
3205 | 3493 | |
---|
3206 | | - assert(vertices.size() == nodes.size()); |
---|
3207 | | - |
---|
3208 | | - temprep.vertextable.elements(); |
---|
3209 | | - |
---|
3210 | | - java.util.Set<java.util.Map.Entry<Vertex,Vertex>> set = temprep.vertextable.entrySet(); |
---|
| 3494 | + cGroup g = new cGroup(); |
---|
3211 | 3495 | |
---|
3212 | | - for (java.util.Map.Entry<Vertex,Vertex> entry : set) |
---|
3213 | | - { |
---|
3214 | | - cGroup g = new cGroup(); |
---|
| 3496 | + if (g.toParent == null) |
---|
| 3497 | + { |
---|
| 3498 | + g.toParent = LA.newMatrix(); |
---|
| 3499 | + g.fromParent = LA.newMatrix(); |
---|
| 3500 | + } |
---|
| 3501 | + LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
| 3502 | + LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3215 | 3503 | |
---|
3216 | | - int index = vertices.indexOf(entry.getValue()); // temprep.vertextable.(k)); |
---|
3217 | | - Object3D node = nodes.get(index); |
---|
3218 | | - temp.set(vertices.get(index)); // temprep.GetVertex(k)); |
---|
3219 | | - // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3504 | + g.add(GrafreeD.clipboard); |
---|
3220 | 3505 | |
---|
3221 | | - LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
3222 | | - |
---|
3223 | | - // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
3224 | | - |
---|
3225 | | - if (g.toParent == null) |
---|
3226 | | - { |
---|
3227 | | - g.toParent = LA.newMatrix(); |
---|
3228 | | - g.fromParent = LA.newMatrix(); |
---|
3229 | | - } |
---|
3230 | | - LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3231 | | - LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
| 3506 | + buffer.add(g); |
---|
| 3507 | + } |
---|
3232 | 3508 | |
---|
3233 | | - g.add(GraphreeD.clipboard); |
---|
| 3509 | + public void Face(Object3D node, Face f) |
---|
| 3510 | + { |
---|
3234 | 3511 | |
---|
3235 | | - buffer.add(g); |
---|
3236 | | - } |
---|
| 3512 | + } |
---|
| 3513 | + } |
---|
| 3514 | + ); |
---|
3237 | 3515 | |
---|
3238 | 3516 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3239 | 3517 | } |
---|
3240 | 3518 | |
---|
3241 | | - GraphreeD.epsequal = epsequal; |
---|
3242 | | - |
---|
3243 | | - //buffer = null; |
---|
3244 | | - temprep = null; |
---|
3245 | | - nodes = null; |
---|
| 3519 | + GrafreeD.epsequal = epsequal; |
---|
3246 | 3520 | |
---|
3247 | 3521 | refreshContents(); |
---|
3248 | 3522 | } |
---|
3249 | | - |
---|
| 3523 | + |
---|
| 3524 | + void TextureVertices() |
---|
| 3525 | + { |
---|
| 3526 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 3527 | + { |
---|
| 3528 | + group.selection.get(i).Parse( |
---|
| 3529 | + new iParse() |
---|
| 3530 | + { |
---|
| 3531 | + public void Vertex(Object3D node, Vertex v) |
---|
| 3532 | + { |
---|
| 3533 | + cTexture tex = node.GetTextures(); |
---|
| 3534 | + String pigment = Object3D.GetPigment(tex); |
---|
| 3535 | + //String bump = Object3D.GetBump(tex); |
---|
| 3536 | + |
---|
| 3537 | + com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3538 | + |
---|
| 3539 | + double s = v.s; |
---|
| 3540 | + |
---|
| 3541 | + if (s == 1) |
---|
| 3542 | + s = 0; |
---|
| 3543 | + |
---|
| 3544 | + double t = v.t; |
---|
| 3545 | + |
---|
| 3546 | + if (t == 1) |
---|
| 3547 | + t = 0; |
---|
| 3548 | + |
---|
| 3549 | + int indexs = (int) (texturedata.getWidth() * s); |
---|
| 3550 | + int indext = (int) (texturedata.getHeight() * t); |
---|
| 3551 | + |
---|
| 3552 | + int index = indext * texturedata.getWidth() + indexs; |
---|
| 3553 | + |
---|
| 3554 | + java.nio.ByteBuffer bytebuf = (java.nio.ByteBuffer)texturedata.getBuffer(); |
---|
| 3555 | + |
---|
| 3556 | + int slide = bytebuf.capacity() / texturedata.getWidth() / texturedata.getHeight(); |
---|
| 3557 | + |
---|
| 3558 | + float scale = bytebuf.get(index*slide) & 0xFF; |
---|
| 3559 | + scale += bytebuf.get(index*slide+1) & 0xFF; |
---|
| 3560 | + scale += bytebuf.get(index*slide+2) & 0xFF; |
---|
| 3561 | + scale /= 3; |
---|
| 3562 | + |
---|
| 3563 | + scale /= 0xFF; |
---|
| 3564 | + // c'est quoi ca? scale /= 4; |
---|
| 3565 | + |
---|
| 3566 | + //v.AO = scale; |
---|
| 3567 | + |
---|
| 3568 | + v.x += v.norm.x * scale; |
---|
| 3569 | + v.y += v.norm.y * scale; |
---|
| 3570 | + v.z += v.norm.z * scale; |
---|
| 3571 | + } |
---|
| 3572 | + |
---|
| 3573 | + public void Face(Object3D node, Face f) |
---|
| 3574 | + { |
---|
| 3575 | + } |
---|
| 3576 | + } |
---|
| 3577 | + ); |
---|
| 3578 | + } |
---|
| 3579 | + |
---|
| 3580 | + refreshContents(); |
---|
| 3581 | + } |
---|
| 3582 | + |
---|
3250 | 3583 | void Align() |
---|
3251 | 3584 | { |
---|
| 3585 | + if (group.selection.size() == 0) |
---|
| 3586 | + return; |
---|
| 3587 | + |
---|
| 3588 | + cVector bbmin = new cVector(); |
---|
| 3589 | + cVector bbmax = new cVector(); |
---|
| 3590 | + |
---|
| 3591 | + group.selection.get(0).getBounds(bbmin, bbmax, true); |
---|
| 3592 | + |
---|
| 3593 | + double dx = bbmax.x - bbmin.x; |
---|
| 3594 | + double dy = bbmax.y - bbmin.y; |
---|
| 3595 | + double dz = bbmax.z - bbmin.z; |
---|
| 3596 | + |
---|
| 3597 | + double scale = Math.sqrt(dx*dx + dy*dy + dz*dz); |
---|
| 3598 | + |
---|
3252 | 3599 | for (int i=0; i<group.selection.size(); i++) |
---|
3253 | 3600 | { |
---|
3254 | 3601 | Object3D obj = group.selection.get(i); |
---|
3255 | 3602 | |
---|
3256 | | - LA.matTranslate(obj.toParent, i/2f, 0, 0); |
---|
3257 | | - LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0); |
---|
| 3603 | + LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
| 3604 | + LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
3258 | 3605 | } |
---|
3259 | 3606 | |
---|
3260 | 3607 | refreshContents(); |
---|
.. | .. |
---|
3267 | 3614 | // ref.SaveSupports(); |
---|
3268 | 3615 | // Object3D par = ref.parent; |
---|
3269 | 3616 | // ref.parent = null; |
---|
3270 | | -// Object3D lowres = (Object3D) GraphreeD.clone(ref); |
---|
| 3617 | +// Object3D lowres = (Object3D) GrafreeD.clone(ref); |
---|
3271 | 3618 | // ref.parent = par; |
---|
3272 | 3619 | // ref.RestoreSupports(); |
---|
3273 | 3620 | |
---|
.. | .. |
---|
3297 | 3644 | // lowres.SaveSupports(); |
---|
3298 | 3645 | // par = lowres.parent; |
---|
3299 | 3646 | // lowres.parent = null; |
---|
3300 | | -// Object3D newlow = (Object3D) GraphreeD.clone(lowres); |
---|
| 3647 | +// Object3D newlow = (Object3D) GrafreeD.clone(lowres); |
---|
3301 | 3648 | Object3D newlow = CloneObject(lowres, false); |
---|
3302 | 3649 | newlow.name = sn.switchobject.get(i).name; |
---|
3303 | 3650 | System.out.println(" pose#" + i + " = " + newlow); |
---|
.. | .. |
---|
3319 | 3666 | return; |
---|
3320 | 3667 | |
---|
3321 | 3668 | Object3D poses = group.selection.get(0); |
---|
3322 | | - Object3D ref = GraphreeD.clipboard.get(0); |
---|
| 3669 | + Object3D ref = GrafreeD.clipboard.get(0); |
---|
3323 | 3670 | |
---|
3324 | 3671 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3325 | 3672 | |
---|
.. | .. |
---|
3488 | 3835 | group.selection.RelinkToSupport(); // july 2014 |
---|
3489 | 3836 | System.out.println("DONE."); |
---|
3490 | 3837 | refreshContents(); |
---|
3491 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 3838 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3492 | 3839 | } |
---|
3493 | 3840 | |
---|
3494 | 3841 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
3513 | 3860 | |
---|
3514 | 3861 | void ClipMesh() |
---|
3515 | 3862 | { |
---|
3516 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 3863 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
3517 | 3864 | { |
---|
3518 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 3865 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
3519 | 3866 | |
---|
3520 | 3867 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3521 | 3868 | content = ((cGroup)content).get(0); |
---|
3522 | 3869 | |
---|
3523 | 3870 | // for (int i=0; i<group.selection.size(); i++) |
---|
3524 | 3871 | // { |
---|
3525 | | -// group.selection.get(i).ClipMesh(GraphreeD.clipboard); |
---|
| 3872 | +// group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3526 | 3873 | // } |
---|
3527 | | - group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3874 | + group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3528 | 3875 | } |
---|
3529 | | -// group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3876 | +// group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3530 | 3877 | System.out.println("DONE."); |
---|
3531 | 3878 | refreshContents(); |
---|
3532 | 3879 | } |
---|
.. | .. |
---|
3764 | 4111 | System.err.println("info : " + child.GetPath()); |
---|
3765 | 4112 | } |
---|
3766 | 4113 | } |
---|
3767 | | - else |
---|
3768 | | - { |
---|
3769 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
3770 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
3771 | | - System.err.println("info : " + group.GetPath()); |
---|
3772 | | - } |
---|
| 4114 | +// else |
---|
| 4115 | +// { |
---|
| 4116 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4117 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4118 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4119 | +// } |
---|
3773 | 4120 | |
---|
3774 | 4121 | objEditor.SetText(); // jan 2014 |
---|
3775 | 4122 | |
---|
3776 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4123 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
3777 | 4124 | CameraPane.flash = true; |
---|
3778 | 4125 | |
---|
3779 | 4126 | if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
3780 | 4127 | // a camera |
---|
3781 | 4128 | { |
---|
3782 | 4129 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
3783 | | - CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
3784 | | - // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera; |
---|
3785 | | - // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera; |
---|
| 4130 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4131 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4132 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
3786 | 4133 | } |
---|
3787 | 4134 | |
---|
3788 | 4135 | refreshContents(); |
---|
.. | .. |
---|
3864 | 4211 | { |
---|
3865 | 4212 | if (group.selection.isEmpty()) |
---|
3866 | 4213 | return; |
---|
3867 | | - GraphreeD.clipboardIsTempGroup = false; |
---|
| 4214 | + GrafreeD.clipboardIsTempGroup = false; |
---|
3868 | 4215 | Composite tGroup = null; |
---|
3869 | 4216 | if (group.selection.size() > 0) // 1) |
---|
3870 | 4217 | { |
---|
3871 | 4218 | tGroup = new cGroup(); |
---|
3872 | | - GraphreeD.clipboardIsTempGroup = true; |
---|
| 4219 | + GrafreeD.clipboardIsTempGroup = true; |
---|
3873 | 4220 | } |
---|
3874 | 4221 | |
---|
3875 | 4222 | if (cut) |
---|
.. | .. |
---|
3909 | 4256 | //System.out.println("cut " + child); |
---|
3910 | 4257 | //System.out.println("parent = " + child.parent); |
---|
3911 | 4258 | // tmp.addChild(child); |
---|
3912 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4259 | + if (GrafreeD.clipboardIsTempGroup) |
---|
3913 | 4260 | tGroup.add/*Child*/(tmp); |
---|
3914 | 4261 | else |
---|
3915 | | - GraphreeD.clipboard = tmp; |
---|
| 4262 | + GrafreeD.clipboard = tmp; |
---|
3916 | 4263 | } |
---|
3917 | 4264 | else |
---|
3918 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4265 | + if (GrafreeD.clipboardIsTempGroup) |
---|
3919 | 4266 | tGroup.add/*Child*/(child); |
---|
3920 | 4267 | else |
---|
3921 | | - GraphreeD.clipboard = child; |
---|
| 4268 | + GrafreeD.clipboard = child; |
---|
3922 | 4269 | } |
---|
3923 | 4270 | |
---|
3924 | 4271 | //ResetModel(); |
---|
.. | .. |
---|
3950 | 4297 | //System.out.println("cut " + elem); |
---|
3951 | 4298 | //System.out.println("parent = " + elem.parent); |
---|
3952 | 4299 | // tmp.addChild(elem); |
---|
3953 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4300 | + if (GrafreeD.clipboardIsTempGroup) |
---|
3954 | 4301 | tGroup.add/*Child*/(tmp); |
---|
3955 | 4302 | else |
---|
3956 | | - GraphreeD.clipboard = tmp; |
---|
| 4303 | + GrafreeD.clipboard = tmp; |
---|
3957 | 4304 | } |
---|
3958 | 4305 | else |
---|
3959 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4306 | + if (GrafreeD.clipboardIsTempGroup) |
---|
3960 | 4307 | tGroup.add/*Child*/(child); |
---|
3961 | 4308 | else |
---|
3962 | | - GraphreeD.clipboard = child; |
---|
| 4309 | + GrafreeD.clipboard = child; |
---|
3963 | 4310 | } |
---|
3964 | 4311 | |
---|
3965 | 4312 | } |
---|
3966 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
3967 | | - GraphreeD.clipboard = tGroup; |
---|
| 4313 | + if (GrafreeD.clipboardIsTempGroup) |
---|
| 4314 | + GrafreeD.clipboard = tGroup; |
---|
3968 | 4315 | if (cut) |
---|
3969 | 4316 | { |
---|
3970 | 4317 | ResetModel(); |
---|
.. | .. |
---|
3974 | 4321 | |
---|
3975 | 4322 | void paste(boolean expand) |
---|
3976 | 4323 | { |
---|
3977 | | - // if (GraphreeD.clipboard == null) |
---|
| 4324 | + // if (GrafreeD.clipboard == null) |
---|
3978 | 4325 | // return; |
---|
3979 | 4326 | boolean first = true; |
---|
3980 | 4327 | |
---|
3981 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4328 | + if (GrafreeD.clipboardIsTempGroup) |
---|
3982 | 4329 | { |
---|
3983 | 4330 | Composite temp; |
---|
3984 | 4331 | |
---|
.. | .. |
---|
3989 | 4336 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
3990 | 4337 | */ |
---|
3991 | 4338 | Object3D elem; |
---|
3992 | | - for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4339 | + for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
3993 | 4340 | { |
---|
3994 | 4341 | Object3D child = (Object3D)e.nextElement(); |
---|
3995 | 4342 | |
---|
.. | .. |
---|
4003 | 4350 | else |
---|
4004 | 4351 | elem = child.deepCopy(); // ? |
---|
4005 | 4352 | child.parent = keepparent; |
---|
4006 | | - //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
| 4353 | + //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
4007 | 4354 | // elem = elem.get(0); |
---|
4008 | 4355 | makeSomething(elem, true); // ?? first); |
---|
4009 | 4356 | //group.addChild(elem); |
---|
.. | .. |
---|
4023 | 4370 | //Object3D cb = Applet3D.clipboard; |
---|
4024 | 4371 | //temp.addChild(cb); |
---|
4025 | 4372 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4026 | | - assert(GraphreeD.clipboard.parent == null); |
---|
4027 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
4028 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4029 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
4030 | | - makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy()); |
---|
| 4373 | + assert(GrafreeD.clipboard.parent == null); |
---|
| 4374 | + Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
| 4375 | + GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4376 | + if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
| 4377 | + makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
4031 | 4378 | else |
---|
4032 | | - makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy()); |
---|
4033 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 4379 | + makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
| 4380 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
4034 | 4381 | } |
---|
4035 | 4382 | |
---|
4036 | 4383 | ResetModel(); |
---|
.. | .. |
---|
4039 | 4386 | |
---|
4040 | 4387 | void pasteInto(boolean copyit) |
---|
4041 | 4388 | { |
---|
4042 | | -// if (GraphreeD.clipboard == null) |
---|
| 4389 | +// if (GrafreeD.clipboard == null) |
---|
4043 | 4390 | // return; |
---|
4044 | 4391 | |
---|
4045 | 4392 | if (group.selection.size() != 1) |
---|
.. | .. |
---|
4072 | 4419 | { |
---|
4073 | 4420 | boolean first = true; |
---|
4074 | 4421 | |
---|
4075 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4422 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4076 | 4423 | { |
---|
4077 | | - Composite temp = (Composite)GraphreeD.clipboard; |
---|
| 4424 | + Composite temp = (Composite)GrafreeD.clipboard; |
---|
4078 | 4425 | Object3D copy; |
---|
4079 | 4426 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4080 | 4427 | { |
---|
.. | .. |
---|
4084 | 4431 | } |
---|
4085 | 4432 | } else |
---|
4086 | 4433 | { |
---|
4087 | | - linkSomething(GraphreeD.clipboard); //.get(0)); |
---|
| 4434 | + linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
4088 | 4435 | } |
---|
4089 | 4436 | } |
---|
4090 | 4437 | } |
---|
.. | .. |
---|
4276 | 4623 | makeSomething(csg); |
---|
4277 | 4624 | } |
---|
4278 | 4625 | |
---|
| 4626 | + void Ungroup(Object3D g) |
---|
| 4627 | + { |
---|
| 4628 | + if (g instanceof HiddenObject) |
---|
| 4629 | + { |
---|
| 4630 | + HiddenObject h = (HiddenObject) g; |
---|
| 4631 | + |
---|
| 4632 | + for (int i=0; i<h.ActualSize(); i++) |
---|
| 4633 | + { |
---|
| 4634 | + objEditor.makeSomething(h.get(i), false); |
---|
| 4635 | + } |
---|
| 4636 | + } |
---|
| 4637 | + else |
---|
| 4638 | + { |
---|
| 4639 | + for (int i=0; i<g.Size(); i++) |
---|
| 4640 | + { |
---|
| 4641 | + objEditor.makeSomething(g.get(i), false); |
---|
| 4642 | + } |
---|
| 4643 | + } |
---|
| 4644 | + } |
---|
| 4645 | + |
---|
4279 | 4646 | void ungroup() |
---|
4280 | 4647 | { |
---|
4281 | 4648 | /* |
---|
.. | .. |
---|
4471 | 4838 | |
---|
4472 | 4839 | void ImportGFD() |
---|
4473 | 4840 | { |
---|
4474 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD); |
---|
| 4841 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4475 | 4842 | browser.show(); |
---|
4476 | 4843 | String filename = browser.getFile(); |
---|
4477 | 4844 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4509 | 4876 | |
---|
4510 | 4877 | void ImportVRMLX3D() |
---|
4511 | 4878 | { |
---|
4512 | | - if (GraphreeD.standAlone) |
---|
| 4879 | + if (GrafreeD.standAlone) |
---|
4513 | 4880 | { |
---|
4514 | 4881 | /**/ |
---|
4515 | 4882 | FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
.. | .. |
---|
4526 | 4893 | |
---|
4527 | 4894 | String GetFile(String dialogName) |
---|
4528 | 4895 | { |
---|
4529 | | - if (GraphreeD.standAlone) |
---|
| 4896 | + if (GrafreeD.standAlone) |
---|
4530 | 4897 | { |
---|
4531 | 4898 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4532 | 4899 | browser.show(); |
---|
.. | .. |
---|
4635 | 5002 | private MenuItem resetsupportItem; |
---|
4636 | 5003 | private MenuItem resetreferencesItem; |
---|
4637 | 5004 | private MenuItem linkverticesItem; |
---|
| 5005 | + private MenuItem relinkverticesItem; |
---|
4638 | 5006 | private MenuItem setMasterItem; |
---|
4639 | 5007 | private MenuItem resetMeshItem; |
---|
4640 | 5008 | private MenuItem stepAllItem; |
---|
.. | .. |
---|
4653 | 5021 | private MenuItem clearItem; |
---|
4654 | 5022 | private MenuItem clearAllItem; |
---|
4655 | 5023 | private MenuItem genUVItem; |
---|
| 5024 | + private MenuItem genNormalsMESHItem; |
---|
4656 | 5025 | private MenuItem genNormalsCADItem; |
---|
4657 | 5026 | private MenuItem genNormalsORGANItem; |
---|
| 5027 | + private MenuItem genNormalsMINEItem; |
---|
4658 | 5028 | private MenuItem stripifyItem; |
---|
4659 | 5029 | private MenuItem unstripifyItem; |
---|
4660 | 5030 | private MenuItem trimItem; |
---|
.. | .. |
---|
4696 | 5066 | private MenuItem resetCentroidItem; |
---|
4697 | 5067 | private MenuItem transformgeometryItem; |
---|
4698 | 5068 | private MenuItem resetTransformItem; |
---|
| 5069 | + private MenuItem hideItem; |
---|
4699 | 5070 | private MenuItem grabItem; |
---|
4700 | 5071 | private MenuItem backItem; |
---|
4701 | 5072 | private MenuItem frontItem; |
---|
.. | .. |
---|
4716 | 5087 | |
---|
4717 | 5088 | private MenuItem resetParentItem; |
---|
4718 | 5089 | private MenuItem repairParentItem; |
---|
| 5090 | + private MenuItem repairShadowItem; |
---|
4719 | 5091 | private MenuItem sortbysizeItem; |
---|
4720 | 5092 | private MenuItem sortbynameItem; |
---|
4721 | 5093 | |
---|
.. | .. |
---|
4728 | 5100 | private MenuItem particleItem; |
---|
4729 | 5101 | private MenuItem ragdollItem; |
---|
4730 | 5102 | private MenuItem ragdoll2Item; |
---|
| 5103 | + private MenuItem heightFieldItem; |
---|
| 5104 | + private MenuItem textureFieldItem; |
---|
4731 | 5105 | private MenuItem gridItem; |
---|
4732 | 5106 | private MenuItem rectoidItem; |
---|
4733 | 5107 | private MenuItem ellipsoidItem; |
---|
4734 | 5108 | private MenuItem coneItem; |
---|
4735 | 5109 | private MenuItem torusItem; |
---|
4736 | 5110 | private MenuItem superItem; |
---|
| 5111 | + private MenuItem kleinItem; |
---|
4737 | 5112 | private MenuItem blobItem; |
---|
4738 | 5113 | private MenuItem latheItem; |
---|
4739 | 5114 | private MenuItem bezierItem; |
---|
.. | .. |
---|
4746 | 5121 | private MenuItem csgItem; |
---|
4747 | 5122 | private MenuItem templateItem; |
---|
4748 | 5123 | private MenuItem textureItem; |
---|
| 5124 | + private MenuItem billboardItem; |
---|
4749 | 5125 | private MenuItem shadowXItem; |
---|
4750 | 5126 | private MenuItem shadowYItem; |
---|
4751 | 5127 | private MenuItem shadowZItem; |
---|