.. | .. |
---|
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 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 242 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
235 | 243 | randomItem.addActionListener(this); |
---|
236 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
237 | | - physicsItem.addActionListener(this); |
---|
238 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
239 | | - frameselectorItem.addActionListener(this); |
---|
240 | 244 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
241 | 245 | switchGeoItem.addActionListener(this); |
---|
242 | 246 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
243 | 247 | switchTransfoItem.addActionListener(this); |
---|
| 248 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 249 | + physicsItem.addActionListener(this); |
---|
| 250 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 251 | + frameselectorItem.addActionListener(this); |
---|
244 | 252 | morphItem = menu.add(new MenuItem("Morph")); |
---|
245 | 253 | morphItem.addActionListener(this); |
---|
246 | 254 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
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); |
---|
| 443 | + oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 444 | + fastCB.setToolTipText("Fast mode"); |
---|
434 | 445 | fastCB.addItemListener(this); |
---|
435 | | - oe.aConstraints.gridx += 1; |
---|
436 | | - oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints); |
---|
437 | | - slowCB.addItemListener(this); |
---|
438 | | - oe.aConstraints.gridx += 1; |
---|
439 | | - oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints); |
---|
440 | | - boxCB.addItemListener(this); |
---|
441 | | - |
---|
442 | | -// oe.aConstraints.gridx += 1; |
---|
443 | | -// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints); |
---|
444 | | -// speakerMocapCB.addItemListener(this); |
---|
445 | | - |
---|
446 | | - if (false) |
---|
447 | | - { |
---|
448 | | - // handled in scripts |
---|
449 | | - oe.aConstraints.gridx += 1; |
---|
450 | | - oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints); |
---|
451 | | - speakerCameraCB.addItemListener(this); |
---|
452 | | - |
---|
453 | | - oe.aConstraints.gridx += 1; |
---|
454 | | - oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints); |
---|
455 | | - speakerFocusCB.addItemListener(this); |
---|
456 | | - |
---|
457 | | - oe.aConstraints.gridx += 1; |
---|
458 | | - oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints); |
---|
459 | | - smoothfocusCB.addItemListener(this); |
---|
460 | | - } |
---|
461 | | - |
---|
462 | | -//oe.aConstraints.gridx += 1; |
---|
463 | | -//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints); |
---|
464 | | -// debugCB.addItemListener(this); |
---|
465 | | - |
---|
466 | | - oe.aConstraints.gridx += 1; |
---|
467 | | - oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints); |
---|
468 | | - oeilCB.addItemListener(this); |
---|
469 | | - |
---|
470 | | - oe.aConstraints.gridx += 1; |
---|
471 | | - oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints); |
---|
472 | | - lookAtCB.addItemListener(this); |
---|
473 | | - |
---|
474 | | - oe.aConstraints.gridx += 1; |
---|
475 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints); |
---|
| 446 | + |
---|
| 447 | + oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 448 | + trackCB.setToolTipText("Enable tracking"); |
---|
476 | 449 | trackCB.addItemListener(this); |
---|
477 | 450 | |
---|
478 | | - oe.aConstraints.gridx += 1; |
---|
479 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 451 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 452 | + screenfitButton.setToolTipText("Screen fit"); |
---|
480 | 453 | screenfitButton.addActionListener(this); |
---|
481 | | - oe.aConstraints.gridx += 1; |
---|
| 454 | + |
---|
482 | 455 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
483 | 456 | // screenfitpointButton.addActionListener(this); |
---|
484 | | -// oe.aConstraints.gridx += 1; |
---|
485 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
486 | | - snapobjectButton.addActionListener(this); |
---|
487 | | - oe.aConstraints.gridx += 1; |
---|
488 | 457 | |
---|
489 | | - //aConstraints.gridx = 0; |
---|
490 | | - //aConstraints.gridy += 1; |
---|
491 | | - oe.aConstraints.weighty = 0; |
---|
492 | | - oe.aConstraints.gridwidth = 1; |
---|
493 | | - |
---|
494 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
| 458 | + if (Globals.ADVANCED) |
---|
| 459 | + { |
---|
| 460 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 461 | + snapobjectButton.addActionListener(this); |
---|
| 462 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 463 | + } |
---|
| 464 | + |
---|
| 465 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 466 | + flashSelectionButton.setToolTipText("Show selection"); |
---|
495 | 467 | flashSelectionButton.addActionListener(this); |
---|
496 | | - oe.aConstraints.gridx += 1; |
---|
497 | | - oe.aConstraints.weighty = 0; |
---|
498 | | - oe.aConstraints.gridwidth = 1; |
---|
499 | 468 | |
---|
500 | | - // |
---|
501 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 469 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
| 470 | + |
---|
| 471 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 472 | + twoButton.setToolTipText("Show center view only"); |
---|
502 | 473 | twoButton.addActionListener(this); |
---|
503 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 474 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
504 | 475 | fourButton.addActionListener(this); |
---|
505 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 476 | + fourButton.setToolTipText("Show left panel only"); |
---|
| 477 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 478 | + sixButton.setToolTipText("2-column layout left"); |
---|
506 | 479 | sixButton.addActionListener(this); |
---|
507 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 480 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 481 | + threeButton.setToolTipText("2-column layout right"); |
---|
508 | 482 | threeButton.addActionListener(this); |
---|
509 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 483 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 484 | + sevenButton.setToolTipText("3-column layout"); |
---|
510 | 485 | sevenButton.addActionListener(this); |
---|
511 | 486 | // |
---|
512 | 487 | |
---|
513 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints); |
---|
| 488 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 489 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
514 | 490 | rootButton.addActionListener(this); |
---|
515 | | - oe.aConstraints.gridx += 1; |
---|
516 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 491 | + |
---|
| 492 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 493 | + closeButton.setToolTipText("Close tab"); |
---|
517 | 494 | closeButton.addActionListener(this); |
---|
518 | 495 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
519 | 496 | //clearButton.addActionListener(this); |
---|
520 | | - oe.aConstraints.gridx += 1; |
---|
521 | 497 | |
---|
522 | | - oe.aConstraints.gridx = 1; // |
---|
523 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
| 498 | + cGridBag commandsPanel = new cGridBag(); |
---|
| 499 | + |
---|
| 500 | + commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 501 | + editButton.setToolTipText("Edit selection"); |
---|
524 | 502 | editButton.addActionListener(this); |
---|
525 | | - oe.aConstraints.gridx += 1; |
---|
526 | | - oe.aConstraints.weighty = 0; |
---|
527 | | - oe.aConstraints.gridwidth = 1; |
---|
528 | 503 | |
---|
529 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 504 | + commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 505 | + uneditButton.setToolTipText("Unedit selection"); |
---|
530 | 506 | uneditButton.addActionListener(this); |
---|
531 | 507 | |
---|
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); |
---|
| 508 | + commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 509 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
537 | 510 | clearPanelButton.addActionListener(this); |
---|
538 | 511 | |
---|
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); |
---|
| 512 | + commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 513 | + allParamsButton.setToolTipText("All params??"); |
---|
544 | 514 | allParamsButton.addActionListener(this); |
---|
545 | 515 | |
---|
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); |
---|
| 516 | + commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 517 | + unselectButton.setToolTipText("Unselect"); |
---|
551 | 518 | unselectButton.addActionListener(this); |
---|
552 | 519 | |
---|
| 520 | + commandsPanel.preferredHeight = 1; |
---|
| 521 | + |
---|
| 522 | + oe.treePanel.add(commandsPanel); |
---|
| 523 | + oe.treePanel.Return(); |
---|
| 524 | + |
---|
553 | 525 | // oe.aConstraints.gridx += 1; |
---|
554 | 526 | // oe.aConstraints.weighty = 0; |
---|
555 | 527 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
561 | 533 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
562 | 534 | // gcButton.addActionListener(this); |
---|
563 | 535 | |
---|
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; |
---|
| 536 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 537 | + |
---|
| 538 | + JScrollPane jSP; |
---|
575 | 539 | //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); |
---|
| 540 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
577 | 541 | ResetModel(); |
---|
578 | | - oe.aConstraints.weighty = 0.5; |
---|
579 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
580 | | - oe.aConstraints.gridy += 1; |
---|
581 | | - oe.aConstraints.gridwidth = 1; |
---|
| 542 | + |
---|
| 543 | + oe.treePanel.add(jSPPanel); |
---|
| 544 | + oe.treePanel.Return(); |
---|
582 | 545 | |
---|
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); |
---|
| 546 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 547 | + |
---|
| 548 | + copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 549 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
587 | 550 | colorCB.addItemListener(this); |
---|
588 | | - oe.aConstraints.gridx += 2; |
---|
589 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
| 551 | + |
---|
| 552 | + copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 553 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
590 | 554 | materialCB.addItemListener(this); |
---|
591 | | - oe.aConstraints.gridx += 2; |
---|
592 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
| 555 | + |
---|
| 556 | + copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 557 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
593 | 558 | textureCB.addItemListener(this); |
---|
594 | 559 | |
---|
595 | | - oe.aConstraints.gridx = 0; |
---|
596 | | - oe.aConstraints.gridy += 1; |
---|
| 560 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 561 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 562 | + oe.treePanel.Return(); |
---|
597 | 563 | |
---|
| 564 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 565 | +// mainPanel.setResizeWeight(0.5); |
---|
| 566 | + |
---|
598 | 567 | //jList.addListSelectionListener(this); |
---|
599 | 568 | oe.jTree.addTreeSelectionListener(this); |
---|
600 | 569 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
616 | 585 | radio.layout = sevenButton; |
---|
617 | 586 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
618 | 587 | } |
---|
| 588 | + |
---|
| 589 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 590 | + { |
---|
| 591 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 592 | + supportCB.setToolTipText("Enabled rigging"); |
---|
| 593 | + supportCB.addItemListener(this); |
---|
| 594 | + |
---|
| 595 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 596 | + // localCB.addItemListener(this); |
---|
| 597 | + |
---|
| 598 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
| 599 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 600 | + crowdCB.addItemListener(this); |
---|
| 601 | + |
---|
| 602 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
| 603 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 604 | + smoothCB.addItemListener(this); |
---|
| 605 | + |
---|
| 606 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 607 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 608 | + slowCB.addItemListener(this); |
---|
| 609 | + |
---|
| 610 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
| 611 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 612 | + boxCB.addItemListener(this); |
---|
| 613 | + |
---|
| 614 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
| 615 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 616 | + zoomBoxCB.addItemListener(this); |
---|
| 617 | + |
---|
| 618 | +// constraints.gridy += 1; |
---|
| 619 | +// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
| 620 | +// speakerMocapCB.addItemListener(this); |
---|
| 621 | + |
---|
| 622 | + if (false) |
---|
| 623 | + { |
---|
| 624 | + // handled in scripts |
---|
| 625 | + //constraints.gridy += 1; |
---|
| 626 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
| 627 | + speakerCameraCB.addItemListener(this); |
---|
| 628 | + |
---|
| 629 | + //constraints.gridy += 1; |
---|
| 630 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
| 631 | + speakerFocusCB.addItemListener(this); |
---|
| 632 | + |
---|
| 633 | + //constraints.gridy += 1; |
---|
| 634 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 635 | + smoothfocusCB.addItemListener(this); |
---|
| 636 | + } |
---|
| 637 | + |
---|
| 638 | +//constraints.gridx += 1; |
---|
| 639 | +//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
| 640 | +// debugCB.addItemListener(this); |
---|
| 641 | + |
---|
| 642 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 643 | + oeilCB.addItemListener(this); |
---|
| 644 | + |
---|
| 645 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
| 646 | + lookAtCB.setToolTipText("Look-at target"); |
---|
| 647 | + lookAtCB.addItemListener(this); |
---|
| 648 | + |
---|
| 649 | + cGridBag fill = new cGridBag(); |
---|
| 650 | + |
---|
| 651 | + fill.preferredHeight = 200; |
---|
| 652 | + |
---|
| 653 | + panel.add(fill); |
---|
| 654 | + |
---|
| 655 | + } |
---|
619 | 656 | |
---|
620 | 657 | void EditObject(Object3D obj) |
---|
621 | 658 | { |
---|
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(); |
---|
| 659 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 660 | + radioButton.SetObject(obj); |
---|
| 661 | + radioButton.layout = sevenButton; |
---|
| 662 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 663 | + radioButton.addActionListener(this); |
---|
| 664 | + radioPanel.add(radioButton); |
---|
| 665 | + buttonGroup.add(radioButton); |
---|
| 666 | + radioButton.doClick(); |
---|
630 | 667 | } |
---|
631 | 668 | void SetupViews(ObjEditor oe) |
---|
632 | 669 | { |
---|
.. | .. |
---|
646 | 683 | JCheckBox fastCB; |
---|
647 | 684 | JCheckBox slowCB; |
---|
648 | 685 | JCheckBox boxCB; |
---|
| 686 | + JCheckBox zoomBoxCB; |
---|
649 | 687 | JCheckBox trackCB; |
---|
650 | 688 | JCheckBox smoothfocusCB; |
---|
651 | 689 | // JCheckBox speakerMocapCB; |
---|
.. | .. |
---|
688 | 726 | dropAttributes |= Object3D.TEXTURE; |
---|
689 | 727 | else |
---|
690 | 728 | dropAttributes &= ~Object3D.TEXTURE; |
---|
691 | | - } |
---|
692 | | - else if(e.getSource() == liveCB) |
---|
| 729 | + } else if(e.getSource() == liveCB) |
---|
693 | 730 | { |
---|
694 | 731 | cameraView.ToggleLive(); |
---|
695 | 732 | } |
---|
.. | .. |
---|
726 | 763 | Recompile(); |
---|
727 | 764 | cameraView.repaint(); |
---|
728 | 765 | // refreshContents(); |
---|
| 766 | + } |
---|
| 767 | + else if(e.getSource() == zoomBoxCB) |
---|
| 768 | + { |
---|
| 769 | + cameraView.ToggleZoomBoxMode(); |
---|
729 | 770 | } |
---|
730 | 771 | else if(e.getSource() == smoothfocusCB) |
---|
731 | 772 | { |
---|
.. | .. |
---|
1002 | 1043 | |
---|
1003 | 1044 | void buildCreateMenu(Menu menu) |
---|
1004 | 1045 | { |
---|
| 1046 | + //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
| 1047 | + //heightFieldItem.addActionListener(this); |
---|
1005 | 1048 | gridItem = menu.add(new MenuItem("Grid")); |
---|
1006 | 1049 | gridItem.addActionListener(this); |
---|
1007 | 1050 | rectoidItem = menu.add(new MenuItem("Box")); |
---|
.. | .. |
---|
1014 | 1057 | torusItem.addActionListener(this); |
---|
1015 | 1058 | superItem = menu.add(new MenuItem("Superellipsoid")); |
---|
1016 | 1059 | superItem.addActionListener(this); |
---|
| 1060 | + kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
| 1061 | + kleinItem.addActionListener(this); |
---|
1017 | 1062 | particleItem = menu.add(new MenuItem("Particle system")); |
---|
1018 | 1063 | particleItem.addActionListener(this); |
---|
1019 | 1064 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1048 | 1093 | doubleItem.addActionListener(this); |
---|
1049 | 1094 | tripleItem = menu.add(new MenuItem("Trident")); |
---|
1050 | 1095 | 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 | 1096 | } |
---|
1061 | 1097 | |
---|
1062 | 1098 | void buildToolsMenu(Menu menu) |
---|
1063 | 1099 | { |
---|
1064 | 1100 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1065 | 1101 | animationItem.addItemListener(this); |
---|
1066 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1102 | + animationItem.setState(Globals.ANIMATION); |
---|
1067 | 1103 | |
---|
1068 | 1104 | menu.add("-"); |
---|
1069 | 1105 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1070 | 1106 | parseverticesItem.addActionListener(this); |
---|
| 1107 | + textureFieldItem = menu.add(new MenuItem("Texture Field")); |
---|
| 1108 | + textureFieldItem.addActionListener(this); |
---|
1071 | 1109 | alignItem = menu.add(new MenuItem("Align")); |
---|
1072 | 1110 | alignItem.addActionListener(this); |
---|
1073 | 1111 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
.. | .. |
---|
1094 | 1132 | resetParentItem.addActionListener(this); |
---|
1095 | 1133 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1096 | 1134 | repairParentItem.addActionListener(this); |
---|
| 1135 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1136 | + repairShadowItem.addActionListener(this); |
---|
1097 | 1137 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1098 | 1138 | invariantsItem.addActionListener(this); |
---|
1099 | 1139 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1429 | 1469 | |
---|
1430 | 1470 | void Overwrite(int mask) |
---|
1431 | 1471 | { |
---|
1432 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1472 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1433 | 1473 | { |
---|
1434 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1474 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
1435 | 1475 | |
---|
1436 | 1476 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1437 | 1477 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1454 | 1494 | // |
---|
1455 | 1495 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1456 | 1496 | { |
---|
| 1497 | + Object source = event.getSource(); |
---|
1457 | 1498 | /* |
---|
1458 | 1499 | if (event.getSource() == nameField) |
---|
1459 | 1500 | { |
---|
.. | .. |
---|
1465 | 1506 | } |
---|
1466 | 1507 | else |
---|
1467 | 1508 | */ |
---|
1468 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1509 | + if (source == lookAtItem || source == lookFromItem) |
---|
1469 | 1510 | { |
---|
1470 | 1511 | ScreenFit(); |
---|
1471 | 1512 | } else |
---|
1472 | | - if (event.getSource() == switchItem) |
---|
| 1513 | + if (source == switchItem) |
---|
1473 | 1514 | { |
---|
1474 | 1515 | cVector v1 = new cVector(); |
---|
1475 | 1516 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1478 | 1519 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1479 | 1520 | objEditor.cameraView.repaint(); |
---|
1480 | 1521 | } else |
---|
1481 | | - if (event.getSource() == rectoidItem) |
---|
| 1522 | + if (source == rectoidItem) |
---|
1482 | 1523 | { |
---|
1483 | 1524 | makeSomething(new Box()); |
---|
1484 | 1525 | } else |
---|
1485 | | - if (event.getSource() == particleItem) |
---|
| 1526 | + if (source == particleItem) |
---|
1486 | 1527 | { |
---|
1487 | 1528 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1488 | 1529 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1503 | 1544 | applyExample(particleGeom, "SMOKE"); |
---|
1504 | 1545 | makeSomething(particleGeom); |
---|
1505 | 1546 | } else |
---|
1506 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1547 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1507 | 1548 | { |
---|
1508 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1549 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1509 | 1550 | |
---|
1510 | 1551 | ragdoll.toParent = LA.newMatrix(); |
---|
1511 | 1552 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1521 | 1562 | makeSomething(ragdoll); |
---|
1522 | 1563 | //makeSomething(new VehicleDemo()); |
---|
1523 | 1564 | } else |
---|
1524 | | - if (event.getSource() == gridItem) |
---|
| 1565 | + /* |
---|
| 1566 | + */ |
---|
| 1567 | + if (source == heightFieldItem) |
---|
| 1568 | + { |
---|
| 1569 | + Object3D obj = new Object3D(); |
---|
| 1570 | + |
---|
| 1571 | + obj.CreateMaterial(); |
---|
| 1572 | + obj.bRep = new BoundaryRep(); |
---|
| 1573 | + |
---|
| 1574 | + obj.bRep.CreateMesh(new iHeightField() |
---|
| 1575 | + { |
---|
| 1576 | + public double f(double x, double y) |
---|
| 1577 | + { |
---|
| 1578 | + // The Mandelbrot set is represented by coloring |
---|
| 1579 | + // each point (x,y) according to the number of |
---|
| 1580 | + // iterations it takes before the while loop in |
---|
| 1581 | + // this method ends. For points that are actually |
---|
| 1582 | + // in the Mandelbrot set, or very close to it, the |
---|
| 1583 | + // count will reach the maximum value, 80. These |
---|
| 1584 | + // points will be colored purple. All other colors |
---|
| 1585 | + // represent points that are definitely NOT in the set. |
---|
| 1586 | + x -= 600; |
---|
| 1587 | + y -= 500; |
---|
| 1588 | + x /= 200; |
---|
| 1589 | + y /= 200; |
---|
| 1590 | + int count = 0; |
---|
| 1591 | + double zx = x; |
---|
| 1592 | + double zy = y; |
---|
| 1593 | + while (count < 80 && Math.abs(x) < 100 && Math.abs(zy) < 100) { |
---|
| 1594 | + double new_zx = zx*zx - zy*zy + x; |
---|
| 1595 | + zy = 2*zx*zy + y; |
---|
| 1596 | + zx = new_zx; |
---|
| 1597 | + count++; |
---|
| 1598 | + } |
---|
| 1599 | + return count; // Math.sqrt(count); |
---|
| 1600 | + } |
---|
| 1601 | + }, 1000,1000); |
---|
| 1602 | + |
---|
| 1603 | + makeSomething(obj); |
---|
| 1604 | + } else |
---|
| 1605 | + if (source == gridItem) |
---|
1525 | 1606 | { |
---|
1526 | 1607 | makeSomething(new Grid()); |
---|
1527 | 1608 | } else |
---|
1528 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1609 | + if (source == ellipsoidItem) |
---|
1529 | 1610 | { |
---|
1530 | 1611 | makeSomething(new Sphere()); |
---|
1531 | 1612 | } else |
---|
1532 | | - if (event.getSource() == coneItem) |
---|
| 1613 | + if (source == coneItem) |
---|
1533 | 1614 | { |
---|
1534 | 1615 | makeSomething(new Cone()); |
---|
1535 | 1616 | } else |
---|
1536 | | - if (event.getSource() == torusItem) |
---|
| 1617 | + if (source == torusItem) |
---|
1537 | 1618 | { |
---|
1538 | 1619 | makeSomething(new Torus()); |
---|
1539 | 1620 | } else |
---|
1540 | | - if (event.getSource() == superItem) |
---|
| 1621 | + if (source == superItem) |
---|
1541 | 1622 | { |
---|
1542 | 1623 | makeSomething(new Superellipsoid()); |
---|
1543 | 1624 | } else |
---|
1544 | | - if (event.getSource() == blobItem) |
---|
| 1625 | + if (source == kleinItem) |
---|
| 1626 | + { |
---|
| 1627 | + makeSomething(new Klein()); |
---|
| 1628 | + } else |
---|
| 1629 | + if (source == blobItem) |
---|
1545 | 1630 | { |
---|
1546 | 1631 | Blob blob = new Blob(); |
---|
1547 | 1632 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1549 | 1634 | //blob.retile(); |
---|
1550 | 1635 | makeSomething(blob); |
---|
1551 | 1636 | } else |
---|
1552 | | - if (event.getSource() == latheItem) |
---|
| 1637 | + if (source == latheItem) |
---|
1553 | 1638 | { |
---|
1554 | 1639 | makeSomething(new Lathe()); |
---|
1555 | 1640 | } else |
---|
1556 | | - if (event.getSource() == bezierItem) |
---|
| 1641 | + if (source == bezierItem) |
---|
1557 | 1642 | { |
---|
1558 | 1643 | makeSomething(new BezierSurface()); |
---|
1559 | 1644 | } else |
---|
1560 | | - if (event.getSource() == checkerItem) |
---|
| 1645 | + if (source == checkerItem) |
---|
1561 | 1646 | { |
---|
1562 | 1647 | /* |
---|
1563 | 1648 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1570 | 1655 | LA.matConcat(obj.toParent, cameraView.renderCamera.fromParent, obj.toParent); |
---|
1571 | 1656 | LA.matInvert(obj.toParent, obj.fromParent); |
---|
1572 | 1657 | */ |
---|
1573 | | - makeSomething(new CheckerIG()); |
---|
| 1658 | + makeSomething(new Checker()); |
---|
1574 | 1659 | } else |
---|
1575 | | - if (event.getSource() == meshItem) |
---|
| 1660 | + if (source == meshItem) |
---|
1576 | 1661 | { |
---|
1577 | 1662 | Object3D itemtomake = new Object3D(); |
---|
1578 | 1663 | Object3D child; |
---|
.. | .. |
---|
1593 | 1678 | makeSomething(child); |
---|
1594 | 1679 | } |
---|
1595 | 1680 | } else |
---|
1596 | | - if (event.getSource() == springItem) |
---|
| 1681 | + if (source == springItem) |
---|
1597 | 1682 | { |
---|
1598 | 1683 | cSpring s = new cSpring(); |
---|
1599 | 1684 | s.setup(); |
---|
1600 | 1685 | makeSomething(s); |
---|
1601 | 1686 | } else |
---|
1602 | | - if (event.getSource() == flagItem) |
---|
| 1687 | + if (source == flagItem) |
---|
1603 | 1688 | { |
---|
1604 | 1689 | cSpring s = new cFlag(); |
---|
1605 | 1690 | s.setup(); |
---|
1606 | 1691 | makeSomething(s); |
---|
1607 | 1692 | } else |
---|
1608 | | - if (event.getSource() == lightItem) |
---|
| 1693 | + if (source == lightItem) |
---|
1609 | 1694 | { |
---|
1610 | 1695 | makeSomething(new Light()); |
---|
1611 | 1696 | } else |
---|
1612 | | - if (event.getSource() == csgItem) |
---|
| 1697 | + if (source == csgItem) |
---|
1613 | 1698 | { |
---|
1614 | 1699 | group(new CSG()); |
---|
1615 | 1700 | } else |
---|
1616 | | - if (event.getSource() == templateItem) |
---|
| 1701 | + if (source == templateItem) |
---|
1617 | 1702 | { |
---|
1618 | 1703 | group(new cTemplate()); |
---|
1619 | 1704 | } else |
---|
1620 | | - if (event.getSource() == attributeItem) |
---|
| 1705 | + if (source == attributeItem) |
---|
1621 | 1706 | { |
---|
1622 | 1707 | makeSomething(new Attribute()); |
---|
1623 | 1708 | } else |
---|
1624 | | - if (event.getSource() == pointflowItem) |
---|
| 1709 | + if (source == pointflowItem) |
---|
1625 | 1710 | { |
---|
1626 | 1711 | makeSomething(new PointFlow()); |
---|
1627 | 1712 | } else |
---|
.. | .. |
---|
1633 | 1718 | } else |
---|
1634 | 1719 | */ |
---|
1635 | 1720 | |
---|
1636 | | - if (event.getSource() == superLoopItem) |
---|
| 1721 | + if (source == superLoopItem) |
---|
1637 | 1722 | { |
---|
1638 | 1723 | Composite g = new cGroup(); |
---|
1639 | 1724 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1655 | 1740 | |
---|
1656 | 1741 | group(g); |
---|
1657 | 1742 | } else |
---|
1658 | | - if (event.getSource() == loopItem) |
---|
| 1743 | + if (source == loopItem) |
---|
1659 | 1744 | { |
---|
1660 | 1745 | Composite csg = new GroupLeaf(); |
---|
1661 | 1746 | csg.count = 5; |
---|
.. | .. |
---|
1664 | 1749 | csg.addChild(child); |
---|
1665 | 1750 | child.addChild(csg); |
---|
1666 | 1751 | } else |
---|
1667 | | - if (event.getSource() == doubleItem) |
---|
| 1752 | + if (source == doubleItem) |
---|
1668 | 1753 | { |
---|
1669 | 1754 | Composite csg = new GroupLeaf(); |
---|
1670 | 1755 | csg.count = 5; |
---|
.. | .. |
---|
1676 | 1761 | csg.addChild(child); |
---|
1677 | 1762 | child.addChild(csg); |
---|
1678 | 1763 | } else |
---|
1679 | | - if (event.getSource() == tripleItem) |
---|
| 1764 | + if (source == tripleItem) |
---|
1680 | 1765 | { |
---|
1681 | 1766 | Composite csg = new GroupLeaf(); |
---|
1682 | 1767 | csg.count = 4; |
---|
.. | .. |
---|
1692 | 1777 | child.addChild(csg); |
---|
1693 | 1778 | } else |
---|
1694 | 1779 | |
---|
1695 | | - if (event.getSource() == importGFDItem) |
---|
| 1780 | + if (source == importGFDItem) |
---|
1696 | 1781 | { |
---|
1697 | 1782 | ImportGFD(); |
---|
1698 | 1783 | } else |
---|
1699 | | - if (event.getSource() == importVRMLX3DItem) |
---|
| 1784 | + if (source == importVRMLX3DItem) |
---|
1700 | 1785 | { |
---|
1701 | 1786 | ImportVRMLX3D(); |
---|
1702 | 1787 | } else |
---|
1703 | | - if (event.getSource() == import3DSItem) |
---|
| 1788 | + if (source == import3DSItem) |
---|
1704 | 1789 | { |
---|
1705 | 1790 | objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1706 | 1791 | } else |
---|
1707 | | - if (event.getSource() == importOBJItem) |
---|
| 1792 | + if (source == importOBJItem) |
---|
1708 | 1793 | { |
---|
1709 | 1794 | objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1710 | 1795 | } else |
---|
1711 | | - if (event.getSource() == computeAOItem) |
---|
| 1796 | + if (source == computeAOItem) |
---|
1712 | 1797 | { |
---|
1713 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1714 | | - CameraPane.theRenderer.repaint(); |
---|
| 1798 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 1799 | + Globals.theRenderer.repaint(); |
---|
1715 | 1800 | } else |
---|
1716 | | - if (event.getSource() == recompileItem) |
---|
| 1801 | + if (source == recompileItem) |
---|
1717 | 1802 | { |
---|
1718 | 1803 | Recompile(); |
---|
1719 | 1804 | refreshContents(); |
---|
1720 | 1805 | } else |
---|
1721 | | - if (event.getSource() == editScriptItem) |
---|
| 1806 | + if (source == editScriptItem) |
---|
1722 | 1807 | { |
---|
1723 | 1808 | OpenDialog(); |
---|
1724 | 1809 | refreshContents(); |
---|
1725 | 1810 | } else |
---|
1726 | | - if (event.getSource() == invariantsItem) |
---|
| 1811 | + if (source == invariantsItem) |
---|
1727 | 1812 | { |
---|
1728 | 1813 | System.out.println("Invariants:"); |
---|
1729 | | - GraphreeD.theApplet3D.universe.invariants(); |
---|
| 1814 | + GrafreeD.grafreeD.universe.invariants(); |
---|
1730 | 1815 | } else |
---|
1731 | | - if (event.getSource() == memoryItem) |
---|
| 1816 | + if (source == memoryItem) |
---|
1732 | 1817 | { |
---|
1733 | 1818 | //System.out.println("Invariants:"); |
---|
1734 | 1819 | PrintMemory(); |
---|
1735 | 1820 | } else |
---|
1736 | | - if (event.getSource() == pathItem) |
---|
| 1821 | + if (source == pathItem) |
---|
1737 | 1822 | { |
---|
1738 | 1823 | PrintPath(); |
---|
1739 | 1824 | } else |
---|
1740 | | - if (event.getSource() == analyzeItem) |
---|
| 1825 | + if (source == analyzeItem) |
---|
1741 | 1826 | { |
---|
1742 | 1827 | AnalyzeObject(); |
---|
1743 | 1828 | } else |
---|
1744 | | - if (event.getSource() == dumpItem) |
---|
| 1829 | + if (source == dumpItem) |
---|
1745 | 1830 | { |
---|
1746 | 1831 | DumpObject(); |
---|
1747 | 1832 | } else |
---|
1748 | | - if (event.getSource() == screenfitButton) |
---|
| 1833 | + if (source == screenfitButton) |
---|
1749 | 1834 | { |
---|
1750 | 1835 | //Reload(lastConverter, lastFilename, true); |
---|
1751 | 1836 | ScreenFit(); |
---|
1752 | 1837 | } else |
---|
1753 | | - if (event.getSource() == screenfitpointButton) |
---|
| 1838 | + if (source == screenfitpointButton) |
---|
1754 | 1839 | { |
---|
1755 | 1840 | //Reload(lastConverter, lastFilename, true); |
---|
1756 | 1841 | ScreenFitPoint(); |
---|
1757 | 1842 | } else |
---|
1758 | | - if (event.getSource() == snapobjectButton) |
---|
| 1843 | + if (source == snapobjectButton) |
---|
1759 | 1844 | { |
---|
1760 | 1845 | //Reload(lastConverter, lastFilename, true); |
---|
1761 | 1846 | SnapObject(); |
---|
.. | .. |
---|
1766 | 1851 | // Recompile(); |
---|
1767 | 1852 | // refreshContents(); |
---|
1768 | 1853 | // } else |
---|
1769 | | - if (event.getSource() == gcButton) |
---|
| 1854 | + if (source == gcButton) |
---|
1770 | 1855 | { |
---|
1771 | 1856 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1772 | 1857 | System.gc(); |
---|
1773 | 1858 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1774 | 1859 | } else |
---|
1775 | | - if (event.getSource() == editLeafItem) |
---|
| 1860 | + if (source == editLeafItem) |
---|
1776 | 1861 | { |
---|
1777 | 1862 | Object3D obj; |
---|
1778 | 1863 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1786 | 1871 | } |
---|
1787 | 1872 | refreshContents(true); |
---|
1788 | 1873 | } else |
---|
1789 | | - if (event.getSource() == openWindowItem) |
---|
| 1874 | + if (source == openWindowItem) |
---|
1790 | 1875 | { |
---|
1791 | 1876 | EditSelection(true); |
---|
1792 | 1877 | } else |
---|
1793 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 1878 | + if (source == cutItem || source == clearButton) |
---|
1794 | 1879 | { |
---|
1795 | 1880 | loadClipboard(true); |
---|
1796 | 1881 | } else |
---|
1797 | | - if (event.getSource() == duplicateItem) |
---|
| 1882 | + if (source == duplicateItem) |
---|
1798 | 1883 | { |
---|
1799 | | - Object3D keep = GraphreeD.clipboard; |
---|
| 1884 | + Object3D keep = GrafreeD.clipboard; |
---|
1800 | 1885 | loadClipboard(false); |
---|
1801 | 1886 | paste(false); |
---|
1802 | | - GraphreeD.clipboard = keep; |
---|
| 1887 | + GrafreeD.clipboard = keep; |
---|
1803 | 1888 | } else |
---|
1804 | | - if (event.getSource() == cloneItem) |
---|
| 1889 | + if (source == cloneItem) |
---|
1805 | 1890 | { |
---|
1806 | 1891 | CloneSelection(false); |
---|
1807 | 1892 | } else |
---|
1808 | | - if (event.getSource() == cloneSupportItem) |
---|
| 1893 | + if (source == cloneSupportItem) |
---|
1809 | 1894 | { |
---|
1810 | 1895 | CloneSelection(true); |
---|
1811 | 1896 | } else |
---|
1812 | | - if (event.getSource() == copyItem) |
---|
| 1897 | + if (source == copyItem) |
---|
1813 | 1898 | { |
---|
1814 | 1899 | loadClipboard(false); |
---|
1815 | 1900 | } else |
---|
1816 | | - if (event.getSource() == pasteItem) |
---|
| 1901 | + if (source == pasteItem) |
---|
1817 | 1902 | { |
---|
1818 | 1903 | paste(false); |
---|
1819 | 1904 | } else |
---|
1820 | | - if (event.getSource() == pasteLinkItem) |
---|
| 1905 | + if (source == pasteLinkItem) |
---|
1821 | 1906 | { |
---|
1822 | 1907 | pasteInto(false); |
---|
1823 | 1908 | } else |
---|
1824 | | - if (event.getSource() == pasteCloneItem) |
---|
| 1909 | + if (source == pasteCloneItem) |
---|
1825 | 1910 | { |
---|
1826 | 1911 | pasteInto(true); |
---|
1827 | 1912 | } else |
---|
1828 | | - if (event.getSource() == pasteExpandItem) |
---|
| 1913 | + if (source == pasteExpandItem) |
---|
1829 | 1914 | { |
---|
1830 | 1915 | paste(true); |
---|
1831 | 1916 | } else |
---|
1832 | | - if (event.getSource() == synchronizeItem) |
---|
| 1917 | + if (source == synchronizeItem) |
---|
1833 | 1918 | { |
---|
1834 | 1919 | Overwrite(Object3D.TRANSFORM); |
---|
1835 | 1920 | } else |
---|
1836 | | - if (event.getSource() == overwriteNameItem) |
---|
| 1921 | + if (source == overwriteNameItem) |
---|
1837 | 1922 | { |
---|
1838 | 1923 | Overwrite(Object3D.NAME); |
---|
1839 | 1924 | } else |
---|
1840 | | - if (event.getSource() == overwriteUVItem) |
---|
| 1925 | + if (source == overwriteUVItem) |
---|
1841 | 1926 | { |
---|
1842 | 1927 | Overwrite(Object3D.UV); |
---|
1843 | 1928 | } else |
---|
1844 | | - if (event.getSource() == overwriteMatItem) |
---|
| 1929 | + if (source == overwriteMatItem) |
---|
1845 | 1930 | { |
---|
| 1931 | + /* july 2015 |
---|
1846 | 1932 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
1847 | | - Overwrite(Object3D.MATERIAL); |
---|
| 1933 | + Overwrite(Object3D.MATERIAL | Object3D.COLOR); |
---|
1848 | 1934 | else |
---|
1849 | 1935 | { |
---|
1850 | 1936 | if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0) |
---|
.. | .. |
---|
1856 | 1942 | Overwrite(Object3D.MATERIAL | Object3D.TEXTURE); |
---|
1857 | 1943 | } |
---|
1858 | 1944 | } |
---|
| 1945 | + */ |
---|
| 1946 | + |
---|
| 1947 | + Overwrite(dropAttributes); |
---|
1859 | 1948 | } |
---|
1860 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 1949 | + if (source == overwriteGeoItem) |
---|
1861 | 1950 | { |
---|
1862 | 1951 | Overwrite(Object3D.GEOMETRY); |
---|
1863 | | -// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1952 | +// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1864 | 1953 | // { |
---|
1865 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1954 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
1866 | 1955 | // |
---|
1867 | 1956 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1868 | 1957 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1874 | 1963 | // refreshContents(); |
---|
1875 | 1964 | // } |
---|
1876 | 1965 | } else |
---|
1877 | | - if (event.getSource() == generateMeshItem) |
---|
| 1966 | + if (source == generateMeshItem) |
---|
1878 | 1967 | { |
---|
1879 | 1968 | //if (group.selection.size() == 1) |
---|
1880 | 1969 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1885 | 1974 | ResetModel(); |
---|
1886 | 1975 | refreshContents(); |
---|
1887 | 1976 | } else |
---|
1888 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 1977 | + if (source == extractGeometriesItem) |
---|
1889 | 1978 | { |
---|
1890 | 1979 | boolean one = false; |
---|
1891 | 1980 | |
---|
.. | .. |
---|
1912 | 2001 | ResetModel(); |
---|
1913 | 2002 | refreshContents(); |
---|
1914 | 2003 | } else |
---|
1915 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2004 | + if (source == cloneGeometriesItem) |
---|
1916 | 2005 | { |
---|
1917 | 2006 | boolean one = false; |
---|
1918 | 2007 | |
---|
.. | .. |
---|
1938 | 2027 | ResetModel(); |
---|
1939 | 2028 | refreshContents(); |
---|
1940 | 2029 | } else |
---|
1941 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2030 | + if (source == shareGeometriesItem) |
---|
1942 | 2031 | { |
---|
1943 | 2032 | boolean one = false; |
---|
1944 | 2033 | |
---|
1945 | 2034 | if (group.selection.size() == 1) |
---|
1946 | 2035 | one = true; |
---|
1947 | 2036 | |
---|
| 2037 | + Object3D merge = null; |
---|
| 2038 | + |
---|
1948 | 2039 | Object3D content = new cGroup(); |
---|
1949 | 2040 | |
---|
1950 | 2041 | for (int i=0; i<group.selection.size(); i++) |
---|
1951 | 2042 | { |
---|
1952 | | - Object3D sel = new Merge(group.selection.get(i)); |
---|
| 2043 | + merge = new Merge(group.selection.get(i)); |
---|
1953 | 2044 | |
---|
1954 | 2045 | if (one) |
---|
1955 | | - makeSomething(sel, false); |
---|
| 2046 | + makeSomething(merge, false); |
---|
1956 | 2047 | else |
---|
1957 | | - content.addChild(sel); |
---|
| 2048 | + content.addChild(merge); |
---|
1958 | 2049 | } |
---|
1959 | 2050 | |
---|
1960 | 2051 | if (!one) |
---|
1961 | | - makeSomething(content, false); |
---|
1962 | | - |
---|
1963 | | - ResetModel(); |
---|
1964 | | - refreshContents(); |
---|
| 2052 | + makeSomething(content, true); |
---|
| 2053 | + else |
---|
| 2054 | + { |
---|
| 2055 | + ResetModel(); |
---|
| 2056 | + Select(merge.GetTreePath(), true, false); // unselect... false); |
---|
| 2057 | + refreshContents(); |
---|
| 2058 | + } |
---|
1965 | 2059 | } else |
---|
1966 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2060 | + if (source == mergeGeometriesItem) |
---|
1967 | 2061 | { |
---|
1968 | 2062 | boolean one = false; |
---|
1969 | 2063 | |
---|
.. | .. |
---|
1993 | 2087 | ResetModel(); |
---|
1994 | 2088 | refreshContents(); |
---|
1995 | 2089 | } else |
---|
1996 | | - if (event.getSource() == linkverticesItem) |
---|
| 2090 | + if (source == linkverticesItem) |
---|
1997 | 2091 | { |
---|
1998 | | -// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2092 | +// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
1999 | 2093 | // { |
---|
2000 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2094 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
2001 | 2095 | // |
---|
2002 | 2096 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2003 | 2097 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2006 | 2100 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2007 | 2101 | // refreshContents(); |
---|
2008 | 2102 | // } |
---|
2009 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2103 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
2010 | 2104 | { |
---|
2011 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2105 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2012 | 2106 | |
---|
2013 | 2107 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2014 | 2108 | content = ((cGroup)content).get(0); |
---|
2015 | 2109 | |
---|
2016 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2110 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2017 | 2111 | for (int i=0; i<group.selection.size(); i++) |
---|
2018 | 2112 | { |
---|
2019 | 2113 | boolean random = CameraPane.RANDOM; |
---|
.. | .. |
---|
2022 | 2116 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2023 | 2117 | CameraPane.RANDOM = random; |
---|
2024 | 2118 | } |
---|
2025 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2119 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2026 | 2120 | refreshContents(); |
---|
2027 | 2121 | } |
---|
2028 | 2122 | } else |
---|
2029 | | - if (event.getSource() == resetsupportItem) |
---|
| 2123 | + if (source == resetsupportItem) |
---|
2030 | 2124 | { |
---|
2031 | 2125 | for (int i=0; i<group.selection.size(); i++) |
---|
2032 | 2126 | { |
---|
.. | .. |
---|
2038 | 2132 | |
---|
2039 | 2133 | refreshContents(); |
---|
2040 | 2134 | } else |
---|
2041 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2135 | + if (source == relinkverticesItem) |
---|
| 2136 | + { |
---|
| 2137 | + boolean random = CameraPane.RANDOM; |
---|
| 2138 | + CameraPane.RANDOM = false; // parse all random nodes |
---|
| 2139 | + group.selection.RelinkToSupport(); |
---|
| 2140 | + CameraPane.RANDOM = random; |
---|
| 2141 | + |
---|
| 2142 | + refreshContents(); |
---|
| 2143 | + } else |
---|
| 2144 | + if (source == resetreferencesItem) |
---|
2042 | 2145 | { |
---|
2043 | 2146 | for (int i=0; i<group.selection.size(); i++) |
---|
2044 | 2147 | { |
---|
.. | .. |
---|
2047 | 2150 | |
---|
2048 | 2151 | refreshContents(); |
---|
2049 | 2152 | } else |
---|
2050 | | - if (event.getSource() == setMasterItem) |
---|
| 2153 | + if (source == setMasterItem) |
---|
2051 | 2154 | { |
---|
2052 | | - if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2155 | + if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2053 | 2156 | { |
---|
2054 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2157 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2055 | 2158 | |
---|
2056 | 2159 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2057 | 2160 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2060 | 2163 | refreshContents(); |
---|
2061 | 2164 | } |
---|
2062 | 2165 | } else |
---|
2063 | | - if (event.getSource() == poseMeshItem) |
---|
| 2166 | + if (source == poseMeshItem) |
---|
2064 | 2167 | { |
---|
2065 | 2168 | if (group.selection.size() == 1) |
---|
2066 | 2169 | { |
---|
2067 | | - if (GraphreeD.clipboard.size() == 1) |
---|
| 2170 | + if (GrafreeD.clipboard.size() == 1) |
---|
2068 | 2171 | { |
---|
2069 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2172 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2070 | 2173 | |
---|
2071 | 2174 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2072 | 2175 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2079 | 2182 | } |
---|
2080 | 2183 | |
---|
2081 | 2184 | } else |
---|
2082 | | - if (event.getSource() == revertMeshItem) |
---|
| 2185 | + if (source == revertMeshItem) |
---|
2083 | 2186 | { |
---|
2084 | 2187 | RevertMeshes(); |
---|
2085 | 2188 | } else |
---|
2086 | | - if (event.getSource() == resetMeshItem) |
---|
| 2189 | + if (source == resetMeshItem) |
---|
2087 | 2190 | { |
---|
2088 | 2191 | ResetAll(); |
---|
2089 | 2192 | } else |
---|
2090 | | - if (event.getSource() == stepAllItem) |
---|
| 2193 | + if (source == stepAllItem) |
---|
2091 | 2194 | { |
---|
2092 | 2195 | StepAll(); |
---|
2093 | 2196 | } else |
---|
2094 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2197 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2095 | 2198 | { |
---|
2096 | 2199 | //int indices[] = jList.getSelectedIndices(); |
---|
2097 | 2200 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2099 | 2202 | |
---|
2100 | 2203 | ClearSelection(false); |
---|
2101 | 2204 | } else |
---|
2102 | | - if (event.getSource() == clearAllItem) |
---|
| 2205 | + if (source == clearAllItem) |
---|
2103 | 2206 | { |
---|
2104 | 2207 | ClearSelection(true); |
---|
2105 | 2208 | } else |
---|
2106 | | - if (event.getSource() == grabItem) |
---|
| 2209 | + if (source == grabItem) |
---|
2107 | 2210 | { |
---|
2108 | 2211 | group(new cGroup(), true); |
---|
2109 | 2212 | } else |
---|
2110 | | - if (event.getSource() == frontItem) |
---|
| 2213 | + if (source == hideItem) |
---|
| 2214 | + { |
---|
| 2215 | + group(new HiddenObject()); |
---|
| 2216 | + } else |
---|
| 2217 | + if (source == frontItem) |
---|
2111 | 2218 | { |
---|
2112 | 2219 | front(); |
---|
2113 | 2220 | } else |
---|
2114 | | - if (event.getSource() == backItem) |
---|
| 2221 | + if (source == backItem) |
---|
2115 | 2222 | { |
---|
2116 | 2223 | back(); |
---|
2117 | 2224 | } else |
---|
2118 | | - if (event.getSource() == cameraItem) |
---|
| 2225 | + if (source == cameraItem) |
---|
2119 | 2226 | { |
---|
2120 | 2227 | makeSomething(new Camera()); |
---|
2121 | 2228 | } else |
---|
2122 | | - if (event.getSource() == compositeItem) |
---|
| 2229 | + if (source == compositeItem) |
---|
2123 | 2230 | { |
---|
2124 | 2231 | group(new Composite()); |
---|
2125 | 2232 | } else |
---|
2126 | | - if (event.getSource() == randomItem) |
---|
| 2233 | + if (source == randomItem) |
---|
2127 | 2234 | { |
---|
2128 | 2235 | RandomNode random = new RandomNode(); |
---|
2129 | 2236 | group(random); |
---|
2130 | 2237 | if (random.size() > 0) |
---|
2131 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2238 | + random.name = random.get(0).name + "Switch"; |
---|
2132 | 2239 | } else |
---|
2133 | | - if (event.getSource() == physicsItem) |
---|
| 2240 | + if (source == physicsItem) |
---|
2134 | 2241 | { |
---|
2135 | 2242 | group(new PhysicsNode()); |
---|
2136 | 2243 | } else |
---|
2137 | | - if (event.getSource() == frameselectorItem) |
---|
| 2244 | + if (source == frameselectorItem) |
---|
2138 | 2245 | { |
---|
2139 | 2246 | for (int i=0; i<group.selection.size(); i++) |
---|
2140 | 2247 | { |
---|
.. | .. |
---|
2146 | 2253 | ResetModel(); |
---|
2147 | 2254 | refreshContents(); |
---|
2148 | 2255 | } else |
---|
2149 | | - if (event.getSource() == switchGeoItem) |
---|
| 2256 | + if (source == switchGeoItem) |
---|
2150 | 2257 | { |
---|
2151 | 2258 | for (int i=0; i<group.selection.size(); i++) |
---|
2152 | 2259 | { |
---|
.. | .. |
---|
2158 | 2265 | ResetModel(); |
---|
2159 | 2266 | refreshContents(); |
---|
2160 | 2267 | } else |
---|
2161 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2268 | + if (source == switchTransfoItem) |
---|
2162 | 2269 | { |
---|
2163 | 2270 | for (int i=0; i<group.selection.size(); i++) |
---|
2164 | 2271 | { |
---|
.. | .. |
---|
2170 | 2277 | ResetModel(); |
---|
2171 | 2278 | refreshContents(); |
---|
2172 | 2279 | } else |
---|
2173 | | - if (event.getSource() == morphItem) |
---|
| 2280 | + if (source == morphItem) |
---|
2174 | 2281 | { |
---|
2175 | 2282 | for (int i=0; i<group.selection.size(); i++) |
---|
2176 | 2283 | { |
---|
.. | .. |
---|
2182 | 2289 | ResetModel(); |
---|
2183 | 2290 | refreshContents(); |
---|
2184 | 2291 | } else |
---|
2185 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2292 | + if (source == scriptNodeItem) |
---|
2186 | 2293 | { |
---|
2187 | 2294 | boolean atleastone = false; |
---|
2188 | 2295 | |
---|
.. | .. |
---|
2221 | 2328 | } |
---|
2222 | 2329 | } |
---|
2223 | 2330 | } else |
---|
2224 | | - if (event.getSource() == linkerItem) |
---|
| 2331 | + if (source == linkerItem) |
---|
2225 | 2332 | { |
---|
2226 | 2333 | group(new cLinker()); |
---|
2227 | 2334 | } else |
---|
2228 | | - if (event.getSource() == textureItem) |
---|
| 2335 | + if (source == textureItem) |
---|
2229 | 2336 | { |
---|
2230 | 2337 | group(new TextureNode()); |
---|
2231 | 2338 | } else |
---|
2232 | | - if (event.getSource() == shadowXItem) |
---|
| 2339 | + if (source == billboardItem) |
---|
| 2340 | + { |
---|
| 2341 | + group(new BillboardNode()); |
---|
| 2342 | + } else |
---|
| 2343 | + if (source == shadowXItem) |
---|
2233 | 2344 | { |
---|
2234 | 2345 | CastShadow(0); |
---|
2235 | 2346 | } else |
---|
2236 | | - if (event.getSource() == shadowYItem) |
---|
| 2347 | + if (source == shadowYItem) |
---|
2237 | 2348 | { |
---|
2238 | 2349 | CastShadow(1); |
---|
2239 | 2350 | } else |
---|
2240 | | - if (event.getSource() == shadowZItem) |
---|
| 2351 | + if (source == shadowZItem) |
---|
2241 | 2352 | { |
---|
2242 | 2353 | CastShadow(2); |
---|
2243 | 2354 | } else |
---|
2244 | | - if (event.getSource() == ungroupItem) |
---|
| 2355 | + if (source == ungroupItem) |
---|
2245 | 2356 | { |
---|
2246 | | - ungroup(); |
---|
| 2357 | + //ungroup(); |
---|
| 2358 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2359 | + { |
---|
| 2360 | + Ungroup(group.selection.get(i)); |
---|
| 2361 | + } |
---|
| 2362 | + |
---|
| 2363 | + ClearSelection(false); |
---|
| 2364 | + |
---|
| 2365 | + refreshContents(); |
---|
2247 | 2366 | } else |
---|
2248 | | - if (event.getSource() == genUVItem) |
---|
| 2367 | + if (source == genUVItem) |
---|
2249 | 2368 | { |
---|
2250 | 2369 | GenUV(); |
---|
2251 | 2370 | } else |
---|
2252 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2371 | + if (source == genNormalsCADItem) |
---|
2253 | 2372 | { |
---|
2254 | 2373 | GenNormals(true); |
---|
2255 | 2374 | } else |
---|
2256 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2375 | + if (source == genNormalsMESHItem) |
---|
| 2376 | + { |
---|
| 2377 | + GenNormals(true); // TODO |
---|
| 2378 | + } else |
---|
| 2379 | + if (source == genNormalsORGANItem) |
---|
2257 | 2380 | { |
---|
2258 | 2381 | GenNormals(false); |
---|
2259 | 2382 | } else |
---|
2260 | | - if (event.getSource() == stripifyItem) |
---|
| 2383 | + if (source == genNormalsMINEItem) |
---|
| 2384 | + { |
---|
| 2385 | + GenNormalsMINE(); |
---|
| 2386 | + } else |
---|
| 2387 | + if (source == stripifyItem) |
---|
2261 | 2388 | { |
---|
2262 | 2389 | Stripify(); |
---|
2263 | 2390 | } else |
---|
2264 | | - if (event.getSource() == unstripifyItem) |
---|
| 2391 | + if (source == unstripifyItem) |
---|
2265 | 2392 | { |
---|
2266 | 2393 | Unstripify(); |
---|
2267 | 2394 | } else |
---|
2268 | | - if (event.getSource() == trimItem) |
---|
| 2395 | + if (source == trimItem) |
---|
2269 | 2396 | { |
---|
2270 | 2397 | Trim(); |
---|
2271 | 2398 | } else |
---|
2272 | | - if (event.getSource() == untrimItem) |
---|
| 2399 | + if (source == untrimItem) |
---|
2273 | 2400 | { |
---|
2274 | 2401 | Untrim(); |
---|
2275 | 2402 | } else |
---|
2276 | | - if (event.getSource() == clearColorsItem) |
---|
| 2403 | + if (source == clearColorsItem) |
---|
2277 | 2404 | { |
---|
2278 | 2405 | ClearColors(); |
---|
2279 | 2406 | } else |
---|
2280 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2407 | + if (source == clearMaterialsItem) |
---|
2281 | 2408 | { |
---|
2282 | 2409 | ClearMaterials(); |
---|
2283 | 2410 | } else |
---|
2284 | | - if (event.getSource() == liveleavesItem) |
---|
| 2411 | + if (source == liveleavesItem) |
---|
2285 | 2412 | { |
---|
2286 | 2413 | LiveLeaves(true); |
---|
2287 | 2414 | } else |
---|
2288 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2415 | + if (source == unliveleavesItem) |
---|
2289 | 2416 | { |
---|
2290 | 2417 | LiveLeaves(false); |
---|
2291 | 2418 | } else |
---|
2292 | | - if (event.getSource() == supportleavesItem) |
---|
| 2419 | + if (source == supportleavesItem) |
---|
2293 | 2420 | { |
---|
2294 | 2421 | SupportLeaves(true); |
---|
2295 | 2422 | } else |
---|
2296 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2423 | + if (source == unsupportleavesItem) |
---|
2297 | 2424 | { |
---|
2298 | 2425 | SupportLeaves(false); |
---|
2299 | 2426 | } else |
---|
2300 | | - if (event.getSource() == hideleavesItem) |
---|
| 2427 | + if (source == hideleavesItem) |
---|
2301 | 2428 | { |
---|
2302 | 2429 | HideLeaves(true); |
---|
2303 | 2430 | } else |
---|
2304 | | - if (event.getSource() == showleavesItem) |
---|
| 2431 | + if (source == showleavesItem) |
---|
2305 | 2432 | { |
---|
2306 | 2433 | HideLeaves(false); |
---|
2307 | 2434 | } else |
---|
2308 | | - if (event.getSource() == markleavesItem) |
---|
| 2435 | + if (source == markleavesItem) |
---|
2309 | 2436 | { |
---|
2310 | 2437 | MarkLeaves(true); |
---|
2311 | 2438 | } else |
---|
2312 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2439 | + if (source == unmarkleavesItem) |
---|
2313 | 2440 | { |
---|
2314 | 2441 | MarkLeaves(false); |
---|
2315 | 2442 | } else |
---|
2316 | | - if (event.getSource() == flipVItem) |
---|
| 2443 | + if (source == flipVItem) |
---|
2317 | 2444 | { |
---|
2318 | 2445 | FlipV(true); |
---|
2319 | 2446 | } else |
---|
2320 | | - if (event.getSource() == unflipVItem) |
---|
| 2447 | + if (source == unflipVItem) |
---|
2321 | 2448 | { |
---|
2322 | 2449 | FlipV(false); |
---|
2323 | 2450 | } else |
---|
2324 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2451 | + if (source == lowTexturesItem) |
---|
2325 | 2452 | { |
---|
2326 | 2453 | SetTexRes(0); |
---|
2327 | 2454 | } else |
---|
2328 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2455 | + if (source == normalTexturesItem) |
---|
2329 | 2456 | { |
---|
2330 | 2457 | SetTexRes(1); |
---|
2331 | 2458 | } else |
---|
2332 | | - if (event.getSource() == highTexturesItem) |
---|
| 2459 | + if (source == highTexturesItem) |
---|
2333 | 2460 | { |
---|
2334 | 2461 | SetTexRes(2); |
---|
2335 | 2462 | } else |
---|
2336 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2463 | + if (source == veryhighTexturesItem) |
---|
2337 | 2464 | { |
---|
2338 | 2465 | SetTexRes(3); |
---|
2339 | 2466 | } else |
---|
2340 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2467 | + if (source == maxTexturesItem) |
---|
2341 | 2468 | { |
---|
2342 | 2469 | SetTexRes(4); |
---|
2343 | 2470 | } else |
---|
2344 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2471 | + if (source == panoTexturesItem) |
---|
2345 | 2472 | { |
---|
2346 | 2473 | SetTexRes(5); |
---|
2347 | 2474 | } else |
---|
2348 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2475 | + if (source == reverseNormalsItem) |
---|
2349 | 2476 | { |
---|
2350 | 2477 | ReverseNormals(); |
---|
2351 | 2478 | } else |
---|
2352 | | - if (event.getSource() == parseverticesItem) |
---|
| 2479 | + if (source == parseverticesItem) |
---|
2353 | 2480 | { |
---|
2354 | 2481 | ParseVertices(); |
---|
2355 | 2482 | } else |
---|
2356 | | - if (event.getSource() == alignItem) |
---|
| 2483 | + if (source == textureFieldItem) |
---|
| 2484 | + { |
---|
| 2485 | + TextureVertices(); |
---|
| 2486 | + } else |
---|
| 2487 | + if (source == alignItem) |
---|
2357 | 2488 | { |
---|
2358 | 2489 | Align(); |
---|
2359 | 2490 | } else |
---|
2360 | | - if (event.getSource() == mirrorItem) |
---|
| 2491 | + if (source == mirrorItem) |
---|
2361 | 2492 | { |
---|
2362 | 2493 | MirrorPoses(); |
---|
2363 | 2494 | } else |
---|
2364 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2495 | + if (source == reduceMorphItem) |
---|
2365 | 2496 | { |
---|
2366 | 2497 | MeshReduction(false); |
---|
2367 | 2498 | } else |
---|
2368 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2499 | + if (source == reduce34MorphItem) |
---|
2369 | 2500 | { |
---|
2370 | 2501 | MeshReduction(true); |
---|
2371 | 2502 | } else |
---|
2372 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2503 | + if (source == reverseTrianglesItem) |
---|
2373 | 2504 | { |
---|
2374 | 2505 | ReverseTriangles(); |
---|
2375 | 2506 | } else |
---|
2376 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2507 | + if (source == reduceMeshItem) |
---|
2377 | 2508 | { |
---|
2378 | 2509 | ReduceMesh(false); |
---|
2379 | 2510 | } else |
---|
2380 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2511 | + if (source == reduce34MeshItem) |
---|
2381 | 2512 | { |
---|
2382 | 2513 | ReduceMesh(true); |
---|
2383 | 2514 | } else |
---|
2384 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2515 | + if (source == increaseMeshItem) |
---|
2385 | 2516 | { |
---|
2386 | 2517 | IncreaseMesh(); |
---|
2387 | 2518 | } else |
---|
2388 | | - if (event.getSource() == clipMeshItem) |
---|
| 2519 | + if (source == clipMeshItem) |
---|
2389 | 2520 | { |
---|
2390 | 2521 | ClipMesh(); |
---|
2391 | 2522 | } else |
---|
2392 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2523 | + if (source == smoothMeshItem) |
---|
2393 | 2524 | { |
---|
2394 | 2525 | SmoothMesh(); |
---|
2395 | 2526 | } else |
---|
2396 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2527 | + if (source == transformgeometryItem) |
---|
2397 | 2528 | { |
---|
2398 | 2529 | TransformGeometry(); |
---|
2399 | 2530 | } else |
---|
2400 | | - if (event.getSource() == resetTransformItem) |
---|
| 2531 | + if (source == resetTransformItem) |
---|
2401 | 2532 | { |
---|
2402 | 2533 | ResetTransform(); |
---|
2403 | 2534 | } else |
---|
2404 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2535 | + if (source == resetCentroidItem) |
---|
2405 | 2536 | { |
---|
2406 | 2537 | ResetCentroid(); |
---|
2407 | 2538 | } else |
---|
2408 | | - if (event.getSource() == resetParentItem) |
---|
| 2539 | + if (source == resetParentItem) |
---|
2409 | 2540 | { |
---|
2410 | 2541 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2411 | 2542 | { |
---|
.. | .. |
---|
2415 | 2546 | |
---|
2416 | 2547 | refreshContents(); |
---|
2417 | 2548 | } else |
---|
2418 | | - if (event.getSource() == repairParentItem) |
---|
| 2549 | + if (source == repairParentItem) |
---|
2419 | 2550 | { |
---|
2420 | 2551 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2421 | 2552 | { |
---|
.. | .. |
---|
2429 | 2560 | |
---|
2430 | 2561 | refreshContents(); |
---|
2431 | 2562 | } else |
---|
2432 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2563 | + if (source == repairShadowItem) |
---|
| 2564 | + { |
---|
| 2565 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2566 | + { |
---|
| 2567 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2568 | + obj.RepairShadow(); |
---|
| 2569 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2570 | +// { |
---|
| 2571 | +// obj.get(i).parent = obj; |
---|
| 2572 | +// } |
---|
| 2573 | + } |
---|
| 2574 | + |
---|
| 2575 | + refreshContents(); |
---|
| 2576 | + } else |
---|
| 2577 | + if (source == sortbysizeItem) |
---|
2433 | 2578 | { |
---|
2434 | 2579 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2435 | 2580 | { |
---|
.. | .. |
---|
2441 | 2586 | ResetModel(); |
---|
2442 | 2587 | refreshContents(); |
---|
2443 | 2588 | } else |
---|
2444 | | - if (event.getSource() == sortbynameItem) |
---|
| 2589 | + if (source == sortbynameItem) |
---|
2445 | 2590 | { |
---|
2446 | 2591 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2447 | 2592 | { |
---|
.. | .. |
---|
2453 | 2598 | ResetModel(); |
---|
2454 | 2599 | refreshContents(); |
---|
2455 | 2600 | } else |
---|
2456 | | - if (event.getSource() == attachPigmentItem) |
---|
| 2601 | + if (source == attachPigmentItem) |
---|
2457 | 2602 | { |
---|
2458 | 2603 | String texture = GetFile("Attach pigment"); |
---|
2459 | 2604 | Object3D obj; |
---|
.. | .. |
---|
2465 | 2610 | |
---|
2466 | 2611 | refreshContents(); |
---|
2467 | 2612 | } else |
---|
2468 | | - if (event.getSource() == detachPigmentItem) |
---|
| 2613 | + if (source == detachPigmentItem) |
---|
2469 | 2614 | { |
---|
2470 | 2615 | Object3D obj; |
---|
2471 | 2616 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2476 | 2621 | |
---|
2477 | 2622 | refreshContents(); |
---|
2478 | 2623 | } else |
---|
2479 | | - if (event.getSource() == attachBumpItem) |
---|
| 2624 | + if (source == attachBumpItem) |
---|
2480 | 2625 | { |
---|
2481 | 2626 | String texture = GetFile("Attach bump"); |
---|
2482 | 2627 | Object3D obj; |
---|
.. | .. |
---|
2488 | 2633 | |
---|
2489 | 2634 | refreshContents(); |
---|
2490 | 2635 | } else |
---|
2491 | | - if (event.getSource() == detachBumpItem) |
---|
| 2636 | + if (source == detachBumpItem) |
---|
2492 | 2637 | { |
---|
2493 | 2638 | Object3D obj; |
---|
2494 | 2639 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2499 | 2644 | |
---|
2500 | 2645 | refreshContents(); |
---|
2501 | 2646 | } else |
---|
2502 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 2647 | + if (source == pigmentBumpItem) |
---|
2503 | 2648 | { |
---|
2504 | 2649 | Object3D obj; |
---|
2505 | 2650 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2510 | 2655 | |
---|
2511 | 2656 | refreshContents(); |
---|
2512 | 2657 | } else |
---|
2513 | | - if (event.getSource() == flashSelectionButton) |
---|
| 2658 | + if (source == flashSelectionButton) |
---|
2514 | 2659 | { |
---|
2515 | 2660 | CameraPane.flash = true; |
---|
2516 | 2661 | refreshContents(); |
---|
2517 | 2662 | } else |
---|
2518 | | - if (event.getSource() == oneButton) |
---|
| 2663 | + if (source == oneButton) |
---|
2519 | 2664 | { |
---|
2520 | 2665 | } else |
---|
2521 | | - if (event.getSource() == twoButton) |
---|
| 2666 | + if (source == twoButton) |
---|
2522 | 2667 | { |
---|
2523 | 2668 | radio.layout = twoButton; |
---|
2524 | 2669 | // bug |
---|
2525 | 2670 | //gridPanel.setDividerLocation(1.0); |
---|
2526 | 2671 | //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(); |
---|
| 2672 | +// bigThree.remove(scenePanel); |
---|
| 2673 | +// bigThree.remove(centralPanel); |
---|
| 2674 | +// bigThree.remove(XYZPanel); |
---|
| 2675 | +// aWindowConstraints.gridx = 0; |
---|
| 2676 | +// aWindowConstraints.gridy = 0; |
---|
| 2677 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2678 | +// // aConstraints.gridheight = 3; |
---|
| 2679 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2680 | +// aWindowConstraints.weightx = 0; |
---|
| 2681 | +// aWindowConstraints.weighty = 1; |
---|
| 2682 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2683 | +// aWindowConstraints.weightx = 1; |
---|
| 2684 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2685 | +// // aConstraints.gridheight = 3; |
---|
| 2686 | +// aWindowConstraints.gridx = 1; |
---|
| 2687 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2688 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2689 | +// aWindowConstraints.weightx = 0; |
---|
| 2690 | +// aWindowConstraints.gridx = 4; |
---|
| 2691 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2692 | +// // aConstraints.gridheight = 3; |
---|
| 2693 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2694 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2695 | +// scenePanel.setVisible(false); |
---|
| 2696 | +// centralPanel.setVisible(true); |
---|
| 2697 | +// XYZPanel.setVisible(false); |
---|
| 2698 | + bigThree.ClearUI(); |
---|
| 2699 | + bigThree.add(centralPanel); |
---|
| 2700 | + bigThree.FlushUI(); |
---|
2551 | 2701 | } else |
---|
2552 | | - if (event.getSource() == threeButton) |
---|
| 2702 | + if (source == threeButton) |
---|
2553 | 2703 | { |
---|
2554 | 2704 | 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(); |
---|
| 2705 | + |
---|
| 2706 | +// bigThree.remove(scenePanel); |
---|
| 2707 | +// bigThree.remove(centralPanel); |
---|
| 2708 | +// bigThree.remove(XYZPanel); |
---|
| 2709 | +// aWindowConstraints.gridx = 0; |
---|
| 2710 | +// aWindowConstraints.gridy = 0; |
---|
| 2711 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2712 | +// // aConstraints.gridheight = 3; |
---|
| 2713 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2714 | +// aWindowConstraints.weightx = 0; |
---|
| 2715 | +// aWindowConstraints.weighty = 1; |
---|
| 2716 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2717 | +// aWindowConstraints.weightx = 1; |
---|
| 2718 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2719 | +// // aConstraints.gridheight = 3; |
---|
| 2720 | +// aWindowConstraints.gridx = 1; |
---|
| 2721 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2722 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2723 | +// aWindowConstraints.weightx = 0; |
---|
| 2724 | +// aWindowConstraints.gridx = 4; |
---|
| 2725 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2726 | +// // aConstraints.gridheight = 3; |
---|
| 2727 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2728 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2729 | +// bigThree.validate(); |
---|
| 2730 | +// scenePanel.setVisible(false); |
---|
| 2731 | +// centralPanel.setVisible(true); |
---|
| 2732 | +// XYZPanel.setVisible(true); |
---|
| 2733 | + bigThree.ClearUI(); |
---|
| 2734 | + bigThree.add(centralPanel); |
---|
| 2735 | + bigThree.add(XYZPanel); |
---|
| 2736 | + bigThree.FlushUI(); |
---|
2579 | 2737 | } else |
---|
2580 | | - if (event.getSource() == fourButton) |
---|
| 2738 | + if (source == fourButton) |
---|
2581 | 2739 | { |
---|
2582 | 2740 | 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(); |
---|
| 2741 | + |
---|
| 2742 | +// bigThree.remove(scenePanel); |
---|
| 2743 | +// bigThree.remove(centralPanel); |
---|
| 2744 | +// bigThree.remove(XYZPanel); |
---|
| 2745 | +// aWindowConstraints.gridx = 0; |
---|
| 2746 | +// aWindowConstraints.gridy = 0; |
---|
| 2747 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2748 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2749 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2750 | +// aWindowConstraints.weightx = 1; |
---|
| 2751 | +// aWindowConstraints.weighty = 1; |
---|
| 2752 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2753 | +// aWindowConstraints.weightx = 1; |
---|
| 2754 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2755 | +// // aConstraints.gridheight = 3; |
---|
| 2756 | +// aWindowConstraints.gridx = 1; |
---|
| 2757 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2758 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2759 | +// aWindowConstraints.weightx = 0; |
---|
| 2760 | +// aWindowConstraints.gridx = 4; |
---|
| 2761 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2762 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2763 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2764 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2765 | +// bigThree.validate(); |
---|
| 2766 | +// scenePanel.setVisible(true); |
---|
| 2767 | +// centralPanel.setVisible(false); |
---|
| 2768 | +// XYZPanel.setVisible(false); |
---|
| 2769 | + bigThree.ClearUI(); |
---|
| 2770 | + bigThree.add(scenePanel); |
---|
| 2771 | + bigThree.FlushUI(); |
---|
2607 | 2772 | } else |
---|
2608 | | - if (event.getSource() == sixButton) |
---|
| 2773 | + if (source == sixButton) |
---|
2609 | 2774 | { |
---|
2610 | 2775 | 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(); |
---|
| 2776 | + |
---|
| 2777 | +// bigThree.remove(scenePanel); |
---|
| 2778 | +// bigThree.remove(centralPanel); |
---|
| 2779 | +// bigThree.remove(XYZPanel); |
---|
| 2780 | +// aWindowConstraints.gridx = 0; |
---|
| 2781 | +// aWindowConstraints.gridy = 0; |
---|
| 2782 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2783 | +// // aConstraints.gridheight = 3; |
---|
| 2784 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2785 | +// aWindowConstraints.weightx = 0; |
---|
| 2786 | +// aWindowConstraints.weighty = 1; |
---|
| 2787 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2788 | +// aWindowConstraints.weightx = 1; |
---|
| 2789 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2790 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2791 | +// aWindowConstraints.gridx = 1; |
---|
| 2792 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2793 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2794 | +// aWindowConstraints.weightx = 0; |
---|
| 2795 | +// aWindowConstraints.gridx = 4; |
---|
| 2796 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2797 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2798 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2799 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 2800 | +// bigThree.validate(); |
---|
| 2801 | +// scenePanel.setVisible(true); |
---|
| 2802 | +// centralPanel.setVisible(true); |
---|
| 2803 | +// XYZPanel.setVisible(false); |
---|
| 2804 | + bigThree.ClearUI(); |
---|
| 2805 | + bigThree.add(scenePanel); |
---|
| 2806 | + bigThree.add(centralPanel); |
---|
| 2807 | + bigThree.FlushUI(); |
---|
2635 | 2808 | } else |
---|
2636 | | - if (event.getSource() == sevenButton) |
---|
| 2809 | + if (source == sevenButton) |
---|
2637 | 2810 | { |
---|
2638 | 2811 | 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(); |
---|
| 2812 | + |
---|
| 2813 | +// bigThree.remove(scenePanel); |
---|
| 2814 | +// bigThree.remove(centralPanel); |
---|
| 2815 | +// bigThree.remove(XYZPanel); |
---|
| 2816 | +// aWindowConstraints.gridx = 0; |
---|
| 2817 | +// aWindowConstraints.gridy = 0; |
---|
| 2818 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2819 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2820 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2821 | +// aWindowConstraints.weightx = 0; |
---|
| 2822 | +// aWindowConstraints.weighty = 1; |
---|
| 2823 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2824 | +// aWindowConstraints.weightx = 1; |
---|
| 2825 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2826 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2827 | +// aWindowConstraints.gridx = 1; |
---|
| 2828 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2829 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2830 | +// aWindowConstraints.weightx = 0; |
---|
| 2831 | +// aWindowConstraints.gridx = 4; |
---|
| 2832 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2833 | +// // aConstraints.gridheight = 3; |
---|
| 2834 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2835 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2836 | +// bigThree.validate(); |
---|
| 2837 | +// scenePanel.setVisible(true); |
---|
| 2838 | +// centralPanel.setVisible(true); |
---|
| 2839 | +// XYZPanel.setVisible(true); |
---|
| 2840 | + bigThree.ClearUI(); |
---|
| 2841 | + bigThree.add(scenePanel); |
---|
| 2842 | + bigThree.add(centralPanel); |
---|
| 2843 | + bigThree.add(XYZPanel); |
---|
| 2844 | + bigThree.FlushUI(); |
---|
2663 | 2845 | } else |
---|
2664 | | - if (event.getSource() == rootButton) |
---|
| 2846 | + if (source == rootButton) |
---|
2665 | 2847 | { |
---|
2666 | 2848 | Object3D obj; |
---|
2667 | 2849 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2673 | 2855 | |
---|
2674 | 2856 | refreshContents(true); |
---|
2675 | 2857 | } else |
---|
2676 | | - if (event.getSource() == closeButton) |
---|
| 2858 | + if (source == closeButton) |
---|
2677 | 2859 | { |
---|
2678 | 2860 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2679 | 2861 | cRadio ab; |
---|
.. | .. |
---|
2694 | 2876 | } |
---|
2695 | 2877 | refreshContents(true); |
---|
2696 | 2878 | } else |
---|
2697 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 2879 | + if (source == editItem || source == editButton) |
---|
2698 | 2880 | { |
---|
2699 | 2881 | EditSelection(false); |
---|
2700 | 2882 | } else |
---|
2701 | | - if (event.getSource() == uneditButton) |
---|
| 2883 | + if (source == uneditButton) |
---|
2702 | 2884 | { |
---|
2703 | 2885 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2704 | 2886 | { |
---|
.. | .. |
---|
2710 | 2892 | |
---|
2711 | 2893 | child.editWindow = null; // ??????????? |
---|
2712 | 2894 | } |
---|
2713 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2895 | + objEditor.ctrlPanel.validate(); |
---|
2714 | 2896 | //objEditor.jTree.clearSelection(); |
---|
2715 | 2897 | //objEditor.ResetSliders(); |
---|
2716 | 2898 | refreshContents(true); |
---|
2717 | 2899 | } else |
---|
2718 | | - if (event.getSource() == clearPanelButton) |
---|
| 2900 | + if (source == clearPanelButton) |
---|
2719 | 2901 | { |
---|
2720 | 2902 | assert(copy == group); |
---|
2721 | 2903 | //copy.ClearUI(); |
---|
.. | .. |
---|
2726 | 2908 | listUI.clear(); |
---|
2727 | 2909 | refreshContents(true); |
---|
2728 | 2910 | } else |
---|
2729 | | - if (event.getSource() == allParamsButton) |
---|
| 2911 | + if (source == allParamsButton) |
---|
2730 | 2912 | { |
---|
2731 | 2913 | assert(copy == group); |
---|
2732 | 2914 | |
---|
.. | .. |
---|
2747 | 2929 | |
---|
2748 | 2930 | refreshContents(true); |
---|
2749 | 2931 | } else |
---|
2750 | | - if (event.getSource() == unselectButton) |
---|
| 2932 | + if (source == unselectButton) |
---|
2751 | 2933 | { |
---|
2752 | 2934 | objEditor.jTree.clearSelection(); |
---|
2753 | | - // ?? oct 2012 GraphreeD.clipboard.clear(); |
---|
| 2935 | + // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2754 | 2936 | objEditor.ResetSliders(); |
---|
2755 | 2937 | refreshContents(true); |
---|
2756 | 2938 | } else |
---|
2757 | | - if(event.getSource() instanceof cRadio) |
---|
| 2939 | + if(source instanceof cRadio) |
---|
2758 | 2940 | { |
---|
2759 | 2941 | group.parent = keepparent; |
---|
2760 | 2942 | group.attributes = 0; |
---|
2761 | 2943 | //group.editWindow = null; |
---|
2762 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 2944 | + /*cRadio*/ radio = (cRadio)source; |
---|
2763 | 2945 | Object3D obj = radio.GetObject(); |
---|
2764 | 2946 | System.out.println("Edit " + obj); |
---|
2765 | 2947 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|
.. | .. |
---|
2779 | 2961 | } |
---|
2780 | 2962 | |
---|
2781 | 2963 | copy = group; |
---|
2782 | | - //CameraPane.theRenderer.object = group; |
---|
| 2964 | + //Globals.theRenderer.object = group; |
---|
2783 | 2965 | if(!useclient) |
---|
2784 | 2966 | { |
---|
2785 | 2967 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2788 | 2970 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2789 | 2971 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2790 | 2972 | cameraView.object = group; |
---|
2791 | | - cameraView.lighttouched = true; |
---|
| 2973 | + //cameraView.lighttouched = true; |
---|
| 2974 | + Globals.lighttouched = true; |
---|
2792 | 2975 | topView.object = group; |
---|
2793 | 2976 | frontView.object = group; |
---|
2794 | 2977 | sideView.object = group; |
---|
.. | .. |
---|
2824 | 3007 | if (useclient) |
---|
2825 | 3008 | { |
---|
2826 | 3009 | cameraView.object = client; |
---|
2827 | | - cameraView.lighttouched = true; |
---|
| 3010 | + Globals.lighttouched = true; |
---|
2828 | 3011 | //topView.object = client; |
---|
2829 | 3012 | //frontView.object = client; |
---|
2830 | 3013 | //sideView.object = client; |
---|
.. | .. |
---|
2832 | 3015 | else |
---|
2833 | 3016 | { |
---|
2834 | 3017 | cameraView.object = group; |
---|
2835 | | - cameraView.lighttouched = true; |
---|
| 3018 | + Globals.lighttouched = true; |
---|
2836 | 3019 | //topView.object = group; |
---|
2837 | 3020 | //frontView.object = group; |
---|
2838 | 3021 | //sideView.object = group; |
---|
.. | .. |
---|
3065 | 3248 | obj = (Object3D)e.nextElement(); |
---|
3066 | 3249 | |
---|
3067 | 3250 | System.out.println("Object is: " + obj); |
---|
3068 | | - GraphreeD.AnalyzeObject(obj); |
---|
| 3251 | + GrafreeD.AnalyzeObject(obj); |
---|
3069 | 3252 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3070 | | - GraphreeD.AnalyzeObject(obj.bRep); |
---|
| 3253 | + GrafreeD.AnalyzeObject(obj.bRep); |
---|
3071 | 3254 | |
---|
3072 | 3255 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3073 | 3256 | } |
---|
.. | .. |
---|
3109 | 3292 | void GenNormals(boolean crease) |
---|
3110 | 3293 | { |
---|
3111 | 3294 | group.GenNormalsS(crease); |
---|
| 3295 | + |
---|
| 3296 | + refreshContents(); |
---|
| 3297 | + } |
---|
| 3298 | + |
---|
| 3299 | + void GenNormalsMINE() |
---|
| 3300 | + { |
---|
| 3301 | + group.selection.GenNormalsMINE(); |
---|
3112 | 3302 | |
---|
3113 | 3303 | refreshContents(); |
---|
3114 | 3304 | } |
---|
.. | .. |
---|
3157 | 3347 | |
---|
3158 | 3348 | //Object3D buffer; |
---|
3159 | 3349 | 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 | | - |
---|
| 3350 | +// BoundaryRep temprep; |
---|
| 3351 | +// Object3D nodes; |
---|
| 3352 | +// Vector<Vertex> vertices; |
---|
| 3353 | +// |
---|
| 3354 | +// cGroup buffer; |
---|
| 3355 | +// |
---|
| 3356 | +// public void Vertex(Object3D node, Vertex v) |
---|
| 3357 | +// { |
---|
| 3358 | +//// vertices.add(v); |
---|
| 3359 | +//// nodes.addElement(node); |
---|
| 3360 | +//// |
---|
| 3361 | +//// if (temprep.GetCache(v) != null) |
---|
| 3362 | +//// { |
---|
| 3363 | +//// temprep.Remove(v); |
---|
| 3364 | +//// } else |
---|
| 3365 | +//// { |
---|
| 3366 | +//// temprep.Remember(v); |
---|
| 3367 | +//// } |
---|
| 3368 | +// |
---|
| 3369 | +// //Object3D node = nodes.get(index); |
---|
| 3370 | +// temp.set(v); // vertices.get(index)); // temprep.GetVertex(k)); |
---|
| 3371 | +// // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3372 | +// |
---|
| 3373 | +// LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
| 3374 | +// |
---|
| 3375 | +// // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3376 | +// |
---|
| 3377 | +// cGroup g = new cGroup(); |
---|
| 3378 | +// |
---|
| 3379 | +// if (g.toParent == null) |
---|
| 3380 | +// { |
---|
| 3381 | +// g.toParent = LA.newMatrix(); |
---|
| 3382 | +// g.fromParent = LA.newMatrix(); |
---|
| 3383 | +// } |
---|
| 3384 | +// LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
| 3385 | +// LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
| 3386 | +// |
---|
| 3387 | +// g.add(GrafreeD.clipboard); |
---|
| 3388 | +// |
---|
| 3389 | +// buffer.add(g); |
---|
| 3390 | +// } |
---|
| 3391 | +// |
---|
| 3392 | +// public void Face(Object3D node, Face f) |
---|
| 3393 | +// { |
---|
| 3394 | +// |
---|
| 3395 | +// } |
---|
| 3396 | +// |
---|
| 3397 | +// void ParseVerticesOld() // ?? |
---|
| 3398 | +// { |
---|
| 3399 | +// //if (group.selection.size() != 1) |
---|
| 3400 | +// // return; |
---|
| 3401 | +// |
---|
| 3402 | +// temprep = new BoundaryRep(); |
---|
| 3403 | +// nodes = new Object3D(); |
---|
| 3404 | +// vertices = new Vector<Vertex>(); |
---|
| 3405 | +// |
---|
| 3406 | +// boolean epsequal = GrafreeD.epsequal; |
---|
| 3407 | +// GrafreeD.epsequal = true; |
---|
| 3408 | +// |
---|
| 3409 | +// for (int i=0; i<group.selection.size(); i++) |
---|
| 3410 | +// { |
---|
| 3411 | +// Object3D buffer = new cGroup(group.selection.get(i).name + "+"); |
---|
| 3412 | +// |
---|
| 3413 | +// group.selection.get(i).Parse( |
---|
| 3414 | +//this ); |
---|
| 3415 | +// |
---|
| 3416 | +// int repsize = temprep.VertexCount(); |
---|
| 3417 | +// int tablesize = temprep.vertextable.size(); |
---|
| 3418 | +// int nodesize = nodes.size(); |
---|
| 3419 | +// |
---|
| 3420 | +// assert(vertices.size() == nodes.size()); |
---|
| 3421 | +// |
---|
| 3422 | +// temprep.vertextable.elements(); |
---|
| 3423 | +// |
---|
| 3424 | +// java.util.Set<java.util.Map.Entry<Vertex,Vertex>> set = temprep.vertextable.entrySet(); |
---|
| 3425 | +// |
---|
| 3426 | +// for (java.util.Map.Entry<Vertex,Vertex> entry : set) |
---|
| 3427 | +// { |
---|
| 3428 | +// cGroup g = new cGroup(); |
---|
| 3429 | +// |
---|
| 3430 | +// int index = vertices.indexOf(entry.getValue()); // temprep.vertextable.(k)); |
---|
| 3431 | +// |
---|
| 3432 | +// Object3D node = nodes.get(index); |
---|
| 3433 | +// temp.set(vertices.get(index)); // temprep.GetVertex(k)); |
---|
| 3434 | +// // System.out.println("temp = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3435 | +// |
---|
| 3436 | +// LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
| 3437 | +// |
---|
| 3438 | +// // System.out.println("tem+ = " + temp.x + ", " + temp.y + ", " + temp.z); |
---|
| 3439 | +// |
---|
| 3440 | +// if (g.toParent == null) |
---|
| 3441 | +// { |
---|
| 3442 | +// g.toParent = LA.newMatrix(); |
---|
| 3443 | +// g.fromParent = LA.newMatrix(); |
---|
| 3444 | +// } |
---|
| 3445 | +// LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
| 3446 | +// LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
| 3447 | +// |
---|
| 3448 | +// g.add(GrafreeD.clipboard); |
---|
| 3449 | +// |
---|
| 3450 | +// buffer.add(g); |
---|
| 3451 | +// } |
---|
| 3452 | +// |
---|
| 3453 | +// makeSomething(buffer, i==group.selection.size()-1); |
---|
| 3454 | +// } |
---|
| 3455 | +// |
---|
| 3456 | +// GrafreeD.epsequal = epsequal; |
---|
| 3457 | +// |
---|
| 3458 | +// //buffer = null; |
---|
| 3459 | +// temprep = null; |
---|
| 3460 | +// nodes = null; |
---|
| 3461 | +// |
---|
| 3462 | +// refreshContents(); |
---|
| 3463 | +// } |
---|
| 3464 | + |
---|
3184 | 3465 | void ParseVertices() |
---|
3185 | 3466 | { |
---|
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; |
---|
| 3467 | + boolean epsequal = GrafreeD.epsequal; |
---|
| 3468 | + GrafreeD.epsequal = true; |
---|
3195 | 3469 | |
---|
3196 | 3470 | for (int i=0; i<group.selection.size(); i++) |
---|
3197 | 3471 | { |
---|
3198 | | - Object3D buffer = new cGroup(group.selection.get(i).name + "+"); |
---|
| 3472 | + final cGroup buffer = new cGroup(group.selection.get(i).name + "+"); |
---|
3199 | 3473 | |
---|
3200 | | - group.selection.get(i).Parse(this); |
---|
3201 | | - |
---|
3202 | | - int repsize = temprep.VertexCount(); |
---|
3203 | | - int tablesize = temprep.vertextable.size(); |
---|
3204 | | - int nodesize = nodes.size(); |
---|
| 3474 | + group.selection.get(i).Parse( |
---|
| 3475 | + |
---|
| 3476 | + new iParse() |
---|
| 3477 | + { |
---|
| 3478 | + public void Vertex(Object3D node, Vertex v) |
---|
| 3479 | + { |
---|
| 3480 | + temp.set(v); |
---|
| 3481 | + LA.xformPos(temp, node.GlobalTransformInv(), temp); |
---|
3205 | 3482 | |
---|
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(); |
---|
| 3483 | + cGroup g = new cGroup(); |
---|
3211 | 3484 | |
---|
3212 | | - for (java.util.Map.Entry<Vertex,Vertex> entry : set) |
---|
3213 | | - { |
---|
3214 | | - cGroup g = new cGroup(); |
---|
| 3485 | + if (g.toParent == null) |
---|
| 3486 | + { |
---|
| 3487 | + g.toParent = LA.newMatrix(); |
---|
| 3488 | + g.fromParent = LA.newMatrix(); |
---|
| 3489 | + } |
---|
| 3490 | + LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
| 3491 | + LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3215 | 3492 | |
---|
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); |
---|
| 3493 | + g.add(GrafreeD.clipboard); |
---|
3220 | 3494 | |
---|
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); |
---|
| 3495 | + buffer.add(g); |
---|
| 3496 | + } |
---|
3232 | 3497 | |
---|
3233 | | - g.add(GraphreeD.clipboard); |
---|
| 3498 | + public void Face(Object3D node, Face f) |
---|
| 3499 | + { |
---|
3234 | 3500 | |
---|
3235 | | - buffer.add(g); |
---|
3236 | | - } |
---|
| 3501 | + } |
---|
| 3502 | + } |
---|
| 3503 | + ); |
---|
3237 | 3504 | |
---|
3238 | 3505 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3239 | 3506 | } |
---|
3240 | 3507 | |
---|
3241 | | - GraphreeD.epsequal = epsequal; |
---|
3242 | | - |
---|
3243 | | - //buffer = null; |
---|
3244 | | - temprep = null; |
---|
3245 | | - nodes = null; |
---|
| 3508 | + GrafreeD.epsequal = epsequal; |
---|
3246 | 3509 | |
---|
3247 | 3510 | refreshContents(); |
---|
3248 | 3511 | } |
---|
3249 | | - |
---|
| 3512 | + |
---|
| 3513 | + void TextureVertices() |
---|
| 3514 | + { |
---|
| 3515 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 3516 | + { |
---|
| 3517 | + group.selection.get(i).Parse( |
---|
| 3518 | + new iParse() |
---|
| 3519 | + { |
---|
| 3520 | + public void Vertex(Object3D node, Vertex v) |
---|
| 3521 | + { |
---|
| 3522 | + cTexture tex = node.GetTextures(); |
---|
| 3523 | + String pigment = Object3D.GetPigment(tex); |
---|
| 3524 | + //String bump = Object3D.GetBump(tex); |
---|
| 3525 | + |
---|
| 3526 | + com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3527 | + |
---|
| 3528 | + double s = v.s; |
---|
| 3529 | + |
---|
| 3530 | + if (s == 1) |
---|
| 3531 | + s = 0; |
---|
| 3532 | + |
---|
| 3533 | + double t = v.t; |
---|
| 3534 | + |
---|
| 3535 | + if (t == 1) |
---|
| 3536 | + t = 0; |
---|
| 3537 | + |
---|
| 3538 | + int indexs = (int) (texturedata.getWidth() * s); |
---|
| 3539 | + int indext = (int) (texturedata.getHeight() * t); |
---|
| 3540 | + |
---|
| 3541 | + int index = indext * texturedata.getWidth() + indexs; |
---|
| 3542 | + |
---|
| 3543 | + java.nio.ByteBuffer bytebuf = (java.nio.ByteBuffer)texturedata.getBuffer(); |
---|
| 3544 | + |
---|
| 3545 | + int slide = bytebuf.capacity() / texturedata.getWidth() / texturedata.getHeight(); |
---|
| 3546 | + |
---|
| 3547 | + float scale = bytebuf.get(index*slide) & 0xFF; |
---|
| 3548 | + scale += bytebuf.get(index*slide+1) & 0xFF; |
---|
| 3549 | + scale += bytebuf.get(index*slide+2) & 0xFF; |
---|
| 3550 | + scale /= 3; |
---|
| 3551 | + |
---|
| 3552 | + scale /= 0xFF; |
---|
| 3553 | + // c'est quoi ca? scale /= 4; |
---|
| 3554 | + |
---|
| 3555 | + //v.AO = scale; |
---|
| 3556 | + |
---|
| 3557 | + v.x += v.norm.x * scale; |
---|
| 3558 | + v.y += v.norm.y * scale; |
---|
| 3559 | + v.z += v.norm.z * scale; |
---|
| 3560 | + } |
---|
| 3561 | + |
---|
| 3562 | + public void Face(Object3D node, Face f) |
---|
| 3563 | + { |
---|
| 3564 | + } |
---|
| 3565 | + } |
---|
| 3566 | + ); |
---|
| 3567 | + } |
---|
| 3568 | + |
---|
| 3569 | + refreshContents(); |
---|
| 3570 | + } |
---|
| 3571 | + |
---|
3250 | 3572 | void Align() |
---|
3251 | 3573 | { |
---|
| 3574 | + if (group.selection.size() == 0) |
---|
| 3575 | + return; |
---|
| 3576 | + |
---|
| 3577 | + cVector bbmin = new cVector(); |
---|
| 3578 | + cVector bbmax = new cVector(); |
---|
| 3579 | + |
---|
| 3580 | + group.selection.get(0).getBounds(bbmin, bbmax, true); |
---|
| 3581 | + |
---|
| 3582 | + double dx = bbmax.x - bbmin.x; |
---|
| 3583 | + double dy = bbmax.y - bbmin.y; |
---|
| 3584 | + double dz = bbmax.z - bbmin.z; |
---|
| 3585 | + |
---|
| 3586 | + double scale = Math.sqrt(dx*dx + dy*dy + dz*dz); |
---|
| 3587 | + |
---|
3252 | 3588 | for (int i=0; i<group.selection.size(); i++) |
---|
3253 | 3589 | { |
---|
3254 | 3590 | Object3D obj = group.selection.get(i); |
---|
3255 | 3591 | |
---|
3256 | | - LA.matTranslate(obj.toParent, i/2f, 0, 0); |
---|
3257 | | - LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0); |
---|
| 3592 | + LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
| 3593 | + LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
3258 | 3594 | } |
---|
3259 | 3595 | |
---|
3260 | 3596 | refreshContents(); |
---|
.. | .. |
---|
3267 | 3603 | // ref.SaveSupports(); |
---|
3268 | 3604 | // Object3D par = ref.parent; |
---|
3269 | 3605 | // ref.parent = null; |
---|
3270 | | -// Object3D lowres = (Object3D) GraphreeD.clone(ref); |
---|
| 3606 | +// Object3D lowres = (Object3D) GrafreeD.clone(ref); |
---|
3271 | 3607 | // ref.parent = par; |
---|
3272 | 3608 | // ref.RestoreSupports(); |
---|
3273 | 3609 | |
---|
.. | .. |
---|
3297 | 3633 | // lowres.SaveSupports(); |
---|
3298 | 3634 | // par = lowres.parent; |
---|
3299 | 3635 | // lowres.parent = null; |
---|
3300 | | -// Object3D newlow = (Object3D) GraphreeD.clone(lowres); |
---|
| 3636 | +// Object3D newlow = (Object3D) GrafreeD.clone(lowres); |
---|
3301 | 3637 | Object3D newlow = CloneObject(lowres, false); |
---|
3302 | 3638 | newlow.name = sn.switchobject.get(i).name; |
---|
3303 | 3639 | System.out.println(" pose#" + i + " = " + newlow); |
---|
.. | .. |
---|
3319 | 3655 | return; |
---|
3320 | 3656 | |
---|
3321 | 3657 | Object3D poses = group.selection.get(0); |
---|
3322 | | - Object3D ref = GraphreeD.clipboard.get(0); |
---|
| 3658 | + Object3D ref = GrafreeD.clipboard.get(0); |
---|
3323 | 3659 | |
---|
3324 | 3660 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3325 | 3661 | |
---|
.. | .. |
---|
3488 | 3824 | group.selection.RelinkToSupport(); // july 2014 |
---|
3489 | 3825 | System.out.println("DONE."); |
---|
3490 | 3826 | refreshContents(); |
---|
3491 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 3827 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3492 | 3828 | } |
---|
3493 | 3829 | |
---|
3494 | 3830 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
3513 | 3849 | |
---|
3514 | 3850 | void ClipMesh() |
---|
3515 | 3851 | { |
---|
3516 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 3852 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
3517 | 3853 | { |
---|
3518 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 3854 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
3519 | 3855 | |
---|
3520 | 3856 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3521 | 3857 | content = ((cGroup)content).get(0); |
---|
3522 | 3858 | |
---|
3523 | 3859 | // for (int i=0; i<group.selection.size(); i++) |
---|
3524 | 3860 | // { |
---|
3525 | | -// group.selection.get(i).ClipMesh(GraphreeD.clipboard); |
---|
| 3861 | +// group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3526 | 3862 | // } |
---|
3527 | | - group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3863 | + group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3528 | 3864 | } |
---|
3529 | | -// group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3865 | +// group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3530 | 3866 | System.out.println("DONE."); |
---|
3531 | 3867 | refreshContents(); |
---|
3532 | 3868 | } |
---|
.. | .. |
---|
3764 | 4100 | System.err.println("info : " + child.GetPath()); |
---|
3765 | 4101 | } |
---|
3766 | 4102 | } |
---|
3767 | | - else |
---|
3768 | | - { |
---|
3769 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
3770 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
3771 | | - System.err.println("info : " + group.GetPath()); |
---|
3772 | | - } |
---|
| 4103 | +// else |
---|
| 4104 | +// { |
---|
| 4105 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4106 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4107 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4108 | +// } |
---|
3773 | 4109 | |
---|
3774 | 4110 | objEditor.SetText(); // jan 2014 |
---|
3775 | 4111 | |
---|
3776 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4112 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
3777 | 4113 | CameraPane.flash = true; |
---|
3778 | 4114 | |
---|
3779 | 4115 | if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
3780 | 4116 | // a camera |
---|
3781 | 4117 | { |
---|
3782 | 4118 | 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; |
---|
| 4119 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4120 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4121 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
3786 | 4122 | } |
---|
3787 | 4123 | |
---|
3788 | 4124 | refreshContents(); |
---|
.. | .. |
---|
3864 | 4200 | { |
---|
3865 | 4201 | if (group.selection.isEmpty()) |
---|
3866 | 4202 | return; |
---|
3867 | | - GraphreeD.clipboardIsTempGroup = false; |
---|
| 4203 | + GrafreeD.clipboardIsTempGroup = false; |
---|
3868 | 4204 | Composite tGroup = null; |
---|
3869 | 4205 | if (group.selection.size() > 0) // 1) |
---|
3870 | 4206 | { |
---|
3871 | 4207 | tGroup = new cGroup(); |
---|
3872 | | - GraphreeD.clipboardIsTempGroup = true; |
---|
| 4208 | + GrafreeD.clipboardIsTempGroup = true; |
---|
3873 | 4209 | } |
---|
3874 | 4210 | |
---|
3875 | 4211 | if (cut) |
---|
.. | .. |
---|
3909 | 4245 | //System.out.println("cut " + child); |
---|
3910 | 4246 | //System.out.println("parent = " + child.parent); |
---|
3911 | 4247 | // tmp.addChild(child); |
---|
3912 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4248 | + if (GrafreeD.clipboardIsTempGroup) |
---|
3913 | 4249 | tGroup.add/*Child*/(tmp); |
---|
3914 | 4250 | else |
---|
3915 | | - GraphreeD.clipboard = tmp; |
---|
| 4251 | + GrafreeD.clipboard = tmp; |
---|
3916 | 4252 | } |
---|
3917 | 4253 | else |
---|
3918 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4254 | + if (GrafreeD.clipboardIsTempGroup) |
---|
3919 | 4255 | tGroup.add/*Child*/(child); |
---|
3920 | 4256 | else |
---|
3921 | | - GraphreeD.clipboard = child; |
---|
| 4257 | + GrafreeD.clipboard = child; |
---|
3922 | 4258 | } |
---|
3923 | 4259 | |
---|
3924 | 4260 | //ResetModel(); |
---|
.. | .. |
---|
3950 | 4286 | //System.out.println("cut " + elem); |
---|
3951 | 4287 | //System.out.println("parent = " + elem.parent); |
---|
3952 | 4288 | // tmp.addChild(elem); |
---|
3953 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4289 | + if (GrafreeD.clipboardIsTempGroup) |
---|
3954 | 4290 | tGroup.add/*Child*/(tmp); |
---|
3955 | 4291 | else |
---|
3956 | | - GraphreeD.clipboard = tmp; |
---|
| 4292 | + GrafreeD.clipboard = tmp; |
---|
3957 | 4293 | } |
---|
3958 | 4294 | else |
---|
3959 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4295 | + if (GrafreeD.clipboardIsTempGroup) |
---|
3960 | 4296 | tGroup.add/*Child*/(child); |
---|
3961 | 4297 | else |
---|
3962 | | - GraphreeD.clipboard = child; |
---|
| 4298 | + GrafreeD.clipboard = child; |
---|
3963 | 4299 | } |
---|
3964 | 4300 | |
---|
3965 | 4301 | } |
---|
3966 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
3967 | | - GraphreeD.clipboard = tGroup; |
---|
| 4302 | + if (GrafreeD.clipboardIsTempGroup) |
---|
| 4303 | + GrafreeD.clipboard = tGroup; |
---|
3968 | 4304 | if (cut) |
---|
3969 | 4305 | { |
---|
3970 | 4306 | ResetModel(); |
---|
.. | .. |
---|
3974 | 4310 | |
---|
3975 | 4311 | void paste(boolean expand) |
---|
3976 | 4312 | { |
---|
3977 | | - // if (GraphreeD.clipboard == null) |
---|
| 4313 | + // if (GrafreeD.clipboard == null) |
---|
3978 | 4314 | // return; |
---|
3979 | 4315 | boolean first = true; |
---|
3980 | 4316 | |
---|
3981 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4317 | + if (GrafreeD.clipboardIsTempGroup) |
---|
3982 | 4318 | { |
---|
3983 | 4319 | Composite temp; |
---|
3984 | 4320 | |
---|
.. | .. |
---|
3989 | 4325 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
3990 | 4326 | */ |
---|
3991 | 4327 | Object3D elem; |
---|
3992 | | - for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4328 | + for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
3993 | 4329 | { |
---|
3994 | 4330 | Object3D child = (Object3D)e.nextElement(); |
---|
3995 | 4331 | |
---|
.. | .. |
---|
4003 | 4339 | else |
---|
4004 | 4340 | elem = child.deepCopy(); // ? |
---|
4005 | 4341 | child.parent = keepparent; |
---|
4006 | | - //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
| 4342 | + //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
4007 | 4343 | // elem = elem.get(0); |
---|
4008 | 4344 | makeSomething(elem, true); // ?? first); |
---|
4009 | 4345 | //group.addChild(elem); |
---|
.. | .. |
---|
4023 | 4359 | //Object3D cb = Applet3D.clipboard; |
---|
4024 | 4360 | //temp.addChild(cb); |
---|
4025 | 4361 | //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()); |
---|
| 4362 | + assert(GrafreeD.clipboard.parent == null); |
---|
| 4363 | + Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
| 4364 | + GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4365 | + if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
| 4366 | + makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
4031 | 4367 | else |
---|
4032 | | - makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy()); |
---|
4033 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 4368 | + makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
| 4369 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
4034 | 4370 | } |
---|
4035 | 4371 | |
---|
4036 | 4372 | ResetModel(); |
---|
.. | .. |
---|
4039 | 4375 | |
---|
4040 | 4376 | void pasteInto(boolean copyit) |
---|
4041 | 4377 | { |
---|
4042 | | -// if (GraphreeD.clipboard == null) |
---|
| 4378 | +// if (GrafreeD.clipboard == null) |
---|
4043 | 4379 | // return; |
---|
4044 | 4380 | |
---|
4045 | 4381 | if (group.selection.size() != 1) |
---|
.. | .. |
---|
4072 | 4408 | { |
---|
4073 | 4409 | boolean first = true; |
---|
4074 | 4410 | |
---|
4075 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4411 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4076 | 4412 | { |
---|
4077 | | - Composite temp = (Composite)GraphreeD.clipboard; |
---|
| 4413 | + Composite temp = (Composite)GrafreeD.clipboard; |
---|
4078 | 4414 | Object3D copy; |
---|
4079 | 4415 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4080 | 4416 | { |
---|
.. | .. |
---|
4084 | 4420 | } |
---|
4085 | 4421 | } else |
---|
4086 | 4422 | { |
---|
4087 | | - linkSomething(GraphreeD.clipboard); //.get(0)); |
---|
| 4423 | + linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
4088 | 4424 | } |
---|
4089 | 4425 | } |
---|
4090 | 4426 | } |
---|
.. | .. |
---|
4276 | 4612 | makeSomething(csg); |
---|
4277 | 4613 | } |
---|
4278 | 4614 | |
---|
| 4615 | + void Ungroup(Object3D g) |
---|
| 4616 | + { |
---|
| 4617 | + if (g instanceof HiddenObject) |
---|
| 4618 | + { |
---|
| 4619 | + HiddenObject h = (HiddenObject) g; |
---|
| 4620 | + |
---|
| 4621 | + for (int i=0; i<h.ActualSize(); i++) |
---|
| 4622 | + { |
---|
| 4623 | + objEditor.makeSomething(h.get(i), false); |
---|
| 4624 | + } |
---|
| 4625 | + } |
---|
| 4626 | + else |
---|
| 4627 | + { |
---|
| 4628 | + for (int i=0; i<g.Size(); i++) |
---|
| 4629 | + { |
---|
| 4630 | + objEditor.makeSomething(g.get(i), false); |
---|
| 4631 | + } |
---|
| 4632 | + } |
---|
| 4633 | + } |
---|
| 4634 | + |
---|
4279 | 4635 | void ungroup() |
---|
4280 | 4636 | { |
---|
4281 | 4637 | /* |
---|
.. | .. |
---|
4471 | 4827 | |
---|
4472 | 4828 | void ImportGFD() |
---|
4473 | 4829 | { |
---|
4474 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD); |
---|
| 4830 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4475 | 4831 | browser.show(); |
---|
4476 | 4832 | String filename = browser.getFile(); |
---|
4477 | 4833 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4509 | 4865 | |
---|
4510 | 4866 | void ImportVRMLX3D() |
---|
4511 | 4867 | { |
---|
4512 | | - if (GraphreeD.standAlone) |
---|
| 4868 | + if (GrafreeD.standAlone) |
---|
4513 | 4869 | { |
---|
4514 | 4870 | /**/ |
---|
4515 | 4871 | FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
.. | .. |
---|
4526 | 4882 | |
---|
4527 | 4883 | String GetFile(String dialogName) |
---|
4528 | 4884 | { |
---|
4529 | | - if (GraphreeD.standAlone) |
---|
| 4885 | + if (GrafreeD.standAlone) |
---|
4530 | 4886 | { |
---|
4531 | 4887 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4532 | 4888 | browser.show(); |
---|
.. | .. |
---|
4635 | 4991 | private MenuItem resetsupportItem; |
---|
4636 | 4992 | private MenuItem resetreferencesItem; |
---|
4637 | 4993 | private MenuItem linkverticesItem; |
---|
| 4994 | + private MenuItem relinkverticesItem; |
---|
4638 | 4995 | private MenuItem setMasterItem; |
---|
4639 | 4996 | private MenuItem resetMeshItem; |
---|
4640 | 4997 | private MenuItem stepAllItem; |
---|
.. | .. |
---|
4653 | 5010 | private MenuItem clearItem; |
---|
4654 | 5011 | private MenuItem clearAllItem; |
---|
4655 | 5012 | private MenuItem genUVItem; |
---|
| 5013 | + private MenuItem genNormalsMESHItem; |
---|
4656 | 5014 | private MenuItem genNormalsCADItem; |
---|
4657 | 5015 | private MenuItem genNormalsORGANItem; |
---|
| 5016 | + private MenuItem genNormalsMINEItem; |
---|
4658 | 5017 | private MenuItem stripifyItem; |
---|
4659 | 5018 | private MenuItem unstripifyItem; |
---|
4660 | 5019 | private MenuItem trimItem; |
---|
.. | .. |
---|
4696 | 5055 | private MenuItem resetCentroidItem; |
---|
4697 | 5056 | private MenuItem transformgeometryItem; |
---|
4698 | 5057 | private MenuItem resetTransformItem; |
---|
| 5058 | + private MenuItem hideItem; |
---|
4699 | 5059 | private MenuItem grabItem; |
---|
4700 | 5060 | private MenuItem backItem; |
---|
4701 | 5061 | private MenuItem frontItem; |
---|
.. | .. |
---|
4716 | 5076 | |
---|
4717 | 5077 | private MenuItem resetParentItem; |
---|
4718 | 5078 | private MenuItem repairParentItem; |
---|
| 5079 | + private MenuItem repairShadowItem; |
---|
4719 | 5080 | private MenuItem sortbysizeItem; |
---|
4720 | 5081 | private MenuItem sortbynameItem; |
---|
4721 | 5082 | |
---|
.. | .. |
---|
4728 | 5089 | private MenuItem particleItem; |
---|
4729 | 5090 | private MenuItem ragdollItem; |
---|
4730 | 5091 | private MenuItem ragdoll2Item; |
---|
| 5092 | + private MenuItem heightFieldItem; |
---|
| 5093 | + private MenuItem textureFieldItem; |
---|
4731 | 5094 | private MenuItem gridItem; |
---|
4732 | 5095 | private MenuItem rectoidItem; |
---|
4733 | 5096 | private MenuItem ellipsoidItem; |
---|
4734 | 5097 | private MenuItem coneItem; |
---|
4735 | 5098 | private MenuItem torusItem; |
---|
4736 | 5099 | private MenuItem superItem; |
---|
| 5100 | + private MenuItem kleinItem; |
---|
4737 | 5101 | private MenuItem blobItem; |
---|
4738 | 5102 | private MenuItem latheItem; |
---|
4739 | 5103 | private MenuItem bezierItem; |
---|
.. | .. |
---|
4746 | 5110 | private MenuItem csgItem; |
---|
4747 | 5111 | private MenuItem templateItem; |
---|
4748 | 5112 | private MenuItem textureItem; |
---|
| 5113 | + private MenuItem billboardItem; |
---|
4749 | 5114 | private MenuItem shadowXItem; |
---|
4750 | 5115 | private MenuItem shadowYItem; |
---|
4751 | 5116 | private MenuItem shadowZItem; |
---|