.. | .. |
---|
22 | 22 | //static final long serialVersionUID = -607422624994562685L; |
---|
23 | 23 | static final long serialVersionUID = 5022536242724664900L; |
---|
24 | 24 | |
---|
| 25 | + // Use GetUUID for backward compatibility with null. |
---|
25 | 26 | private UUID uuid = UUID.randomUUID(); |
---|
26 | 27 | |
---|
27 | 28 | // TEMPORARY for mocap undo. No need to be transient. |
---|
.. | .. |
---|
29 | 30 | Object3D saveskeleton; |
---|
30 | 31 | // |
---|
31 | 32 | |
---|
32 | | - byte[] versions[] = new byte[100][]; |
---|
| 33 | + String skyboxname; |
---|
| 34 | + String skyboxext; |
---|
| 35 | + |
---|
| 36 | + Object3D versionlist[]; |
---|
33 | 37 | int versionindex = -1; |
---|
34 | 38 | |
---|
| 39 | + java.util.Hashtable<java.util.UUID, Object3D> versiontable; // = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 40 | + |
---|
35 | 41 | ScriptNode scriptnode; |
---|
36 | 42 | |
---|
37 | 43 | void InitOthers() |
---|
.. | .. |
---|
219 | 225 | // o.bRep.support = null; |
---|
220 | 226 | // } |
---|
221 | 227 | o.selection = this.selection; |
---|
222 | | - o.versions = this.versions; |
---|
| 228 | + o.versionlist = this.versionlist; |
---|
223 | 229 | o.versionindex = this.versionindex; |
---|
224 | 230 | |
---|
225 | 231 | if (this.support != null) |
---|
.. | .. |
---|
241 | 247 | // this.bRep.support = null; |
---|
242 | 248 | // this.support = null; |
---|
243 | 249 | // this.fileparent = null; |
---|
| 250 | + } |
---|
| 251 | + |
---|
| 252 | +// Object3D GetObject(java.util.UUID uuid) |
---|
| 253 | +// { |
---|
| 254 | +// if (this.uuid.equals(uuid)) |
---|
| 255 | +// return this; |
---|
| 256 | +// |
---|
| 257 | +// if (blockloop) |
---|
| 258 | +// return null; |
---|
| 259 | +// |
---|
| 260 | +// blockloop = true; |
---|
| 261 | +// |
---|
| 262 | +// for (int i=0; i<Size(); i++) |
---|
| 263 | +// { |
---|
| 264 | +// Object3D o = get(i).GetObject(uuid); |
---|
| 265 | +// |
---|
| 266 | +// if (o != null) |
---|
| 267 | +// return o; |
---|
| 268 | +// } |
---|
| 269 | +// |
---|
| 270 | +// blockloop = false; |
---|
| 271 | +// |
---|
| 272 | +// return null; |
---|
| 273 | +// } |
---|
| 274 | + |
---|
| 275 | + transient boolean tag; |
---|
| 276 | + |
---|
| 277 | + void TagObjects(Object3D o, boolean tag) |
---|
| 278 | + { |
---|
| 279 | + if (blockloop) |
---|
| 280 | + return; |
---|
| 281 | + |
---|
| 282 | + o.tag = tag; |
---|
| 283 | + |
---|
| 284 | + if (o == this) |
---|
| 285 | + return; |
---|
| 286 | + |
---|
| 287 | + blockloop = true; |
---|
| 288 | + |
---|
| 289 | + for (int i=0; i<Size(); i++) |
---|
| 290 | + { |
---|
| 291 | + get(i).TagObjects(o, tag); |
---|
| 292 | + } |
---|
| 293 | + |
---|
| 294 | + blockloop = false; |
---|
| 295 | + } |
---|
| 296 | + |
---|
| 297 | + boolean HasTags() |
---|
| 298 | + { |
---|
| 299 | + if (blockloop) |
---|
| 300 | + return false; |
---|
| 301 | + |
---|
| 302 | + blockloop = true; |
---|
| 303 | + |
---|
| 304 | + boolean hasTags = false; |
---|
| 305 | + |
---|
| 306 | + for (int i=0; i<Size(); i++) |
---|
| 307 | + { |
---|
| 308 | + hasTags |= get(i).tag || get(i).HasTags(); |
---|
| 309 | + |
---|
| 310 | + if (hasTags) |
---|
| 311 | + break; |
---|
| 312 | + } |
---|
| 313 | + |
---|
| 314 | + blockloop = false; |
---|
| 315 | + |
---|
| 316 | + return hasTags; |
---|
244 | 317 | } |
---|
245 | 318 | |
---|
246 | 319 | void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
.. | .. |
---|
277 | 350 | |
---|
278 | 351 | this.selection = o.selection; |
---|
279 | 352 | |
---|
280 | | - this.versions = o.versions; |
---|
| 353 | + this.versionlist = o.versionlist; |
---|
281 | 354 | this.versionindex = o.versionindex; |
---|
282 | 355 | // July 2019 if (this.bRep != null) |
---|
283 | 356 | // this.bRep.support = o.transientrep; |
---|
.. | .. |
---|
426 | 499 | } |
---|
427 | 500 | |
---|
428 | 501 | boolean live = false; |
---|
| 502 | + transient boolean keepdontselect; |
---|
429 | 503 | boolean dontselect = false; |
---|
430 | 504 | boolean hide = false; |
---|
431 | 505 | boolean link2master = false; // performs reset support/master at each frame |
---|
.. | .. |
---|
613 | 687 | { |
---|
614 | 688 | if (maxcount != 1) |
---|
615 | 689 | { |
---|
616 | | - new Exception().printStackTrace(); |
---|
| 690 | + //new Exception().printStackTrace(); |
---|
617 | 691 | } |
---|
618 | 692 | |
---|
619 | 693 | toParentMarked = LA.newMatrix(); |
---|
.. | .. |
---|
1010 | 1084 | |
---|
1011 | 1085 | if (material == null || material.multiply) |
---|
1012 | 1086 | return true; |
---|
| 1087 | + |
---|
| 1088 | + if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
| 1089 | + return false; |
---|
1013 | 1090 | |
---|
1014 | 1091 | // Transparent objects are dynamic because we have to sort the triangles. |
---|
1015 | 1092 | return material.opacity > 0.99; |
---|
.. | .. |
---|
2292 | 2369 | |
---|
2293 | 2370 | InitOthers(); |
---|
2294 | 2371 | |
---|
2295 | | - if (this instanceof Camera) |
---|
2296 | | - { |
---|
2297 | | - material.shift = 90; |
---|
2298 | | - } |
---|
2299 | | - |
---|
2300 | 2372 | material.multiply = multiply; |
---|
2301 | 2373 | |
---|
2302 | 2374 | if (multiply) |
---|
.. | .. |
---|
2437 | 2509 | else |
---|
2438 | 2510 | { |
---|
2439 | 2511 | //((ObjEditor)editWindow).SetupUI2(null); |
---|
| 2512 | + if (objectUI != null) |
---|
| 2513 | + ((ObjEditor)objectUI).pinButton.setSelected(pinned); |
---|
| 2514 | + else |
---|
| 2515 | + //new Exception().printStackTrace(); |
---|
| 2516 | + System.err.println("objectUI is null"); |
---|
2440 | 2517 | } |
---|
2441 | 2518 | } |
---|
2442 | 2519 | |
---|
.. | .. |
---|
2566 | 2643 | private static final int editSelf = 1; |
---|
2567 | 2644 | private static final int editChild = 2; |
---|
2568 | 2645 | |
---|
2569 | | - void drawEditHandles(ClickInfo info, int level) |
---|
| 2646 | + void drawEditHandles(//ClickInfo info, |
---|
| 2647 | + int level) |
---|
2570 | 2648 | { |
---|
2571 | 2649 | if (level == 0) |
---|
2572 | 2650 | { |
---|
.. | .. |
---|
2574 | 2652 | return; |
---|
2575 | 2653 | |
---|
2576 | 2654 | Object3D selectee; |
---|
2577 | | - for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(info, level + 1)) |
---|
| 2655 | + for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(//info, |
---|
| 2656 | + level + 1)) |
---|
2578 | 2657 | { |
---|
2579 | 2658 | selectee = (Object3D) e.nextElement(); |
---|
2580 | 2659 | } |
---|
.. | .. |
---|
2582 | 2661 | } else |
---|
2583 | 2662 | { |
---|
2584 | 2663 | //super. |
---|
2585 | | - drawEditHandles0(info, level + 1); |
---|
| 2664 | + drawEditHandles0(//info, |
---|
| 2665 | + level + 1); |
---|
2586 | 2666 | } |
---|
2587 | 2667 | } |
---|
2588 | 2668 | |
---|
2589 | | - boolean doEditClick(ClickInfo info, int level) |
---|
| 2669 | + boolean doEditClick(//ClickInfo info, |
---|
| 2670 | + int level) |
---|
2590 | 2671 | { |
---|
2591 | 2672 | doSomething = 0; |
---|
2592 | 2673 | if (level == 0) |
---|
2593 | 2674 | { |
---|
2594 | | - return doParentClick(info); |
---|
| 2675 | + return doParentClick(); //info); |
---|
2595 | 2676 | } |
---|
2596 | 2677 | if (//super. |
---|
2597 | | - doEditClick0(info, level)) |
---|
| 2678 | + doEditClick0(//info, |
---|
| 2679 | + level)) |
---|
2598 | 2680 | { |
---|
2599 | 2681 | doSomething = 1; |
---|
2600 | 2682 | return true; |
---|
.. | .. |
---|
2604 | 2686 | } |
---|
2605 | 2687 | } |
---|
2606 | 2688 | |
---|
2607 | | - boolean doParentClick(ClickInfo info) |
---|
| 2689 | + boolean doParentClick() //ClickInfo info) |
---|
2608 | 2690 | { |
---|
2609 | 2691 | if (selection == null) |
---|
2610 | 2692 | { |
---|
.. | .. |
---|
2617 | 2699 | for (java.util.Enumeration e = selection.elements(); e.hasMoreElements();) |
---|
2618 | 2700 | { |
---|
2619 | 2701 | Object3D selectee = (Object3D) e.nextElement(); |
---|
2620 | | - if (selectee.doEditClick(info, 1)) |
---|
| 2702 | + if (selectee.doEditClick(//info, |
---|
| 2703 | + 1)) |
---|
2621 | 2704 | { |
---|
2622 | 2705 | childToDrag = selectee; |
---|
2623 | 2706 | doSomething = 2; |
---|
.. | .. |
---|
2629 | 2712 | return retval; |
---|
2630 | 2713 | } |
---|
2631 | 2714 | |
---|
2632 | | - void doEditDrag(ClickInfo info, boolean opposite) |
---|
| 2715 | + void doEditDrag(//ClickInfo clickInfo, |
---|
| 2716 | + boolean opposite) |
---|
2633 | 2717 | { |
---|
2634 | 2718 | switch (doSomething) |
---|
2635 | 2719 | { |
---|
2636 | 2720 | case 1: // '\001' |
---|
2637 | 2721 | //super. |
---|
2638 | | - doEditDrag0(info, opposite); |
---|
| 2722 | + doEditDrag0(//clickInfo, |
---|
| 2723 | + opposite); |
---|
2639 | 2724 | break; |
---|
2640 | 2725 | |
---|
2641 | 2726 | case 2: // '\002' |
---|
.. | .. |
---|
2648 | 2733 | { |
---|
2649 | 2734 | //sel.hitSomething = childToDrag.hitSomething; |
---|
2650 | 2735 | //childToDrag.doEditDrag(info); |
---|
2651 | | - sel.doEditDrag(info, opposite); |
---|
| 2736 | + sel.doEditDrag(//clickInfo, |
---|
| 2737 | + opposite); |
---|
2652 | 2738 | } else |
---|
2653 | 2739 | { |
---|
2654 | 2740 | //super. |
---|
2655 | | - doEditDrag0(info, opposite); |
---|
| 2741 | + doEditDrag0(//clickInfo, |
---|
| 2742 | + opposite); |
---|
2656 | 2743 | } |
---|
2657 | 2744 | } |
---|
2658 | 2745 | break; |
---|
.. | .. |
---|
2670 | 2757 | { |
---|
2671 | 2758 | deselectAll(); |
---|
2672 | 2759 | } |
---|
| 2760 | + |
---|
| 2761 | + new Exception().printStackTrace(); |
---|
| 2762 | + |
---|
2673 | 2763 | ClickInfo newInfo = new ClickInfo(); |
---|
2674 | 2764 | newInfo.flags = info.flags; |
---|
2675 | 2765 | newInfo.bounds = info.bounds; |
---|
.. | .. |
---|
3527 | 3617 | |
---|
3528 | 3618 | void ClearMaterials() |
---|
3529 | 3619 | { |
---|
| 3620 | + if (blockloop) |
---|
| 3621 | + return; |
---|
| 3622 | + |
---|
| 3623 | + blockloop = true; |
---|
| 3624 | + |
---|
3530 | 3625 | ClearMaterial(); |
---|
3531 | | - for (int i = 0; i < size(); i++) |
---|
| 3626 | + for (int i = 0; i < Size(); i++) |
---|
3532 | 3627 | { |
---|
3533 | | - Object3D child = (Object3D) reserve(i); |
---|
| 3628 | + Object3D child = (Object3D) get(i); |
---|
3534 | 3629 | if (child == null) |
---|
3535 | 3630 | continue; |
---|
3536 | 3631 | child.ClearMaterials(); |
---|
3537 | | - release(i); |
---|
3538 | 3632 | } |
---|
| 3633 | + |
---|
| 3634 | + blockloop = false; |
---|
| 3635 | + } |
---|
| 3636 | + |
---|
| 3637 | + void ClearVersionList() |
---|
| 3638 | + { |
---|
| 3639 | + this.versionlist = null; |
---|
| 3640 | + this.versionindex = -1; |
---|
| 3641 | + this.versiontable = null; |
---|
| 3642 | + } |
---|
| 3643 | + |
---|
| 3644 | + void ClearVersions() |
---|
| 3645 | + { |
---|
| 3646 | + if (blockloop) |
---|
| 3647 | + return; |
---|
| 3648 | + |
---|
| 3649 | + blockloop = true; |
---|
| 3650 | + |
---|
| 3651 | + ClearVersionList(); |
---|
| 3652 | + for (int i = 0; i < Size(); i++) |
---|
| 3653 | + { |
---|
| 3654 | + Object3D child = (Object3D) get(i); |
---|
| 3655 | + if (child == null) |
---|
| 3656 | + continue; |
---|
| 3657 | + child.ClearVersions(); |
---|
| 3658 | + } |
---|
| 3659 | + |
---|
| 3660 | + blockloop = false; |
---|
3539 | 3661 | } |
---|
3540 | 3662 | |
---|
3541 | 3663 | void FlipV(boolean flip) |
---|
.. | .. |
---|
5420 | 5542 | blockloop = false; |
---|
5421 | 5543 | } |
---|
5422 | 5544 | |
---|
| 5545 | + void ResetSelectable() |
---|
| 5546 | + { |
---|
| 5547 | + if (blockloop) |
---|
| 5548 | + return; |
---|
| 5549 | + |
---|
| 5550 | + blockloop = true; |
---|
| 5551 | + |
---|
| 5552 | + keepdontselect = dontselect; |
---|
| 5553 | + dontselect = true; |
---|
| 5554 | + |
---|
| 5555 | + Object3D child; |
---|
| 5556 | + int nb = Size(); |
---|
| 5557 | + for (int i = 0; i < nb; i++) |
---|
| 5558 | + { |
---|
| 5559 | + child = (Object3D) get(i); |
---|
| 5560 | + if (child == null) |
---|
| 5561 | + continue; |
---|
| 5562 | + child.ResetSelectable(); |
---|
| 5563 | + } |
---|
| 5564 | + |
---|
| 5565 | + blockloop = false; |
---|
| 5566 | + } |
---|
| 5567 | + |
---|
| 5568 | + void RestoreSelectable() |
---|
| 5569 | + { |
---|
| 5570 | + if (blockloop) |
---|
| 5571 | + return; |
---|
| 5572 | + |
---|
| 5573 | + blockloop = true; |
---|
| 5574 | + |
---|
| 5575 | + dontselect = keepdontselect; |
---|
| 5576 | + |
---|
| 5577 | + Object3D child; |
---|
| 5578 | + int nb = Size(); |
---|
| 5579 | + for (int i = 0; i < nb; i++) |
---|
| 5580 | + { |
---|
| 5581 | + child = (Object3D) get(i); |
---|
| 5582 | + if (child == null) |
---|
| 5583 | + continue; |
---|
| 5584 | + child.RestoreSelectable(); |
---|
| 5585 | + } |
---|
| 5586 | + |
---|
| 5587 | + blockloop = false; |
---|
| 5588 | + } |
---|
| 5589 | + |
---|
5423 | 5590 | boolean IsSelected() |
---|
5424 | 5591 | { |
---|
5425 | 5592 | if (parent == null) |
---|
.. | .. |
---|
5480 | 5647 | if (fullname == null) |
---|
5481 | 5648 | return ""; |
---|
5482 | 5649 | |
---|
| 5650 | + if (fullname.pigment != null) |
---|
| 5651 | + { |
---|
| 5652 | + return fullname.pigment; |
---|
| 5653 | + } |
---|
| 5654 | + |
---|
5483 | 5655 | // System.out.println("Fullname = " + fullname); |
---|
5484 | 5656 | |
---|
5485 | 5657 | // Does not work on Windows due to C: |
---|
.. | .. |
---|
5492 | 5664 | |
---|
5493 | 5665 | if (split.length == 0) |
---|
5494 | 5666 | { |
---|
5495 | | - return ""; |
---|
| 5667 | + return fullname.pigment = ""; |
---|
5496 | 5668 | } |
---|
5497 | 5669 | |
---|
5498 | 5670 | if (split.length <= 2) |
---|
.. | .. |
---|
5500 | 5672 | if (fullname.name.endsWith(":")) |
---|
5501 | 5673 | { |
---|
5502 | 5674 | // Windows |
---|
5503 | | - return fullname.name.substring(0, fullname.name.length()-1); |
---|
| 5675 | + return fullname.pigment = fullname.name.substring(0, fullname.name.length()-1); |
---|
5504 | 5676 | } |
---|
5505 | 5677 | |
---|
5506 | | - return split[0]; |
---|
| 5678 | + return fullname.pigment = split[0]; |
---|
5507 | 5679 | } |
---|
5508 | 5680 | |
---|
5509 | 5681 | // Windows |
---|
5510 | 5682 | assert(split.length == 4); |
---|
5511 | 5683 | |
---|
5512 | | - return split[0] + ":" + split[1]; |
---|
| 5684 | + return fullname.pigment = split[0] + ":" + split[1]; |
---|
5513 | 5685 | } |
---|
5514 | 5686 | |
---|
5515 | 5687 | static String GetBump(cTexture fullname) |
---|
5516 | 5688 | { |
---|
5517 | 5689 | if (fullname == null) |
---|
5518 | 5690 | return ""; |
---|
| 5691 | + |
---|
| 5692 | + if (fullname.bump != null) |
---|
| 5693 | + { |
---|
| 5694 | + return fullname.bump; |
---|
| 5695 | + } |
---|
5519 | 5696 | |
---|
5520 | 5697 | // System.out.println("Fullname = " + fullname); |
---|
5521 | 5698 | // Does not work on Windows due to C: |
---|
.. | .. |
---|
5527 | 5704 | |
---|
5528 | 5705 | if (split.length == 0) |
---|
5529 | 5706 | { |
---|
5530 | | - return ""; |
---|
| 5707 | + return fullname.bump = ""; |
---|
5531 | 5708 | } |
---|
5532 | 5709 | |
---|
5533 | 5710 | if (split.length == 1) |
---|
5534 | 5711 | { |
---|
5535 | | - return ""; |
---|
| 5712 | + return fullname.bump = ""; |
---|
5536 | 5713 | } |
---|
5537 | 5714 | |
---|
5538 | 5715 | if (split.length == 2) |
---|
.. | .. |
---|
5540 | 5717 | if (fullname.name.endsWith(":")) |
---|
5541 | 5718 | { |
---|
5542 | 5719 | // Windows |
---|
5543 | | - return ""; |
---|
| 5720 | + return fullname.bump = ""; |
---|
5544 | 5721 | } |
---|
5545 | 5722 | |
---|
5546 | | - return split[1]; |
---|
| 5723 | + return fullname.bump = split[1]; |
---|
5547 | 5724 | } |
---|
5548 | 5725 | |
---|
5549 | 5726 | // Windows |
---|
5550 | 5727 | assert(split.length == 4); |
---|
5551 | 5728 | |
---|
5552 | | - return split[2] + ":" + split[3]; |
---|
| 5729 | + return fullname.bump = split[2] + ":" + split[3]; |
---|
5553 | 5730 | } |
---|
5554 | 5731 | |
---|
5555 | 5732 | String GetPigmentTexture() |
---|
.. | .. |
---|
5632 | 5809 | texname = ""; |
---|
5633 | 5810 | |
---|
5634 | 5811 | GetTextures().name = texname + ":" + GetBump(GetTextures()); |
---|
| 5812 | + |
---|
| 5813 | + GetTextures().pigment = null; |
---|
| 5814 | + |
---|
5635 | 5815 | Touch(); |
---|
5636 | 5816 | } |
---|
5637 | 5817 | |
---|
.. | .. |
---|
5705 | 5885 | |
---|
5706 | 5886 | GetTextures().name = Object3D.GetPigment(GetTextures()) + ":" + texname; |
---|
5707 | 5887 | |
---|
| 5888 | + GetTextures().bump = null; |
---|
| 5889 | + |
---|
5708 | 5890 | Touch(); |
---|
5709 | 5891 | } |
---|
5710 | 5892 | |
---|
.. | .. |
---|
5725 | 5907 | |
---|
5726 | 5908 | blockloop = true; |
---|
5727 | 5909 | child.ResetBumpTexture(); |
---|
| 5910 | + blockloop = false; |
---|
| 5911 | + } |
---|
| 5912 | + } |
---|
| 5913 | + |
---|
| 5914 | + void EmbedTextures(boolean embed) |
---|
| 5915 | + { |
---|
| 5916 | + if (blockloop) |
---|
| 5917 | + return; |
---|
| 5918 | + |
---|
| 5919 | + //if (GetTextures() != null) |
---|
| 5920 | + if (embed) |
---|
| 5921 | + CameraPane.EmbedTextures(GetTextures()); |
---|
| 5922 | + else |
---|
| 5923 | + { |
---|
| 5924 | + GetTextures().pigmentdata = null; |
---|
| 5925 | + GetTextures().bumpdata = null; |
---|
| 5926 | + GetTextures().pw = 0; |
---|
| 5927 | + GetTextures().ph = 0; |
---|
| 5928 | + GetTextures().bw = 0; |
---|
| 5929 | + GetTextures().bh = 0; |
---|
| 5930 | + } |
---|
| 5931 | + |
---|
| 5932 | + int nb = Size(); |
---|
| 5933 | + for (int i = 0; i < nb; i++) |
---|
| 5934 | + { |
---|
| 5935 | + Object3D child = (Object3D) get(i); |
---|
| 5936 | + |
---|
| 5937 | + if (child == null) |
---|
| 5938 | + continue; |
---|
| 5939 | + |
---|
| 5940 | + blockloop = true; |
---|
| 5941 | + child.EmbedTextures(embed); |
---|
5728 | 5942 | blockloop = false; |
---|
5729 | 5943 | } |
---|
5730 | 5944 | } |
---|
.. | .. |
---|
5815 | 6029 | if (support != null) |
---|
5816 | 6030 | support = support; |
---|
5817 | 6031 | |
---|
5818 | | - //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
5819 | | - boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 6032 | + boolean usecalllists = !IsLive() && IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 6033 | + //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 6034 | + |
---|
| 6035 | + //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass. |
---|
5820 | 6036 | |
---|
5821 | 6037 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5822 | 6038 | { |
---|
.. | .. |
---|
5826 | 6042 | // usecalllists &= !(parent instanceof RandomNode); |
---|
5827 | 6043 | // usecalllists = false; |
---|
5828 | 6044 | |
---|
5829 | | - if (GetBRep() != null) |
---|
5830 | | - usecalllists = usecalllists; |
---|
| 6045 | + if (display.DrawMode() == display.SHADOW) |
---|
| 6046 | + //GetBRep() != null) |
---|
| 6047 | + usecalllists = !!usecalllists; |
---|
5831 | 6048 | //System.out.println("draw " + this); |
---|
5832 | 6049 | //new Exception().printStackTrace(); |
---|
5833 | 6050 | |
---|
.. | .. |
---|
5849 | 6066 | if (!(this instanceof Composite)) |
---|
5850 | 6067 | touched = false; |
---|
5851 | 6068 | //if (displaylist == -1 && usecalllists) |
---|
5852 | | - if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013 |
---|
| 6069 | + if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013 |
---|
5853 | 6070 | { |
---|
5854 | 6071 | bRep.displaylist = display.GenList(); |
---|
5855 | 6072 | assert(bRep.displaylist != 0); |
---|
.. | .. |
---|
5860 | 6077 | |
---|
5861 | 6078 | //System.out.println("\tnew list " + list); |
---|
5862 | 6079 | //gl.glDrawBuffer(gl.GL_NONE); |
---|
5863 | | - if (usecalllists) |
---|
| 6080 | + if (usecalllists && bRep.displaylist > 0) |
---|
5864 | 6081 | { |
---|
5865 | 6082 | // System.err.println("new list " + bRep.displaylist + " for " + this); |
---|
5866 | 6083 | display.NewList(bRep.displaylist); |
---|
.. | .. |
---|
5869 | 6086 | CallList(display, root, selected, blocked); |
---|
5870 | 6087 | |
---|
5871 | 6088 | // compiled = true; |
---|
5872 | | - if (usecalllists) |
---|
| 6089 | + if (usecalllists && bRep.displaylist > 0) |
---|
5873 | 6090 | { |
---|
5874 | 6091 | // System.err.println("end list " + bRep.displaylist + " for " + this); |
---|
5875 | 6092 | display.EndList(); |
---|
.. | .. |
---|
7220 | 7437 | } |
---|
7221 | 7438 | } |
---|
7222 | 7439 | |
---|
7223 | | - protected void calcHotSpot(cVector in, ClickInfo info, Point outPt, Rectangle outRec) |
---|
| 7440 | + static ClickInfo clickInfo = new ClickInfo(); |
---|
| 7441 | + |
---|
| 7442 | + protected void calcHotSpot(cVector in, //ClickInfo clickInfo, |
---|
| 7443 | + Point outPt, Rectangle outRec) |
---|
7224 | 7444 | { |
---|
7225 | | - int hc = info.bounds.x + info.bounds.width / 2; |
---|
7226 | | - int vc = info.bounds.y + info.bounds.height / 2; |
---|
7227 | | - double[][] toscreen = info.toScreen; |
---|
| 7445 | + int hc = clickInfo.bounds.x + clickInfo.bounds.width / 2; |
---|
| 7446 | + int vc = clickInfo.bounds.y + clickInfo.bounds.height / 2; |
---|
| 7447 | + double[][] toscreen = clickInfo.toScreen; |
---|
7228 | 7448 | if (toscreen == null) |
---|
7229 | 7449 | { |
---|
7230 | | - toscreen = new Camera(info.camera.viewCode).toScreen; |
---|
| 7450 | + toscreen = new Camera(clickInfo.camera.viewCode).toScreen; |
---|
7231 | 7451 | } |
---|
7232 | 7452 | cVector vec = in; |
---|
7233 | 7453 | LA.xformPos(in, toscreen, in); |
---|
7234 | 7454 | //System.out.println("Distance = " + info.camera.Distance()); |
---|
7235 | | - vec.x *= 100 * info.camera.SCALE / info.camera.Distance(); |
---|
7236 | | - vec.y *= 100 * info.camera.SCALE / info.camera.Distance(); |
---|
| 7455 | + vec.x *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance(); |
---|
| 7456 | + vec.y *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance(); |
---|
7237 | 7457 | outPt.x = hc + (int) vec.x; |
---|
7238 | 7458 | outPt.y = vc - (int) vec.y; |
---|
7239 | 7459 | outRec.x = outPt.x - 3; |
---|
.. | .. |
---|
7241 | 7461 | outRec.width = outRec.height = 6; |
---|
7242 | 7462 | } |
---|
7243 | 7463 | |
---|
7244 | | - protected Rectangle calcHotSpot(cVector in, ClickInfo info) |
---|
| 7464 | + protected Rectangle calcHotSpot(cVector in//, ClickInfo clickInfo |
---|
| 7465 | + ) |
---|
7245 | 7466 | { |
---|
7246 | 7467 | Point pt = new Point(0, 0); |
---|
7247 | 7468 | Rectangle rec = new Rectangle(); |
---|
7248 | | - calcHotSpot(in, info, pt, rec); |
---|
| 7469 | + calcHotSpot(in, //clickInfo, |
---|
| 7470 | + pt, rec); |
---|
7249 | 7471 | return rec; |
---|
7250 | 7472 | } |
---|
7251 | 7473 | |
---|
7252 | | - void drawEditHandles0(ClickInfo info, int level) |
---|
| 7474 | + void drawEditHandles0(//ClickInfo clickInfo, |
---|
| 7475 | + int level) |
---|
7253 | 7476 | { |
---|
7254 | 7477 | if (level == 0) |
---|
7255 | 7478 | { |
---|
.. | .. |
---|
7258 | 7481 | { |
---|
7259 | 7482 | cVector origin = new cVector(); |
---|
7260 | 7483 | //LA.xformPos(origin, toParent, origin); |
---|
7261 | | - Rectangle spot = calcHotSpot(origin, info); |
---|
| 7484 | + if (this.clickInfo == null) |
---|
| 7485 | + this.clickInfo = new ClickInfo(); |
---|
| 7486 | + |
---|
| 7487 | + Rectangle spot = calcHotSpot(origin); //, clickInfo); |
---|
7262 | 7488 | Rectangle boundary = new Rectangle(); |
---|
7263 | 7489 | boundary.x = spot.x - 30; |
---|
7264 | 7490 | boundary.y = spot.y - 30; |
---|
7265 | 7491 | boundary.width = spot.width + 60; |
---|
7266 | 7492 | boundary.height = spot.height + 60; |
---|
7267 | | - info.g.setColor(Color.red); |
---|
| 7493 | + clickInfo.g.setColor(Color.white); |
---|
7268 | 7494 | int spotw = spot.x + spot.width; |
---|
7269 | 7495 | int spoth = spot.y + spot.height; |
---|
7270 | | - info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
| 7496 | + clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7271 | 7497 | // if (CameraPane.Xmin > spot.x) |
---|
7272 | 7498 | // { |
---|
7273 | 7499 | // CameraPane.Xmin = spot.x; |
---|
.. | .. |
---|
7284 | 7510 | // { |
---|
7285 | 7511 | // CameraPane.Ymax = spoth; |
---|
7286 | 7512 | // } |
---|
7287 | | - spot.translate(32, 32); |
---|
7288 | | - spotw = spot.x + spot.width; |
---|
7289 | | - spoth = spot.y + spot.height; |
---|
7290 | | - info.g.setColor(Color.cyan); |
---|
7291 | | - info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7292 | 7513 | // if (CameraPane.Xmin > spot.x) |
---|
7293 | 7514 | // { |
---|
7294 | 7515 | // CameraPane.Xmin = spot.x; |
---|
.. | .. |
---|
7307 | 7528 | // } |
---|
7308 | 7529 | // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15 |
---|
7309 | 7530 | //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15 |
---|
7310 | | - spot.translate(0, -32); |
---|
7311 | | - info.g.setColor(Color.yellow); |
---|
7312 | | - info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7313 | | - info.g.setColor(Color.green); |
---|
| 7531 | + spot.translate(32, 0); |
---|
| 7532 | + clickInfo.g.setColor(Color.yellow); |
---|
| 7533 | + clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
| 7534 | + |
---|
| 7535 | + spot.translate(32, 64); |
---|
| 7536 | + spotw = spot.x + spot.width; |
---|
| 7537 | + spoth = spot.y + spot.height; |
---|
| 7538 | + clickInfo.g.setColor(Color.cyan); |
---|
| 7539 | + clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7314 | 7540 | // if (CameraPane.Xmin > spot.x) |
---|
7315 | 7541 | // { |
---|
7316 | 7542 | // CameraPane.Xmin = spot.x; |
---|
.. | .. |
---|
7327 | 7553 | // { |
---|
7328 | 7554 | // CameraPane.Ymax = spoth; |
---|
7329 | 7555 | // } |
---|
7330 | | - info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY, |
---|
7331 | | - (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360); |
---|
| 7556 | + clickInfo.g.setColor(Color.green); |
---|
| 7557 | + clickInfo.g.drawArc(boundary.x + clickInfo.DX, boundary.y + clickInfo.DY, |
---|
| 7558 | + (int)(boundary.width * clickInfo.W), (int)(boundary.height * clickInfo.W), 0, 360); |
---|
7332 | 7559 | //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360); |
---|
7333 | 7560 | // if (CameraPane.Xmin > boundary.x) |
---|
7334 | 7561 | // { |
---|
.. | .. |
---|
7350 | 7577 | } |
---|
7351 | 7578 | } |
---|
7352 | 7579 | |
---|
7353 | | - boolean doEditClick0(ClickInfo info, int level) |
---|
| 7580 | + boolean doEditClick0(//ClickInfo clickInfo, |
---|
| 7581 | + int level) |
---|
7354 | 7582 | { |
---|
7355 | 7583 | if (level == 0) |
---|
7356 | 7584 | { |
---|
.. | .. |
---|
7359 | 7587 | |
---|
7360 | 7588 | boolean retval = false; |
---|
7361 | 7589 | |
---|
7362 | | - startX = info.x; |
---|
7363 | | - startY = info.y; |
---|
| 7590 | + startX = clickInfo.x; |
---|
| 7591 | + startY = clickInfo.y; |
---|
7364 | 7592 | |
---|
7365 | 7593 | hitSomething = -1; |
---|
7366 | 7594 | cVector origin = new cVector(); |
---|
.. | .. |
---|
7370 | 7598 | { |
---|
7371 | 7599 | centerPt = new Point(0, 0); |
---|
7372 | 7600 | } |
---|
7373 | | - calcHotSpot(origin, info, centerPt, spot); |
---|
7374 | | - if (spot.contains(info.x, info.y)) |
---|
| 7601 | + calcHotSpot(origin, //info, |
---|
| 7602 | + centerPt, spot); |
---|
| 7603 | + if (spot.contains(clickInfo.x, clickInfo.y)) |
---|
7375 | 7604 | { |
---|
7376 | 7605 | hitSomething = hitCenter; |
---|
7377 | 7606 | retval = true; |
---|
7378 | 7607 | } |
---|
7379 | 7608 | spot.translate(32, 0); |
---|
7380 | | - if (spot.contains(info.x, info.y)) |
---|
| 7609 | + if (spot.contains(clickInfo.x, clickInfo.y)) |
---|
7381 | 7610 | { |
---|
7382 | 7611 | hitSomething = hitRotate; |
---|
7383 | 7612 | retval = true; |
---|
7384 | 7613 | } |
---|
7385 | 7614 | spot.translate(0, 32); |
---|
7386 | | - if (spot.contains(info.x, info.y)) |
---|
| 7615 | + spot.translate(32, 0); |
---|
| 7616 | + spot.translate(0, 32); |
---|
| 7617 | + if (spot.contains(clickInfo.x, clickInfo.y)) |
---|
7387 | 7618 | { |
---|
7388 | 7619 | hitSomething = hitScale; |
---|
| 7620 | + |
---|
| 7621 | + double scale = 0.005f * clickInfo.camera.Distance(); |
---|
| 7622 | + double hScale = (double) (clickInfo.x - centerPt.x) / 64; |
---|
| 7623 | + double sign = 1; |
---|
| 7624 | + if (hScale < 0) |
---|
| 7625 | + { |
---|
| 7626 | + sign = -1; |
---|
| 7627 | + } |
---|
| 7628 | + hScale = sign*Math.pow(sign*hScale, scale * 50); |
---|
| 7629 | + if (hScale < 0.01) |
---|
| 7630 | + { |
---|
| 7631 | + //hScale = 0.01; |
---|
| 7632 | + } |
---|
| 7633 | + |
---|
| 7634 | + double vScale = (double) (clickInfo.y - centerPt.y) / 64; |
---|
| 7635 | + sign = 1; |
---|
| 7636 | + if (vScale < 0) |
---|
| 7637 | + { |
---|
| 7638 | + sign = -1; |
---|
| 7639 | + } |
---|
| 7640 | + vScale = sign*Math.pow(sign*vScale, scale * 50); |
---|
| 7641 | + if (vScale < 0.01) |
---|
| 7642 | + { |
---|
| 7643 | + //vScale = 0.01; |
---|
| 7644 | + } |
---|
| 7645 | + |
---|
| 7646 | + clickInfo.scale = Math.sqrt(hScale*hScale + vScale*vScale); |
---|
| 7647 | + |
---|
7389 | 7648 | retval = true; |
---|
7390 | 7649 | } |
---|
7391 | 7650 | |
---|
.. | .. |
---|
7395 | 7654 | } |
---|
7396 | 7655 | |
---|
7397 | 7656 | //System.out.println("info.modifiers = " + info.modifiers); |
---|
7398 | | - modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META |
---|
| 7657 | + modified = (clickInfo.modifiers & CameraPane.SHIFT) != 0; // Was META |
---|
7399 | 7658 | //System.out.println("modified = " + modified); |
---|
7400 | 7659 | //new Exception().printStackTrace(); |
---|
7401 | 7660 | //viewCode = info.pane.renderCamera.viewCode; |
---|
.. | .. |
---|
7423 | 7682 | return true; |
---|
7424 | 7683 | } |
---|
7425 | 7684 | |
---|
7426 | | - void doEditDrag0(ClickInfo info, boolean opposite) |
---|
| 7685 | + void doEditDrag0(//ClickInfo info, |
---|
| 7686 | + boolean opposite) |
---|
7427 | 7687 | { |
---|
7428 | 7688 | if (hitSomething == 0) |
---|
7429 | 7689 | { |
---|
.. | .. |
---|
7437 | 7697 | |
---|
7438 | 7698 | //System.out.println("hitSomething = " + hitSomething); |
---|
7439 | 7699 | |
---|
7440 | | - double scale = 0.005f * info.camera.Distance(); |
---|
| 7700 | + double scale = 0.005f * clickInfo.camera.Distance(); |
---|
7441 | 7701 | |
---|
7442 | 7702 | cVector xlate = new cVector(); |
---|
7443 | 7703 | //cVector xlate2 = new cVector(); |
---|
.. | .. |
---|
7451 | 7711 | |
---|
7452 | 7712 | scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance(); |
---|
7453 | 7713 | |
---|
7454 | | - if (modified || opposite) |
---|
| 7714 | + // Modified could snap |
---|
| 7715 | + if (//modified || |
---|
| 7716 | + opposite) |
---|
7455 | 7717 | { |
---|
7456 | 7718 | //assert(false); |
---|
7457 | 7719 | /* |
---|
.. | .. |
---|
7471 | 7733 | toParent[3][i] = xlate.get(i); |
---|
7472 | 7734 | LA.matInvert(toParent, fromParent); |
---|
7473 | 7735 | */ |
---|
7474 | | - cVector delta = LA.newVector(0, 0, startY - info.y); |
---|
7475 | | - LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta); |
---|
| 7736 | + cVector delta = LA.newVector(0, 0, startY - clickInfo.y); |
---|
| 7737 | + LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta); |
---|
7476 | 7738 | |
---|
7477 | 7739 | LA.matCopy(startMat, toParent); |
---|
7478 | 7740 | LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale); |
---|
.. | .. |
---|
7481 | 7743 | } else |
---|
7482 | 7744 | { |
---|
7483 | 7745 | //LA.xformDir(delta, info.camera.fromScreen, delta); |
---|
7484 | | - cVector up = new cVector(info.camera.up); |
---|
| 7746 | + cVector up = new cVector(clickInfo.camera.up); |
---|
7485 | 7747 | cVector away = new cVector(); |
---|
7486 | 7748 | //cVector right2 = new cVector(); |
---|
7487 | 7749 | //LA.vecCross(up, cVector.Z, right); |
---|
.. | .. |
---|
7498 | 7760 | LA.xformDir(up, ClickInfo.matbuffer, up); |
---|
7499 | 7761 | // if (!CameraPane.LOCALTRANSFORM) |
---|
7500 | 7762 | LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up); |
---|
7501 | | - LA.xformDir(info.camera.away, ClickInfo.matbuffer, away); |
---|
| 7763 | + LA.xformDir(clickInfo.camera.away, ClickInfo.matbuffer, away); |
---|
7502 | 7764 | // if (!CameraPane.LOCALTRANSFORM) |
---|
7503 | 7765 | LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away); |
---|
7504 | 7766 | //LA.vecCross(up, cVector.Z, right2); |
---|
7505 | 7767 | |
---|
7506 | | - cVector delta = LA.newVector(info.x - startX, startY - info.y, 0); |
---|
| 7768 | + cVector delta = LA.newVector(clickInfo.x - startX, startY - clickInfo.y, 0); |
---|
7507 | 7769 | |
---|
7508 | 7770 | //System.out.println("DELTA0 = " + delta); |
---|
7509 | 7771 | //System.out.println("AWAY = " + info.camera.away); |
---|
7510 | 7772 | //System.out.println("UP = " + info.camera.up); |
---|
7511 | 7773 | if (away.z > 0) |
---|
7512 | 7774 | { |
---|
7513 | | - if (info.camera.up.x == 0) // LA.vecDot(right, right2)<0) |
---|
| 7775 | + if (clickInfo.camera.up.x == 0) // LA.vecDot(right, right2)<0) |
---|
7514 | 7776 | { |
---|
7515 | 7777 | delta.x = -delta.x; |
---|
7516 | 7778 | } else |
---|
.. | .. |
---|
7525 | 7787 | //System.out.println("DELTA1 = " + delta); |
---|
7526 | 7788 | LA.xformDir(delta, ClickInfo.matbuffer, delta); |
---|
7527 | 7789 | //System.out.println("DELTA2 = " + delta); |
---|
7528 | | - LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta); |
---|
| 7790 | + LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta); |
---|
7529 | 7791 | LA.matCopy(startMat, toParent); |
---|
7530 | 7792 | //System.out.println("DELTA3 = " + delta); |
---|
7531 | 7793 | LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale); |
---|
.. | .. |
---|
7535 | 7797 | break; |
---|
7536 | 7798 | |
---|
7537 | 7799 | case hitRotate: // rotate |
---|
7538 | | - int dx = info.x - centerPt.x; |
---|
7539 | | - int dy = -(info.y - centerPt.y); |
---|
| 7800 | + int dx = clickInfo.x - centerPt.x; |
---|
| 7801 | + int dy = -(clickInfo.y - centerPt.y); |
---|
7540 | 7802 | double angle = (double) Math.atan2(dx, dy); |
---|
7541 | 7803 | angle = -(1.570796 - angle); |
---|
7542 | 7804 | |
---|
.. | .. |
---|
7545 | 7807 | |
---|
7546 | 7808 | if (modified) |
---|
7547 | 7809 | { |
---|
7548 | | - // Rotate 90 degrees |
---|
| 7810 | + // Rotate 45 degrees |
---|
7549 | 7811 | angle /= (Math.PI / 4); |
---|
7550 | 7812 | angle = Math.floor(angle + 0.5); |
---|
7551 | 7813 | angle *= (Math.PI / 4); |
---|
.. | .. |
---|
7559 | 7821 | } |
---|
7560 | 7822 | /**/ |
---|
7561 | 7823 | |
---|
7562 | | - switch (info.pane.RenderCamera().viewCode) |
---|
| 7824 | + switch (clickInfo.pane.RenderCamera().viewCode) |
---|
7563 | 7825 | { |
---|
7564 | 7826 | case 1: // '\001' |
---|
7565 | 7827 | LA.matZRotate(toParent, angle); |
---|
.. | .. |
---|
7586 | 7848 | break; |
---|
7587 | 7849 | |
---|
7588 | 7850 | case hitScale: // scale |
---|
7589 | | - double hScale = (double) (info.x - centerPt.x) / 32; |
---|
| 7851 | + double hScale = (double) (clickInfo.x - centerPt.x) / 64; |
---|
7590 | 7852 | double sign = 1; |
---|
7591 | 7853 | if (hScale < 0) |
---|
7592 | 7854 | { |
---|
.. | .. |
---|
7598 | 7860 | //hScale = 0.01; |
---|
7599 | 7861 | } |
---|
7600 | 7862 | |
---|
7601 | | - double vScale = (double) (info.y - centerPt.y) / 32; |
---|
| 7863 | + double vScale = (double) (clickInfo.y - centerPt.y) / 64; |
---|
7602 | 7864 | sign = 1; |
---|
7603 | 7865 | if (vScale < 0) |
---|
7604 | 7866 | { |
---|
.. | .. |
---|
7609 | 7871 | { |
---|
7610 | 7872 | //vScale = 0.01; |
---|
7611 | 7873 | } |
---|
| 7874 | + |
---|
7612 | 7875 | LA.matCopy(startMat, toParent); |
---|
7613 | 7876 | /**/ |
---|
7614 | 7877 | for (int i = 0; i < 3; i++) |
---|
.. | .. |
---|
7618 | 7881 | } |
---|
7619 | 7882 | /**/ |
---|
7620 | 7883 | |
---|
7621 | | - double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2); |
---|
| 7884 | + double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / clickInfo.scale; |
---|
7622 | 7885 | |
---|
7623 | 7886 | if (totalScale < 0.01) |
---|
7624 | 7887 | { |
---|
7625 | 7888 | totalScale = 0.01; |
---|
7626 | 7889 | } |
---|
7627 | 7890 | |
---|
7628 | | - switch (info.pane.RenderCamera().viewCode) |
---|
| 7891 | + switch (clickInfo.pane.RenderCamera().viewCode) |
---|
7629 | 7892 | { |
---|
7630 | 7893 | case 3: // '\001' |
---|
7631 | 7894 | if (modified || opposite) |
---|
7632 | 7895 | { |
---|
| 7896 | + if (modified) // && opposite) |
---|
| 7897 | + LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
| 7898 | + else |
---|
7633 | 7899 | //LA.matScale(toParent, 1, hScale, vScale); |
---|
7634 | | - LA.matScale(toParent, totalScale, 1, 1); |
---|
| 7900 | + LA.matScale(toParent, totalScale, 1, 1); |
---|
7635 | 7901 | } // vScale, 1); |
---|
7636 | 7902 | else |
---|
7637 | 7903 | { |
---|
7638 | 7904 | // EXCEPTION! |
---|
7639 | | - LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
| 7905 | + LA.matScale(toParent, 1, totalScale, totalScale); |
---|
7640 | 7906 | } // vScale, 1); |
---|
7641 | 7907 | break; |
---|
7642 | 7908 | |
---|
7643 | 7909 | case 2: // '\002' |
---|
7644 | 7910 | if (modified || opposite) |
---|
7645 | 7911 | { |
---|
7646 | | - //LA.matScale(toParent, hScale, 1, vScale); |
---|
7647 | | - LA.matScale(toParent, 1, totalScale, 1); |
---|
| 7912 | + if (modified) // && opposite) |
---|
| 7913 | + LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
| 7914 | + else |
---|
| 7915 | + //LA.matScale(toParent, hScale, 1, vScale); |
---|
| 7916 | + LA.matScale(toParent, 1, totalScale, 1); |
---|
7648 | 7917 | } else |
---|
7649 | 7918 | { |
---|
7650 | 7919 | LA.matScale(toParent, totalScale, 1, totalScale); |
---|
.. | .. |
---|
7654 | 7923 | case 1: // '\003' |
---|
7655 | 7924 | if (modified || opposite) |
---|
7656 | 7925 | { |
---|
7657 | | - //LA.matScale(toParent, hScale, vScale, 1); |
---|
7658 | | - LA.matScale(toParent, 1, 1, totalScale); |
---|
| 7926 | + if (modified) // && opposite) |
---|
| 7927 | + LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
| 7928 | + else |
---|
| 7929 | + //LA.matScale(toParent, hScale, vScale, 1); |
---|
| 7930 | + LA.matScale(toParent, 1, 1, totalScale); |
---|
7659 | 7931 | } else |
---|
7660 | 7932 | { |
---|
7661 | 7933 | LA.matScale(toParent, totalScale, totalScale, 1); |
---|
.. | .. |
---|
7692 | 7964 | } // NEW ... |
---|
7693 | 7965 | |
---|
7694 | 7966 | |
---|
7695 | | - info.pane.repaint(); |
---|
| 7967 | + clickInfo.pane.repaint(); |
---|
7696 | 7968 | } |
---|
7697 | 7969 | |
---|
7698 | 7970 | boolean overflow = false; |
---|