.. | .. |
---|
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 | |
---|
.. | .. |
---|
156 | 160 | blockloop = true; |
---|
157 | 161 | child.RestoreSupports(); |
---|
158 | 162 | blockloop = false; |
---|
| 163 | + } |
---|
| 164 | +} |
---|
| 165 | + |
---|
| 166 | +void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
| 167 | +{ |
---|
| 168 | + if (hashtable.containsKey(GetUUID())) |
---|
| 169 | + return; |
---|
| 170 | + |
---|
| 171 | + Object3D o = new Object3D(); |
---|
| 172 | + o.bRep = this.bRep; |
---|
| 173 | + if (this.bRep != null) |
---|
| 174 | + { |
---|
| 175 | + o.transientrep = this.bRep.support; |
---|
| 176 | + o.bRep.support = null; |
---|
| 177 | + } |
---|
| 178 | + |
---|
| 179 | +// o.support = this.support; |
---|
| 180 | +// o.fileparent = this.fileparent; |
---|
| 181 | +// if (this.bRep != null) |
---|
| 182 | +// o.bRep = this.bRep.support; |
---|
| 183 | + |
---|
| 184 | + hashtable.put(GetUUID(), o); |
---|
| 185 | + |
---|
| 186 | + this.bRep = null; |
---|
| 187 | +// if (this.bRep != null) |
---|
| 188 | +// this.bRep.support = null; |
---|
| 189 | +// this.support = null; |
---|
| 190 | +// this.fileparent = null; |
---|
| 191 | + |
---|
| 192 | + for (int i=0; i<Size(); i++) |
---|
| 193 | + { |
---|
| 194 | + get(i).ExtractBigData(hashtable); |
---|
| 195 | + } |
---|
| 196 | +} |
---|
| 197 | + |
---|
| 198 | +void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
| 199 | +{ |
---|
| 200 | + if (!hashtable.containsKey(GetUUID())) |
---|
| 201 | + return; |
---|
| 202 | + |
---|
| 203 | + Object3D o = hashtable.get(GetUUID()); |
---|
| 204 | + |
---|
| 205 | + this.bRep = o.bRep; |
---|
| 206 | + if (this.bRep != null) |
---|
| 207 | + this.bRep.support = o.transientrep; |
---|
| 208 | +// this.support = o.support; |
---|
| 209 | +// this.fileparent = o.fileparent; |
---|
| 210 | + |
---|
| 211 | + hashtable.remove(GetUUID()); |
---|
| 212 | + |
---|
| 213 | + for (int i=0; i<Size(); i++) |
---|
| 214 | + { |
---|
| 215 | + get(i).RestoreBigData(hashtable); |
---|
159 | 216 | } |
---|
160 | 217 | } |
---|
161 | 218 | |
---|
.. | .. |
---|
300 | 357 | } |
---|
301 | 358 | |
---|
302 | 359 | boolean live = false; |
---|
| 360 | + boolean dontselect = false; |
---|
303 | 361 | boolean hide = false; |
---|
304 | 362 | boolean link2master = false; // performs reset support/master at each frame |
---|
305 | 363 | boolean marked = false; // animation node |
---|
.. | .. |
---|
774 | 832 | if (step == 0) |
---|
775 | 833 | step = 1; |
---|
776 | 834 | if (maxcount == 0) |
---|
777 | | - maxcount = 2048; // 4; |
---|
| 835 | + maxcount = 128; // 2048; // 4; |
---|
778 | 836 | // if (acceleration == 0) |
---|
779 | 837 | // acceleration = 10; |
---|
780 | 838 | if (delay == 0) // serial |
---|
.. | .. |
---|
797 | 855 | |
---|
798 | 856 | if (marked && Globals.isLIVE() && live && |
---|
799 | 857 | //TEMP21aug2018 |
---|
800 | | - Globals.DrawMode() == iCameraPane.SHADOW && |
---|
| 858 | + (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) && |
---|
801 | 859 | currentframe != Globals.framecount) |
---|
802 | 860 | { |
---|
803 | 861 | currentframe = Globals.framecount; |
---|
.. | .. |
---|
912 | 970 | fromParent = null; // LA.newMatrix(); |
---|
913 | 971 | bRep = null; // new BoundaryRep(); |
---|
914 | 972 | |
---|
| 973 | + if (oname != null && oname.equals("LeftHand")) |
---|
| 974 | + { |
---|
| 975 | + name = oname; |
---|
| 976 | + } |
---|
| 977 | + |
---|
915 | 978 | /* |
---|
916 | 979 | float hue = (float)Math.random(); |
---|
917 | 980 | Color col; |
---|
.. | .. |
---|
954 | 1017 | |
---|
955 | 1018 | public Object clone() |
---|
956 | 1019 | { |
---|
957 | | - return GrafreeD.clone(this); |
---|
| 1020 | + return Grafreed.clone(this); |
---|
958 | 1021 | } |
---|
959 | 1022 | |
---|
960 | 1023 | Object3D copyExpand() |
---|
.. | .. |
---|
1470 | 1533 | BoundaryRep.SEUIL = other.material.cameralight; |
---|
1471 | 1534 | |
---|
1472 | 1535 | // Set default to 0.1 |
---|
1473 | | - BoundaryRep.SEUIL /= 2; |
---|
| 1536 | + BoundaryRep.SEUIL /= 4; // 2; |
---|
1474 | 1537 | System.out.println("SEUIL = " + BoundaryRep.SEUIL); |
---|
1475 | 1538 | } |
---|
1476 | 1539 | |
---|
.. | .. |
---|
1729 | 1792 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1730 | 1793 | o.bRep = transientrep; |
---|
1731 | 1794 | if (clone) |
---|
1732 | | - o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); |
---|
| 1795 | + o.bRep = (BoundaryRep) Grafreed.clone(transientrep); |
---|
1733 | 1796 | o.CreateMaterial(); |
---|
1734 | 1797 | o.SetAttributes(this, -1); |
---|
1735 | 1798 | //parent |
---|
.. | .. |
---|
1742 | 1805 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1743 | 1806 | o.bRep = bRep; |
---|
1744 | 1807 | if (clone) |
---|
1745 | | - o.bRep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
| 1808 | + o.bRep = (BoundaryRep) Grafreed.clone(bRep); |
---|
1746 | 1809 | o.CreateMaterial(); |
---|
1747 | 1810 | //o.overwriteThis(this, -1); |
---|
1748 | 1811 | o.SetAttributes(this, -1); |
---|
.. | .. |
---|
1829 | 1892 | if (obj.name == null) |
---|
1830 | 1893 | continue; // can't be a null one |
---|
1831 | 1894 | |
---|
| 1895 | + // Try perfect match first. |
---|
1832 | 1896 | if (n.equals(obj.name)) |
---|
1833 | 1897 | { |
---|
1834 | 1898 | theobj = obj; |
---|
1835 | 1899 | count++; |
---|
1836 | 1900 | } |
---|
1837 | 1901 | } |
---|
| 1902 | + |
---|
| 1903 | + // not needed: n = n.split(":")[0]; // Poser generates a count |
---|
1838 | 1904 | |
---|
1839 | 1905 | if (count != 1) |
---|
1840 | 1906 | for (int i=Size(); --i>=0;) |
---|
.. | .. |
---|
2983 | 3049 | blockloop = false; |
---|
2984 | 3050 | } |
---|
2985 | 3051 | |
---|
| 3052 | + void TransformChildren() |
---|
| 3053 | + { |
---|
| 3054 | + if (toParent != null) |
---|
| 3055 | + { |
---|
| 3056 | + for (int i=Size(); --i>=0;) |
---|
| 3057 | + { |
---|
| 3058 | + Object3D v = get(i); |
---|
| 3059 | + |
---|
| 3060 | + if (v.toParent == null) |
---|
| 3061 | + { |
---|
| 3062 | + v.toParent = LA.newMatrix(); |
---|
| 3063 | + v.fromParent = LA.newMatrix(); |
---|
| 3064 | + } |
---|
| 3065 | + |
---|
| 3066 | +// LA.matConcat(v.toParent, toParent, v.toParent); |
---|
| 3067 | +// LA.matConcat(fromParent, v.fromParent, v.fromParent); |
---|
| 3068 | + LA.matConcat(toParent, v.toParent, v.toParent); |
---|
| 3069 | + LA.matConcat(v.fromParent, fromParent, v.fromParent); |
---|
| 3070 | + } |
---|
| 3071 | + |
---|
| 3072 | + toParent = null; // LA.matIdentity(toParent); |
---|
| 3073 | + fromParent = null; // LA.matIdentity(fromParent); |
---|
| 3074 | + |
---|
| 3075 | + Touch(); |
---|
| 3076 | + } |
---|
| 3077 | + } |
---|
| 3078 | + |
---|
2986 | 3079 | void TransformGeometry() |
---|
2987 | 3080 | { |
---|
2988 | 3081 | Object3D obj = this; |
---|
.. | .. |
---|
3204 | 3297 | |
---|
3205 | 3298 | BoundaryRep sup = bRep.support; |
---|
3206 | 3299 | bRep.support = null; |
---|
3207 | | - BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
| 3300 | + BoundaryRep temprep = (BoundaryRep) Grafreed.clone(bRep); |
---|
3208 | 3301 | // bRep.SplitInTwo(onlyone); // thread... |
---|
3209 | | - temprep.SplitInTwo(reduction34, onlyone); |
---|
| 3302 | + |
---|
| 3303 | + while(temprep.SplitInTwo(reduction34, onlyone)); |
---|
| 3304 | + |
---|
3210 | 3305 | bRep = temprep; |
---|
3211 | 3306 | bRep.support = sup; |
---|
3212 | 3307 | Touch(); |
---|
.. | .. |
---|
3728 | 3823 | if (child == null) |
---|
3729 | 3824 | continue; |
---|
3730 | 3825 | |
---|
3731 | | - if (GrafreeD.RENDERME > 0) |
---|
| 3826 | + if (Grafreed.RENDERME > 0) |
---|
3732 | 3827 | { |
---|
3733 | 3828 | if (child instanceof Merge) |
---|
3734 | 3829 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
3879 | 3974 | if (child == null) |
---|
3880 | 3975 | continue; |
---|
3881 | 3976 | |
---|
3882 | | - if (GrafreeD.RENDERME > 0) |
---|
| 3977 | + if (Grafreed.RENDERME > 0) |
---|
3883 | 3978 | { |
---|
3884 | 3979 | if (child instanceof Merge) |
---|
3885 | 3980 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4074 | 4169 | if (child == null) |
---|
4075 | 4170 | continue; |
---|
4076 | 4171 | |
---|
4077 | | - if (GrafreeD.RENDERME > 0) |
---|
| 4172 | + if (Grafreed.RENDERME > 0) |
---|
4078 | 4173 | { |
---|
4079 | 4174 | if (child instanceof Merge) |
---|
4080 | 4175 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4681 | 4776 | |
---|
4682 | 4777 | cTreePath SelectLeaf(int indexcount, boolean deselect) |
---|
4683 | 4778 | { |
---|
4684 | | - if (hide) |
---|
| 4779 | + if (hide || dontselect) |
---|
4685 | 4780 | return null; |
---|
4686 | 4781 | |
---|
4687 | 4782 | if (count <= 0) |
---|
.. | .. |
---|
4707 | 4802 | |
---|
4708 | 4803 | cTreePath Select(int indexcount, boolean deselect) |
---|
4709 | 4804 | { |
---|
4710 | | - if (hide) |
---|
| 4805 | + if (hide || dontselect) |
---|
4711 | 4806 | return null; |
---|
4712 | 4807 | |
---|
4713 | 4808 | if (count <= 0) |
---|
.. | .. |
---|
5333 | 5428 | } |
---|
5334 | 5429 | } |
---|
5335 | 5430 | |
---|
| 5431 | + UUID GetUUID() |
---|
| 5432 | + { |
---|
| 5433 | + if (uuid == null) |
---|
| 5434 | + { |
---|
| 5435 | + // Serial |
---|
| 5436 | + uuid = UUID.randomUUID(); |
---|
| 5437 | + } |
---|
| 5438 | + |
---|
| 5439 | + return uuid; |
---|
| 5440 | + } |
---|
| 5441 | + |
---|
| 5442 | + Object3D GetObject(UUID uid) |
---|
| 5443 | + { |
---|
| 5444 | + if (blockloop) |
---|
| 5445 | + return null; |
---|
| 5446 | + |
---|
| 5447 | + if (GetUUID().equals(uid)) |
---|
| 5448 | + return this; |
---|
| 5449 | + |
---|
| 5450 | + int nb = Size(); |
---|
| 5451 | + for (int i = 0; i < nb; i++) |
---|
| 5452 | + { |
---|
| 5453 | + Object3D child = (Object3D) get(i); |
---|
| 5454 | + |
---|
| 5455 | + if (child == null) |
---|
| 5456 | + continue; |
---|
| 5457 | + |
---|
| 5458 | + blockloop = true; |
---|
| 5459 | + Object3D obj = child.GetObject(uid); |
---|
| 5460 | + blockloop = false; |
---|
| 5461 | + if (obj != null) |
---|
| 5462 | + return obj; |
---|
| 5463 | + } |
---|
| 5464 | + |
---|
| 5465 | + return null; |
---|
| 5466 | + } |
---|
| 5467 | + |
---|
5336 | 5468 | void SetBumpTexture(String tex) |
---|
5337 | 5469 | { |
---|
5338 | 5470 | if (GetTextures() == null) |
---|
.. | .. |
---|
5377 | 5509 | boolean NeedSupport() |
---|
5378 | 5510 | { |
---|
5379 | 5511 | return |
---|
5380 | | - CameraPane.SUPPORT && !CameraPane.movingcamera && link2master && /*live &&*/ support != null |
---|
| 5512 | + CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null |
---|
5381 | 5513 | // PROBLEM with CROWD!! |
---|
5382 | | - && (Globals.DrawMode() == iCameraPane.SHADOW || Globals.CROWD); |
---|
| 5514 | + && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD); |
---|
5383 | 5515 | } |
---|
5384 | 5516 | |
---|
5385 | 5517 | static boolean DEBUG_SELECTION = false; |
---|
.. | .. |
---|
5394 | 5526 | } |
---|
5395 | 5527 | |
---|
5396 | 5528 | if (display.DrawMode() == iCameraPane.SELECTION && |
---|
5397 | | - hide) |
---|
| 5529 | + (hide || dontselect)) |
---|
5398 | 5530 | return; |
---|
5399 | 5531 | |
---|
5400 | 5532 | if (name != null && name.contains("sclera")) |
---|
.. | .. |
---|
5636 | 5768 | tex = GetTextures(); |
---|
5637 | 5769 | } |
---|
5638 | 5770 | |
---|
5639 | | - display.BindTextures(tex, texres); |
---|
| 5771 | + boolean failed = false; |
---|
| 5772 | + |
---|
| 5773 | + try |
---|
| 5774 | + { |
---|
| 5775 | + display.BindTextures(tex, texres); |
---|
| 5776 | + } |
---|
| 5777 | + catch (Exception e) |
---|
| 5778 | + { |
---|
| 5779 | + System.err.println("FAILED: " + this); |
---|
| 5780 | + failed = true; |
---|
| 5781 | + } |
---|
5640 | 5782 | |
---|
5641 | 5783 | if (!compiled) |
---|
5642 | 5784 | { |
---|
.. | .. |
---|
5658 | 5800 | } |
---|
5659 | 5801 | } |
---|
5660 | 5802 | |
---|
5661 | | - display.ReleaseTextures(tex); |
---|
| 5803 | + if (!failed) |
---|
| 5804 | + display.ReleaseTextures(tex); |
---|
5662 | 5805 | |
---|
5663 | 5806 | display.PopMaterial(this, selected); |
---|
5664 | 5807 | } |
---|
.. | .. |
---|
5787 | 5930 | |
---|
5788 | 5931 | void drawSelf(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked) |
---|
5789 | 5932 | { |
---|
| 5933 | + if (display.DrawMode() == iCameraPane.SELECTION && dontselect) |
---|
| 5934 | + return; |
---|
| 5935 | + |
---|
5790 | 5936 | if (hide) |
---|
5791 | 5937 | return; |
---|
5792 | 5938 | // shadow optimisation |
---|
.. | .. |
---|
5911 | 6057 | { |
---|
5912 | 6058 | if (display.DrawMode() == display.SHADOW && projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
5913 | 6059 | return; // no shadow for transparent objects |
---|
| 6060 | + |
---|
| 6061 | + if (display.DrawMode() == iCameraPane.SELECTION && dontselect) |
---|
| 6062 | + return; |
---|
5914 | 6063 | |
---|
5915 | 6064 | if (hide) |
---|
5916 | 6065 | return; |
---|
.. | .. |
---|
6895 | 7044 | // { |
---|
6896 | 7045 | // CameraPane.Ymax = spoth; |
---|
6897 | 7046 | // } |
---|
6898 | | - info.g.drawLine(spotw, spoth, spotw, spoth - 15); |
---|
6899 | | - info.g.drawLine(spotw, spoth, spotw - 15, spoth); |
---|
| 7047 | + // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15); |
---|
| 7048 | + //info.g.drawLine(spotw, spoth, spotw - 15, spoth); |
---|
6900 | 7049 | spot.translate(0, -32); |
---|
6901 | 7050 | info.g.setColor(Color.green); |
---|
6902 | 7051 | info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
.. | .. |
---|
6951 | 7100 | startX = info.x; |
---|
6952 | 7101 | startY = info.y; |
---|
6953 | 7102 | |
---|
6954 | | - hitSomething = 0; |
---|
| 7103 | + hitSomething = -1; |
---|
6955 | 7104 | cVector origin = new cVector(); |
---|
6956 | 7105 | //LA.xformPos(origin, toParent, origin); |
---|
6957 | 7106 | Rectangle spot = new Rectangle(); |
---|
.. | .. |
---|
7027 | 7176 | //System.out.println("hitSomething = " + hitSomething); |
---|
7028 | 7177 | |
---|
7029 | 7178 | double scale = 0.005f * info.camera.Distance(); |
---|
| 7179 | + |
---|
7030 | 7180 | cVector xlate = new cVector(); |
---|
7031 | 7181 | //cVector xlate2 = new cVector(); |
---|
7032 | 7182 | switch (hitSomething) |
---|
.. | .. |
---|
7175 | 7325 | |
---|
7176 | 7326 | case hitScale: // scale |
---|
7177 | 7327 | double hScale = (double) (info.x - centerPt.x) / 32; |
---|
| 7328 | + double sign = 1; |
---|
| 7329 | + if (hScale < 0) |
---|
| 7330 | + { |
---|
| 7331 | + sign = -1; |
---|
| 7332 | + } |
---|
| 7333 | + hScale = sign*Math.pow(sign*hScale, scale * 50); |
---|
7178 | 7334 | if (hScale < 0.01) |
---|
7179 | 7335 | { |
---|
7180 | | - hScale = 0.01; |
---|
| 7336 | + //hScale = 0.01; |
---|
7181 | 7337 | } |
---|
7182 | | - hScale = Math.pow(hScale, scale * 50); |
---|
7183 | | - if (hScale < 0.01) |
---|
7184 | | - { |
---|
7185 | | - hScale = 0.01; |
---|
7186 | | - } |
---|
| 7338 | + |
---|
7187 | 7339 | double vScale = (double) (info.y - centerPt.y) / 32; |
---|
7188 | | - if (vScale < 0.01) |
---|
| 7340 | + sign = 1; |
---|
| 7341 | + if (vScale < 0) |
---|
7189 | 7342 | { |
---|
7190 | | - vScale = 0.01; |
---|
| 7343 | + sign = -1; |
---|
7191 | 7344 | } |
---|
7192 | | - vScale = Math.pow(vScale, scale * 50); |
---|
| 7345 | + vScale = sign*Math.pow(sign*vScale, scale * 50); |
---|
7193 | 7346 | if (vScale < 0.01) |
---|
7194 | 7347 | { |
---|
7195 | | - vScale = 0.01; |
---|
| 7348 | + //vScale = 0.01; |
---|
7196 | 7349 | } |
---|
7197 | 7350 | LA.matCopy(startMat, toParent); |
---|
7198 | 7351 | /**/ |
---|
.. | .. |
---|
7203 | 7356 | } |
---|
7204 | 7357 | /**/ |
---|
7205 | 7358 | |
---|
| 7359 | + double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2); |
---|
| 7360 | + |
---|
| 7361 | + if (totalScale < 0.01) |
---|
| 7362 | + { |
---|
| 7363 | + totalScale = 0.01; |
---|
| 7364 | + } |
---|
| 7365 | + |
---|
7206 | 7366 | switch (info.pane.RenderCamera().viewCode) |
---|
7207 | 7367 | { |
---|
7208 | 7368 | case 3: // '\001' |
---|
7209 | 7369 | if (modified) |
---|
7210 | 7370 | { |
---|
7211 | 7371 | //LA.matScale(toParent, 1, hScale, vScale); |
---|
7212 | | - LA.matScale(toParent, vScale, 1, 1); |
---|
| 7372 | + LA.matScale(toParent, totalScale, 1, 1); |
---|
7213 | 7373 | } // vScale, 1); |
---|
7214 | 7374 | else |
---|
7215 | 7375 | { |
---|
7216 | | - LA.matScale(toParent, vScale, vScale, vScale); |
---|
| 7376 | + LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
7217 | 7377 | } // vScale, 1); |
---|
7218 | 7378 | break; |
---|
7219 | 7379 | |
---|
.. | .. |
---|
7221 | 7381 | if (modified) |
---|
7222 | 7382 | { |
---|
7223 | 7383 | //LA.matScale(toParent, hScale, 1, vScale); |
---|
7224 | | - LA.matScale(toParent, 1, vScale, 1); |
---|
| 7384 | + LA.matScale(toParent, 1, totalScale, 1); |
---|
7225 | 7385 | } else |
---|
7226 | 7386 | { |
---|
7227 | | - LA.matScale(toParent, vScale, 1, vScale); |
---|
| 7387 | + LA.matScale(toParent, totalScale, 1, totalScale); |
---|
7228 | 7388 | } |
---|
7229 | 7389 | break; |
---|
7230 | 7390 | |
---|
.. | .. |
---|
7232 | 7392 | if (modified) |
---|
7233 | 7393 | { |
---|
7234 | 7394 | //LA.matScale(toParent, hScale, vScale, 1); |
---|
7235 | | - LA.matScale(toParent, 1, 1, vScale); |
---|
| 7395 | + LA.matScale(toParent, 1, 1, totalScale); |
---|
7236 | 7396 | } else |
---|
7237 | 7397 | { |
---|
7238 | | - LA.matScale(toParent, vScale, vScale, 1); |
---|
| 7398 | + LA.matScale(toParent, totalScale, totalScale, 1); |
---|
7239 | 7399 | } |
---|
7240 | 7400 | break; |
---|
7241 | 7401 | } |
---|
.. | .. |
---|
7368 | 7528 | //return super.toString() + " (id=" + list + ")" + " (brep=" + bRep + ")"; |
---|
7369 | 7529 | //return name + " (id=" + list + ")" + " (brep=" + bRep + ") " + super.toString(); |
---|
7370 | 7530 | //return name + " (#tri = " + (bRep==null?0:bRep.VertexCount()) + ") " + super.toString(); |
---|
| 7531 | + |
---|
| 7532 | + String objname; |
---|
| 7533 | + |
---|
7371 | 7534 | if (false) //parent != null) |
---|
7372 | 7535 | { |
---|
7373 | | - return name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")"; |
---|
| 7536 | + objname = name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")"; |
---|
7374 | 7537 | } else |
---|
7375 | 7538 | { |
---|
7376 | | - return GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count /*- 1*/) + ") ")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ +System.identityHashCode(this); |
---|
| 7539 | + objname = GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count - 1) + ")")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ ""; |
---|
7377 | 7540 | } // + super.toString(); |
---|
7378 | 7541 | //return name + " (" + (SizeOf.deepSizeOf(this)/1024) + "K) " + this.getClass().getName(); |
---|
| 7542 | + |
---|
| 7543 | + if (!Globals.ADVANCED) |
---|
| 7544 | + return objname; |
---|
| 7545 | + |
---|
| 7546 | + return objname + " " + System.identityHashCode(this); |
---|
7379 | 7547 | } |
---|
7380 | 7548 | |
---|
7381 | 7549 | public int hashCode() |
---|
.. | .. |
---|
7452 | 7620 | /*transient*/ cVector2[] projectedVertices = new cVector2[0]; |
---|
7453 | 7621 | |
---|
7454 | 7622 | Object3D /*Composite*/ parent; |
---|
7455 | | - Object3D /*Composite*/ fileparent; |
---|
| 7623 | + Object3D /*Composite*/ fileparent; // In the case of FileObject |
---|
7456 | 7624 | |
---|
7457 | 7625 | double[][] toParent; // dynamic matrix |
---|
7458 | 7626 | double[][] fromParent; |
---|
.. | .. |
---|
7567 | 7735 | { |
---|
7568 | 7736 | assert(bRep != null); |
---|
7569 | 7737 | if (!(support instanceof GenericJoint)) // support.bRep != null) |
---|
7570 | | - GrafreeD.Assert(support.bRep == bRep.support); |
---|
| 7738 | + Grafreed.Assert(support.bRep == bRep.support); |
---|
7571 | 7739 | } |
---|
7572 | 7740 | else |
---|
7573 | 7741 | { |
---|
.. | .. |
---|
7616 | 7784 | private static cVector edge2 = new cVector(); |
---|
7617 | 7785 | //private static cVector norm = new cVector(); |
---|
7618 | 7786 | /*transient private*/ int hitSomething; |
---|
7619 | | - private static final int hitCenter = 1; |
---|
7620 | | - private static final int hitScale = 2; |
---|
7621 | | - private static final int hitRotate = 3; |
---|
| 7787 | + static final int hitCenter = 1; |
---|
| 7788 | + static final int hitScale = 2; |
---|
| 7789 | + static final int hitRotate = 3; |
---|
7622 | 7790 | /*transient*/ /*private*/ int viewCode; // Now used for transparency cache flag |
---|
7623 | 7791 | /*transient*/ private Point centerPt; |
---|
7624 | 7792 | /*transient*/ private int startX; |
---|