.. | .. |
---|
14 | 14 | import //weka.core. |
---|
15 | 15 | matrix.Matrix; |
---|
16 | 16 | |
---|
| 17 | +import java.util.UUID; |
---|
| 18 | + |
---|
17 | 19 | //import net.sourceforge.sizeof.SizeOf; |
---|
18 | 20 | public class Object3D extends Vector<Object3D> implements java.io.Serializable, iSendInfo //, aurelienribon.tweenengine.TweenAccessor<Object3D> |
---|
19 | 21 | { |
---|
20 | 22 | //static final long serialVersionUID = -607422624994562685L; |
---|
21 | 23 | static final long serialVersionUID = 5022536242724664900L; |
---|
| 24 | + |
---|
| 25 | + private UUID uuid = UUID.randomUUID(); |
---|
22 | 26 | |
---|
23 | 27 | ScriptNode scriptnode; |
---|
24 | 28 | |
---|
.. | .. |
---|
300 | 304 | } |
---|
301 | 305 | |
---|
302 | 306 | boolean live = false; |
---|
| 307 | + boolean dontselect = false; |
---|
303 | 308 | boolean hide = false; |
---|
304 | 309 | boolean link2master = false; // performs reset support/master at each frame |
---|
305 | 310 | boolean marked = false; // animation node |
---|
.. | .. |
---|
774 | 779 | if (step == 0) |
---|
775 | 780 | step = 1; |
---|
776 | 781 | if (maxcount == 0) |
---|
777 | | - maxcount = 2048; // 4; |
---|
| 782 | + maxcount = 128; // 2048; // 4; |
---|
778 | 783 | // if (acceleration == 0) |
---|
779 | 784 | // acceleration = 10; |
---|
780 | 785 | if (delay == 0) // serial |
---|
.. | .. |
---|
797 | 802 | |
---|
798 | 803 | if (marked && Globals.isLIVE() && live && |
---|
799 | 804 | //TEMP21aug2018 |
---|
800 | | - Globals.DrawMode() == iCameraPane.SHADOW && |
---|
| 805 | + (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) && |
---|
801 | 806 | currentframe != Globals.framecount) |
---|
802 | 807 | { |
---|
803 | 808 | currentframe = Globals.framecount; |
---|
.. | .. |
---|
912 | 917 | fromParent = null; // LA.newMatrix(); |
---|
913 | 918 | bRep = null; // new BoundaryRep(); |
---|
914 | 919 | |
---|
| 920 | + if (oname != null && oname.equals("LeftHand")) |
---|
| 921 | + { |
---|
| 922 | + name = oname; |
---|
| 923 | + } |
---|
| 924 | + |
---|
915 | 925 | /* |
---|
916 | 926 | float hue = (float)Math.random(); |
---|
917 | 927 | Color col; |
---|
.. | .. |
---|
954 | 964 | |
---|
955 | 965 | public Object clone() |
---|
956 | 966 | { |
---|
957 | | - return GrafreeD.clone(this); |
---|
| 967 | + return Grafreed.clone(this); |
---|
958 | 968 | } |
---|
959 | 969 | |
---|
960 | 970 | Object3D copyExpand() |
---|
.. | .. |
---|
1470 | 1480 | BoundaryRep.SEUIL = other.material.cameralight; |
---|
1471 | 1481 | |
---|
1472 | 1482 | // Set default to 0.1 |
---|
1473 | | - BoundaryRep.SEUIL /= 2; |
---|
| 1483 | + BoundaryRep.SEUIL /= 4; // 2; |
---|
1474 | 1484 | System.out.println("SEUIL = " + BoundaryRep.SEUIL); |
---|
1475 | 1485 | } |
---|
1476 | 1486 | |
---|
.. | .. |
---|
1729 | 1739 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1730 | 1740 | o.bRep = transientrep; |
---|
1731 | 1741 | if (clone) |
---|
1732 | | - o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); |
---|
| 1742 | + o.bRep = (BoundaryRep) Grafreed.clone(transientrep); |
---|
1733 | 1743 | o.CreateMaterial(); |
---|
1734 | 1744 | o.SetAttributes(this, -1); |
---|
1735 | 1745 | //parent |
---|
.. | .. |
---|
1742 | 1752 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1743 | 1753 | o.bRep = bRep; |
---|
1744 | 1754 | if (clone) |
---|
1745 | | - o.bRep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
| 1755 | + o.bRep = (BoundaryRep) Grafreed.clone(bRep); |
---|
1746 | 1756 | o.CreateMaterial(); |
---|
1747 | 1757 | //o.overwriteThis(this, -1); |
---|
1748 | 1758 | o.SetAttributes(this, -1); |
---|
.. | .. |
---|
1829 | 1839 | if (obj.name == null) |
---|
1830 | 1840 | continue; // can't be a null one |
---|
1831 | 1841 | |
---|
| 1842 | + // Try perfect match first. |
---|
1832 | 1843 | if (n.equals(obj.name)) |
---|
1833 | 1844 | { |
---|
1834 | 1845 | theobj = obj; |
---|
1835 | 1846 | count++; |
---|
1836 | 1847 | } |
---|
1837 | 1848 | } |
---|
| 1849 | + |
---|
| 1850 | + // not needed: n = n.split(":")[0]; // Poser generates a count |
---|
1838 | 1851 | |
---|
1839 | 1852 | if (count != 1) |
---|
1840 | 1853 | for (int i=Size(); --i>=0;) |
---|
.. | .. |
---|
2477 | 2490 | return retval; |
---|
2478 | 2491 | } |
---|
2479 | 2492 | |
---|
2480 | | - void doEditDrag(ClickInfo info) |
---|
| 2493 | + void doEditDrag(ClickInfo info, boolean opposite) |
---|
2481 | 2494 | { |
---|
2482 | 2495 | switch (doSomething) |
---|
2483 | 2496 | { |
---|
2484 | 2497 | case 1: // '\001' |
---|
2485 | 2498 | //super. |
---|
2486 | | - doEditDrag0(info); |
---|
| 2499 | + doEditDrag0(info, opposite); |
---|
2487 | 2500 | break; |
---|
2488 | 2501 | |
---|
2489 | 2502 | case 2: // '\002' |
---|
.. | .. |
---|
2496 | 2509 | { |
---|
2497 | 2510 | //sel.hitSomething = childToDrag.hitSomething; |
---|
2498 | 2511 | //childToDrag.doEditDrag(info); |
---|
2499 | | - sel.doEditDrag(info); |
---|
| 2512 | + sel.doEditDrag(info, opposite); |
---|
2500 | 2513 | } else |
---|
2501 | 2514 | { |
---|
2502 | 2515 | //super. |
---|
2503 | | - doEditDrag0(info); |
---|
| 2516 | + doEditDrag0(info, opposite); |
---|
2504 | 2517 | } |
---|
2505 | 2518 | } |
---|
2506 | 2519 | break; |
---|
.. | .. |
---|
2983 | 2996 | blockloop = false; |
---|
2984 | 2997 | } |
---|
2985 | 2998 | |
---|
| 2999 | + void TransformChildren() |
---|
| 3000 | + { |
---|
| 3001 | + if (toParent != null) |
---|
| 3002 | + { |
---|
| 3003 | + for (int i=Size(); --i>=0;) |
---|
| 3004 | + { |
---|
| 3005 | + Object3D v = get(i); |
---|
| 3006 | + |
---|
| 3007 | + if (v.toParent == null) |
---|
| 3008 | + { |
---|
| 3009 | + v.toParent = LA.newMatrix(); |
---|
| 3010 | + v.fromParent = LA.newMatrix(); |
---|
| 3011 | + } |
---|
| 3012 | + |
---|
| 3013 | +// LA.matConcat(v.toParent, toParent, v.toParent); |
---|
| 3014 | +// LA.matConcat(fromParent, v.fromParent, v.fromParent); |
---|
| 3015 | + LA.matConcat(toParent, v.toParent, v.toParent); |
---|
| 3016 | + LA.matConcat(v.fromParent, fromParent, v.fromParent); |
---|
| 3017 | + } |
---|
| 3018 | + |
---|
| 3019 | + toParent = null; // LA.matIdentity(toParent); |
---|
| 3020 | + fromParent = null; // LA.matIdentity(fromParent); |
---|
| 3021 | + |
---|
| 3022 | + Touch(); |
---|
| 3023 | + } |
---|
| 3024 | + } |
---|
| 3025 | + |
---|
2986 | 3026 | void TransformGeometry() |
---|
2987 | 3027 | { |
---|
2988 | 3028 | Object3D obj = this; |
---|
.. | .. |
---|
3204 | 3244 | |
---|
3205 | 3245 | BoundaryRep sup = bRep.support; |
---|
3206 | 3246 | bRep.support = null; |
---|
3207 | | - BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
| 3247 | + BoundaryRep temprep = (BoundaryRep) Grafreed.clone(bRep); |
---|
3208 | 3248 | // bRep.SplitInTwo(onlyone); // thread... |
---|
3209 | | - temprep.SplitInTwo(reduction34, onlyone); |
---|
| 3249 | + |
---|
| 3250 | + while(temprep.SplitInTwo(reduction34, onlyone)); |
---|
| 3251 | + |
---|
3210 | 3252 | bRep = temprep; |
---|
3211 | 3253 | bRep.support = sup; |
---|
3212 | 3254 | Touch(); |
---|
.. | .. |
---|
3728 | 3770 | if (child == null) |
---|
3729 | 3771 | continue; |
---|
3730 | 3772 | |
---|
3731 | | - if (GrafreeD.RENDERME > 0) |
---|
| 3773 | + if (Grafreed.RENDERME > 0) |
---|
3732 | 3774 | { |
---|
3733 | 3775 | if (child instanceof Merge) |
---|
3734 | 3776 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
3879 | 3921 | if (child == null) |
---|
3880 | 3922 | continue; |
---|
3881 | 3923 | |
---|
3882 | | - if (GrafreeD.RENDERME > 0) |
---|
| 3924 | + if (Grafreed.RENDERME > 0) |
---|
3883 | 3925 | { |
---|
3884 | 3926 | if (child instanceof Merge) |
---|
3885 | 3927 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4074 | 4116 | if (child == null) |
---|
4075 | 4117 | continue; |
---|
4076 | 4118 | |
---|
4077 | | - if (GrafreeD.RENDERME > 0) |
---|
| 4119 | + if (Grafreed.RENDERME > 0) |
---|
4078 | 4120 | { |
---|
4079 | 4121 | if (child instanceof Merge) |
---|
4080 | 4122 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4681 | 4723 | |
---|
4682 | 4724 | cTreePath SelectLeaf(int indexcount, boolean deselect) |
---|
4683 | 4725 | { |
---|
4684 | | - if (hide) |
---|
| 4726 | + if (hide || dontselect) |
---|
4685 | 4727 | return null; |
---|
4686 | 4728 | |
---|
4687 | 4729 | if (count <= 0) |
---|
.. | .. |
---|
4707 | 4749 | |
---|
4708 | 4750 | cTreePath Select(int indexcount, boolean deselect) |
---|
4709 | 4751 | { |
---|
4710 | | - if (hide) |
---|
| 4752 | + if (hide || dontselect) |
---|
4711 | 4753 | return null; |
---|
4712 | 4754 | |
---|
4713 | 4755 | if (count <= 0) |
---|
.. | .. |
---|
5333 | 5375 | } |
---|
5334 | 5376 | } |
---|
5335 | 5377 | |
---|
| 5378 | + UUID GetUUID() |
---|
| 5379 | + { |
---|
| 5380 | + if (uuid == null) |
---|
| 5381 | + { |
---|
| 5382 | + // Serial |
---|
| 5383 | + uuid = UUID.randomUUID(); |
---|
| 5384 | + } |
---|
| 5385 | + |
---|
| 5386 | + return uuid; |
---|
| 5387 | + } |
---|
| 5388 | + |
---|
| 5389 | + Object3D GetObject(UUID uid) |
---|
| 5390 | + { |
---|
| 5391 | + if (blockloop) |
---|
| 5392 | + return null; |
---|
| 5393 | + |
---|
| 5394 | + if (GetUUID().equals(uid)) |
---|
| 5395 | + return this; |
---|
| 5396 | + |
---|
| 5397 | + int nb = Size(); |
---|
| 5398 | + for (int i = 0; i < nb; i++) |
---|
| 5399 | + { |
---|
| 5400 | + Object3D child = (Object3D) get(i); |
---|
| 5401 | + |
---|
| 5402 | + if (child == null) |
---|
| 5403 | + continue; |
---|
| 5404 | + |
---|
| 5405 | + blockloop = true; |
---|
| 5406 | + Object3D obj = child.GetObject(uid); |
---|
| 5407 | + blockloop = false; |
---|
| 5408 | + if (obj != null) |
---|
| 5409 | + return obj; |
---|
| 5410 | + } |
---|
| 5411 | + |
---|
| 5412 | + return null; |
---|
| 5413 | + } |
---|
| 5414 | + |
---|
5336 | 5415 | void SetBumpTexture(String tex) |
---|
5337 | 5416 | { |
---|
5338 | 5417 | if (GetTextures() == null) |
---|
.. | .. |
---|
5377 | 5456 | boolean NeedSupport() |
---|
5378 | 5457 | { |
---|
5379 | 5458 | return |
---|
5380 | | - CameraPane.SUPPORT && !CameraPane.movingcamera && link2master && /*live &&*/ support != null |
---|
| 5459 | + CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null |
---|
5381 | 5460 | // PROBLEM with CROWD!! |
---|
5382 | | - && (Globals.DrawMode() == iCameraPane.SHADOW || Globals.CROWD); |
---|
| 5461 | + && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD); |
---|
5383 | 5462 | } |
---|
5384 | 5463 | |
---|
5385 | 5464 | static boolean DEBUG_SELECTION = false; |
---|
.. | .. |
---|
5394 | 5473 | } |
---|
5395 | 5474 | |
---|
5396 | 5475 | if (display.DrawMode() == iCameraPane.SELECTION && |
---|
5397 | | - hide) |
---|
| 5476 | + (hide || dontselect)) |
---|
5398 | 5477 | return; |
---|
5399 | 5478 | |
---|
5400 | 5479 | if (name != null && name.contains("sclera")) |
---|
.. | .. |
---|
5636 | 5715 | tex = GetTextures(); |
---|
5637 | 5716 | } |
---|
5638 | 5717 | |
---|
5639 | | - display.BindTextures(tex, texres); |
---|
| 5718 | + boolean failed = false; |
---|
| 5719 | + |
---|
| 5720 | + try |
---|
| 5721 | + { |
---|
| 5722 | + display.BindTextures(tex, texres); |
---|
| 5723 | + } |
---|
| 5724 | + catch (Exception e) |
---|
| 5725 | + { |
---|
| 5726 | + System.err.println("FAILED: " + this); |
---|
| 5727 | + failed = true; |
---|
| 5728 | + } |
---|
5640 | 5729 | |
---|
5641 | 5730 | if (!compiled) |
---|
5642 | 5731 | { |
---|
.. | .. |
---|
5658 | 5747 | } |
---|
5659 | 5748 | } |
---|
5660 | 5749 | |
---|
5661 | | - display.ReleaseTextures(tex); |
---|
| 5750 | + if (!failed) |
---|
| 5751 | + display.ReleaseTextures(tex); |
---|
5662 | 5752 | |
---|
5663 | 5753 | display.PopMaterial(this, selected); |
---|
5664 | 5754 | } |
---|
.. | .. |
---|
5787 | 5877 | |
---|
5788 | 5878 | void drawSelf(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked) |
---|
5789 | 5879 | { |
---|
| 5880 | + if (display.DrawMode() == iCameraPane.SELECTION && dontselect) |
---|
| 5881 | + return; |
---|
| 5882 | + |
---|
5790 | 5883 | if (hide) |
---|
5791 | 5884 | return; |
---|
5792 | 5885 | // shadow optimisation |
---|
.. | .. |
---|
5911 | 6004 | { |
---|
5912 | 6005 | if (display.DrawMode() == display.SHADOW && projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
5913 | 6006 | return; // no shadow for transparent objects |
---|
| 6007 | + |
---|
| 6008 | + if (display.DrawMode() == iCameraPane.SELECTION && dontselect) |
---|
| 6009 | + return; |
---|
5914 | 6010 | |
---|
5915 | 6011 | if (hide) |
---|
5916 | 6012 | return; |
---|
.. | .. |
---|
6895 | 6991 | // { |
---|
6896 | 6992 | // CameraPane.Ymax = spoth; |
---|
6897 | 6993 | // } |
---|
6898 | | - info.g.drawLine(spotw, spoth, spotw, spoth - 15); |
---|
6899 | | - info.g.drawLine(spotw, spoth, spotw - 15, spoth); |
---|
| 6994 | + // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15); |
---|
| 6995 | + //info.g.drawLine(spotw, spoth, spotw - 15, spoth); |
---|
6900 | 6996 | spot.translate(0, -32); |
---|
6901 | 6997 | info.g.setColor(Color.green); |
---|
6902 | 6998 | info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
.. | .. |
---|
6951 | 7047 | startX = info.x; |
---|
6952 | 7048 | startY = info.y; |
---|
6953 | 7049 | |
---|
6954 | | - hitSomething = 0; |
---|
| 7050 | + hitSomething = -1; |
---|
6955 | 7051 | cVector origin = new cVector(); |
---|
6956 | 7052 | //LA.xformPos(origin, toParent, origin); |
---|
6957 | 7053 | Rectangle spot = new Rectangle(); |
---|
.. | .. |
---|
6984 | 7080 | } |
---|
6985 | 7081 | |
---|
6986 | 7082 | //System.out.println("info.modifiers = " + info.modifiers); |
---|
6987 | | - modified = (info.modifiers & CameraPane.META) != 0; |
---|
| 7083 | + modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META |
---|
6988 | 7084 | //System.out.println("modified = " + modified); |
---|
6989 | 7085 | //new Exception().printStackTrace(); |
---|
6990 | 7086 | //viewCode = info.pane.renderCamera.viewCode; |
---|
.. | .. |
---|
7012 | 7108 | return true; |
---|
7013 | 7109 | } |
---|
7014 | 7110 | |
---|
7015 | | - void doEditDrag0(ClickInfo info) |
---|
| 7111 | + void doEditDrag0(ClickInfo info, boolean opposite) |
---|
7016 | 7112 | { |
---|
7017 | 7113 | if (hitSomething == 0) |
---|
7018 | 7114 | { |
---|
.. | .. |
---|
7027 | 7123 | //System.out.println("hitSomething = " + hitSomething); |
---|
7028 | 7124 | |
---|
7029 | 7125 | double scale = 0.005f * info.camera.Distance(); |
---|
| 7126 | + |
---|
7030 | 7127 | cVector xlate = new cVector(); |
---|
7031 | 7128 | //cVector xlate2 = new cVector(); |
---|
7032 | 7129 | switch (hitSomething) |
---|
.. | .. |
---|
7039 | 7136 | |
---|
7040 | 7137 | scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance(); |
---|
7041 | 7138 | |
---|
7042 | | - if (modified) |
---|
| 7139 | + if (modified || opposite) |
---|
7043 | 7140 | { |
---|
7044 | 7141 | //assert(false); |
---|
7045 | 7142 | /* |
---|
.. | .. |
---|
7133 | 7230 | |
---|
7134 | 7231 | if (modified) |
---|
7135 | 7232 | { |
---|
| 7233 | + // Rotate 90 degrees |
---|
7136 | 7234 | angle /= (Math.PI / 4); |
---|
7137 | 7235 | angle = Math.floor(angle + 0.5); |
---|
7138 | 7236 | angle *= (Math.PI / 4); |
---|
.. | .. |
---|
7174 | 7272 | |
---|
7175 | 7273 | case hitScale: // scale |
---|
7176 | 7274 | double hScale = (double) (info.x - centerPt.x) / 32; |
---|
| 7275 | + double sign = 1; |
---|
| 7276 | + if (hScale < 0) |
---|
| 7277 | + { |
---|
| 7278 | + sign = -1; |
---|
| 7279 | + } |
---|
| 7280 | + hScale = sign*Math.pow(sign*hScale, scale * 50); |
---|
7177 | 7281 | if (hScale < 0.01) |
---|
7178 | 7282 | { |
---|
7179 | | - hScale = 0.01; |
---|
| 7283 | + //hScale = 0.01; |
---|
7180 | 7284 | } |
---|
7181 | | - hScale = Math.pow(hScale, scale * 50); |
---|
7182 | | - if (hScale < 0.01) |
---|
7183 | | - { |
---|
7184 | | - hScale = 0.01; |
---|
7185 | | - } |
---|
| 7285 | + |
---|
7186 | 7286 | double vScale = (double) (info.y - centerPt.y) / 32; |
---|
7187 | | - if (vScale < 0.01) |
---|
| 7287 | + sign = 1; |
---|
| 7288 | + if (vScale < 0) |
---|
7188 | 7289 | { |
---|
7189 | | - vScale = 0.01; |
---|
| 7290 | + sign = -1; |
---|
7190 | 7291 | } |
---|
7191 | | - vScale = Math.pow(vScale, scale * 50); |
---|
| 7292 | + vScale = sign*Math.pow(sign*vScale, scale * 50); |
---|
7192 | 7293 | if (vScale < 0.01) |
---|
7193 | 7294 | { |
---|
7194 | | - vScale = 0.01; |
---|
| 7295 | + //vScale = 0.01; |
---|
7195 | 7296 | } |
---|
7196 | 7297 | LA.matCopy(startMat, toParent); |
---|
7197 | 7298 | /**/ |
---|
.. | .. |
---|
7202 | 7303 | } |
---|
7203 | 7304 | /**/ |
---|
7204 | 7305 | |
---|
| 7306 | + double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2); |
---|
| 7307 | + |
---|
| 7308 | + if (totalScale < 0.01) |
---|
| 7309 | + { |
---|
| 7310 | + totalScale = 0.01; |
---|
| 7311 | + } |
---|
| 7312 | + |
---|
7205 | 7313 | switch (info.pane.RenderCamera().viewCode) |
---|
7206 | 7314 | { |
---|
7207 | 7315 | case 3: // '\001' |
---|
7208 | 7316 | if (modified) |
---|
7209 | 7317 | { |
---|
7210 | 7318 | //LA.matScale(toParent, 1, hScale, vScale); |
---|
7211 | | - LA.matScale(toParent, vScale, 1, 1); |
---|
| 7319 | + LA.matScale(toParent, totalScale, 1, 1); |
---|
7212 | 7320 | } // vScale, 1); |
---|
7213 | 7321 | else |
---|
7214 | 7322 | { |
---|
7215 | | - LA.matScale(toParent, vScale, vScale, vScale); |
---|
| 7323 | + LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
7216 | 7324 | } // vScale, 1); |
---|
7217 | 7325 | break; |
---|
7218 | 7326 | |
---|
.. | .. |
---|
7220 | 7328 | if (modified) |
---|
7221 | 7329 | { |
---|
7222 | 7330 | //LA.matScale(toParent, hScale, 1, vScale); |
---|
7223 | | - LA.matScale(toParent, 1, vScale, 1); |
---|
| 7331 | + LA.matScale(toParent, 1, totalScale, 1); |
---|
7224 | 7332 | } else |
---|
7225 | 7333 | { |
---|
7226 | | - LA.matScale(toParent, vScale, 1, vScale); |
---|
| 7334 | + LA.matScale(toParent, totalScale, 1, totalScale); |
---|
7227 | 7335 | } |
---|
7228 | 7336 | break; |
---|
7229 | 7337 | |
---|
.. | .. |
---|
7231 | 7339 | if (modified) |
---|
7232 | 7340 | { |
---|
7233 | 7341 | //LA.matScale(toParent, hScale, vScale, 1); |
---|
7234 | | - LA.matScale(toParent, 1, 1, vScale); |
---|
| 7342 | + LA.matScale(toParent, 1, 1, totalScale); |
---|
7235 | 7343 | } else |
---|
7236 | 7344 | { |
---|
7237 | | - LA.matScale(toParent, vScale, vScale, 1); |
---|
| 7345 | + LA.matScale(toParent, totalScale, totalScale, 1); |
---|
7238 | 7346 | } |
---|
7239 | 7347 | break; |
---|
7240 | 7348 | } |
---|
.. | .. |
---|
7367 | 7475 | //return super.toString() + " (id=" + list + ")" + " (brep=" + bRep + ")"; |
---|
7368 | 7476 | //return name + " (id=" + list + ")" + " (brep=" + bRep + ") " + super.toString(); |
---|
7369 | 7477 | //return name + " (#tri = " + (bRep==null?0:bRep.VertexCount()) + ") " + super.toString(); |
---|
| 7478 | + |
---|
| 7479 | + String objname; |
---|
| 7480 | + |
---|
7370 | 7481 | if (false) //parent != null) |
---|
7371 | 7482 | { |
---|
7372 | | - return name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")"; |
---|
| 7483 | + objname = name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")"; |
---|
7373 | 7484 | } else |
---|
7374 | 7485 | { |
---|
7375 | | - return GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count /*- 1*/) + ") ")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ +System.identityHashCode(this); |
---|
| 7486 | + objname = GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count - 1) + ")")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ ""; |
---|
7376 | 7487 | } // + super.toString(); |
---|
7377 | 7488 | //return name + " (" + (SizeOf.deepSizeOf(this)/1024) + "K) " + this.getClass().getName(); |
---|
| 7489 | + |
---|
| 7490 | + if (!Globals.ADVANCED) |
---|
| 7491 | + return objname; |
---|
| 7492 | + |
---|
| 7493 | + return objname + " " + System.identityHashCode(this); |
---|
7378 | 7494 | } |
---|
7379 | 7495 | |
---|
7380 | 7496 | public int hashCode() |
---|
.. | .. |
---|
7566 | 7682 | { |
---|
7567 | 7683 | assert(bRep != null); |
---|
7568 | 7684 | if (!(support instanceof GenericJoint)) // support.bRep != null) |
---|
7569 | | - GrafreeD.Assert(support.bRep == bRep.support); |
---|
| 7685 | + Grafreed.Assert(support.bRep == bRep.support); |
---|
7570 | 7686 | } |
---|
7571 | 7687 | else |
---|
7572 | 7688 | { |
---|
.. | .. |
---|
7615 | 7731 | private static cVector edge2 = new cVector(); |
---|
7616 | 7732 | //private static cVector norm = new cVector(); |
---|
7617 | 7733 | /*transient private*/ int hitSomething; |
---|
7618 | | - private static final int hitCenter = 1; |
---|
7619 | | - private static final int hitScale = 2; |
---|
7620 | | - private static final int hitRotate = 3; |
---|
| 7734 | + static final int hitCenter = 1; |
---|
| 7735 | + static final int hitScale = 2; |
---|
| 7736 | + static final int hitRotate = 3; |
---|
7621 | 7737 | /*transient*/ /*private*/ int viewCode; // Now used for transparency cache flag |
---|
7622 | 7738 | /*transient*/ private Point centerPt; |
---|
7623 | 7739 | /*transient*/ private int startX; |
---|