Normand Briere
2019-06-11 4113164b3be1e50251ac40d6fd65660f0a6c2e63
Object3D.java
....@@ -14,11 +14,15 @@
1414 import //weka.core.
1515 matrix.Matrix;
1616
17
+import java.util.UUID;
18
+
1719 //import net.sourceforge.sizeof.SizeOf;
1820 public class Object3D extends Vector<Object3D> implements java.io.Serializable, iSendInfo //, aurelienribon.tweenengine.TweenAccessor<Object3D>
1921 {
2022 //static final long serialVersionUID = -607422624994562685L;
2123 static final long serialVersionUID = 5022536242724664900L;
24
+
25
+ private UUID uuid = UUID.randomUUID();
2226
2327 ScriptNode scriptnode;
2428
....@@ -156,6 +160,67 @@
156160 blockloop = true;
157161 child.RestoreSupports();
158162 blockloop = false;
163
+ }
164
+}
165
+
166
+void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
167
+{
168
+ if (hashtable.containsKey(GetUUID()))
169
+ {
170
+ Object3D o = hashtable.get(GetUUID());
171
+
172
+ assert(this.bRep == o.bRep);
173
+ if (this.bRep != null)
174
+ assert(this.bRep.support == o.transientrep);
175
+
176
+ return;
177
+ }
178
+
179
+ Object3D o = new Object3D();
180
+ o.bRep = this.bRep;
181
+ if (this.bRep != null)
182
+ {
183
+ o.transientrep = this.bRep.support;
184
+ o.bRep.support = null;
185
+ }
186
+
187
+// o.support = this.support;
188
+// o.fileparent = this.fileparent;
189
+// if (this.bRep != null)
190
+// o.bRep = this.bRep.support;
191
+
192
+ hashtable.put(GetUUID(), o);
193
+
194
+ this.bRep = null;
195
+// if (this.bRep != null)
196
+// this.bRep.support = null;
197
+// this.support = null;
198
+// this.fileparent = null;
199
+
200
+ for (int i=0; i<Size(); i++)
201
+ {
202
+ get(i).ExtractBigData(hashtable);
203
+ }
204
+}
205
+
206
+void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
207
+{
208
+ if (!hashtable.containsKey(GetUUID()))
209
+ return;
210
+
211
+ Object3D o = hashtable.get(GetUUID());
212
+
213
+ this.bRep = o.bRep;
214
+ if (this.bRep != null)
215
+ this.bRep.support = o.transientrep;
216
+// this.support = o.support;
217
+// this.fileparent = o.fileparent;
218
+
219
+ hashtable.remove(GetUUID());
220
+
221
+ for (int i=0; i<Size(); i++)
222
+ {
223
+ get(i).RestoreBigData(hashtable);
159224 }
160225 }
161226
....@@ -300,6 +365,7 @@
300365 }
301366
302367 boolean live = false;
368
+ boolean dontselect = false;
303369 boolean hide = false;
304370 boolean link2master = false; // performs reset support/master at each frame
305371 boolean marked = false; // animation node
....@@ -774,7 +840,7 @@
774840 if (step == 0)
775841 step = 1;
776842 if (maxcount == 0)
777
- maxcount = 2048; // 4;
843
+ maxcount = 128; // 2048; // 4;
778844 // if (acceleration == 0)
779845 // acceleration = 10;
780846 if (delay == 0) // serial
....@@ -797,7 +863,7 @@
797863
798864 if (marked && Globals.isLIVE() && live &&
799865 //TEMP21aug2018
800
- Globals.DrawMode() == iCameraPane.SHADOW &&
866
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
801867 currentframe != Globals.framecount)
802868 {
803869 currentframe = Globals.framecount;
....@@ -912,6 +978,11 @@
912978 fromParent = null; // LA.newMatrix();
913979 bRep = null; // new BoundaryRep();
914980
981
+ if (oname != null && oname.equals("LeftHand"))
982
+ {
983
+ name = oname;
984
+ }
985
+
915986 /*
916987 float hue = (float)Math.random();
917988 Color col;
....@@ -954,7 +1025,7 @@
9541025
9551026 public Object clone()
9561027 {
957
- return GrafreeD.clone(this);
1028
+ return Grafreed.clone(this);
9581029 }
9591030
9601031 Object3D copyExpand()
....@@ -1470,7 +1541,7 @@
14701541 BoundaryRep.SEUIL = other.material.cameralight;
14711542
14721543 // Set default to 0.1
1473
- BoundaryRep.SEUIL /= 2;
1544
+ BoundaryRep.SEUIL /= 4; // 2;
14741545 System.out.println("SEUIL = " + BoundaryRep.SEUIL);
14751546 }
14761547
....@@ -1729,7 +1800,7 @@
17291800 Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name);
17301801 o.bRep = transientrep;
17311802 if (clone)
1732
- o.bRep = (BoundaryRep) GrafreeD.clone(transientrep);
1803
+ o.bRep = (BoundaryRep) Grafreed.clone(transientrep);
17331804 o.CreateMaterial();
17341805 o.SetAttributes(this, -1);
17351806 //parent
....@@ -1742,7 +1813,7 @@
17421813 Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name);
17431814 o.bRep = bRep;
17441815 if (clone)
1745
- o.bRep = (BoundaryRep) GrafreeD.clone(bRep);
1816
+ o.bRep = (BoundaryRep) Grafreed.clone(bRep);
17461817 o.CreateMaterial();
17471818 //o.overwriteThis(this, -1);
17481819 o.SetAttributes(this, -1);
....@@ -1829,12 +1900,15 @@
18291900 if (obj.name == null)
18301901 continue; // can't be a null one
18311902
1903
+ // Try perfect match first.
18321904 if (n.equals(obj.name))
18331905 {
18341906 theobj = obj;
18351907 count++;
18361908 }
18371909 }
1910
+
1911
+ // not needed: n = n.split(":")[0]; // Poser generates a count
18381912
18391913 if (count != 1)
18401914 for (int i=Size(); --i>=0;)
....@@ -2300,6 +2374,7 @@
23002374 {
23012375 if (newWindow)
23022376 {
2377
+ new Exception().printStackTrace();
23032378 System.exit(0);
23042379 if (parent != null)
23052380 {
....@@ -2476,13 +2551,13 @@
24762551 return retval;
24772552 }
24782553
2479
- void doEditDrag(ClickInfo info)
2554
+ void doEditDrag(ClickInfo info, boolean opposite)
24802555 {
24812556 switch (doSomething)
24822557 {
24832558 case 1: // '\001'
24842559 //super.
2485
- doEditDrag0(info);
2560
+ doEditDrag0(info, opposite);
24862561 break;
24872562
24882563 case 2: // '\002'
....@@ -2495,11 +2570,11 @@
24952570 {
24962571 //sel.hitSomething = childToDrag.hitSomething;
24972572 //childToDrag.doEditDrag(info);
2498
- sel.doEditDrag(info);
2573
+ sel.doEditDrag(info, opposite);
24992574 } else
25002575 {
25012576 //super.
2502
- doEditDrag0(info);
2577
+ doEditDrag0(info, opposite);
25032578 }
25042579 }
25052580 break;
....@@ -2906,7 +2981,8 @@
29062981 {
29072982 if (bRep != null)
29082983 {
2909
- bRep.GenUV();
2984
+ bRep.GenUV(); //1);
2985
+ //bRep.UnfoldUV();
29102986 Touch();
29112987 }
29122988 }
....@@ -2981,6 +3057,33 @@
29813057 blockloop = false;
29823058 }
29833059
3060
+ void TransformChildren()
3061
+ {
3062
+ if (toParent != null)
3063
+ {
3064
+ for (int i=Size(); --i>=0;)
3065
+ {
3066
+ Object3D v = get(i);
3067
+
3068
+ if (v.toParent == null)
3069
+ {
3070
+ v.toParent = LA.newMatrix();
3071
+ v.fromParent = LA.newMatrix();
3072
+ }
3073
+
3074
+// LA.matConcat(v.toParent, toParent, v.toParent);
3075
+// LA.matConcat(fromParent, v.fromParent, v.fromParent);
3076
+ LA.matConcat(toParent, v.toParent, v.toParent);
3077
+ LA.matConcat(v.fromParent, fromParent, v.fromParent);
3078
+ }
3079
+
3080
+ toParent = null; // LA.matIdentity(toParent);
3081
+ fromParent = null; // LA.matIdentity(fromParent);
3082
+
3083
+ Touch();
3084
+ }
3085
+ }
3086
+
29843087 void TransformGeometry()
29853088 {
29863089 Object3D obj = this;
....@@ -3202,9 +3305,11 @@
32023305
32033306 BoundaryRep sup = bRep.support;
32043307 bRep.support = null;
3205
- BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep);
3308
+ BoundaryRep temprep = (BoundaryRep) Grafreed.clone(bRep);
32063309 // bRep.SplitInTwo(onlyone); // thread...
3207
- temprep.SplitInTwo(reduction34, onlyone);
3310
+
3311
+ while(temprep.SplitInTwo(reduction34, onlyone));
3312
+
32083313 bRep = temprep;
32093314 bRep.support = sup;
32103315 Touch();
....@@ -3726,7 +3831,7 @@
37263831 if (child == null)
37273832 continue;
37283833
3729
- if (GrafreeD.RENDERME > 0)
3834
+ if (Grafreed.RENDERME > 0)
37303835 {
37313836 if (child instanceof Merge)
37323837 ((Merge)child).renderme();
....@@ -3877,7 +3982,7 @@
38773982 if (child == null)
38783983 continue;
38793984
3880
- if (GrafreeD.RENDERME > 0)
3985
+ if (Grafreed.RENDERME > 0)
38813986 {
38823987 if (child instanceof Merge)
38833988 ((Merge)child).renderme();
....@@ -4072,7 +4177,7 @@
40724177 if (child == null)
40734178 continue;
40744179
4075
- if (GrafreeD.RENDERME > 0)
4180
+ if (Grafreed.RENDERME > 0)
40764181 {
40774182 if (child instanceof Merge)
40784183 ((Merge)child).renderme();
....@@ -4679,7 +4784,7 @@
46794784
46804785 cTreePath SelectLeaf(int indexcount, boolean deselect)
46814786 {
4682
- if (hide)
4787
+ if (hide || dontselect)
46834788 return null;
46844789
46854790 if (count <= 0)
....@@ -4705,7 +4810,7 @@
47054810
47064811 cTreePath Select(int indexcount, boolean deselect)
47074812 {
4708
- if (hide)
4813
+ if (hide || dontselect)
47094814 return null;
47104815
47114816 if (count <= 0)
....@@ -5157,10 +5262,34 @@
51575262
51585263 // System.out.println("Fullname = " + fullname);
51595264
5160
- if (fullname.name.indexOf(":") == -1)
5161
- return fullname.name;
5265
+ // Does not work on Windows due to C:
5266
+// if (fullname.name.indexOf(":") == -1)
5267
+// return fullname.name;
5268
+//
5269
+// return fullname.name.substring(0,fullname.name.indexOf(":"));
51625270
5163
- return fullname.name.substring(0,fullname.name.indexOf(":"));
5271
+ String[] split = fullname.name.split(":");
5272
+
5273
+ if (split.length == 0)
5274
+ {
5275
+ return "";
5276
+ }
5277
+
5278
+ if (split.length <= 2)
5279
+ {
5280
+ if (fullname.name.endsWith(":"))
5281
+ {
5282
+ // Windows
5283
+ return fullname.name.substring(0, fullname.name.length()-1);
5284
+ }
5285
+
5286
+ return split[0];
5287
+ }
5288
+
5289
+ // Windows
5290
+ assert(split.length == 4);
5291
+
5292
+ return split[0] + ":" + split[1];
51645293 }
51655294
51665295 static String GetBump(cTexture fullname)
....@@ -5169,10 +5298,38 @@
51695298 return "";
51705299
51715300 // System.out.println("Fullname = " + fullname);
5172
- if (fullname.name.indexOf(":") == -1)
5173
- return "";
5174
-
5175
- return fullname.name.substring(fullname.name.indexOf(":")+1,fullname.name.length());
5301
+ // Does not work on Windows due to C:
5302
+// if (fullname.name.indexOf(":") == -1)
5303
+// return "";
5304
+//
5305
+// return fullname.name.substring(fullname.name.indexOf(":")+1,fullname.name.length());
5306
+ String[] split = fullname.name.split(":");
5307
+
5308
+ if (split.length == 0)
5309
+ {
5310
+ return "";
5311
+ }
5312
+
5313
+ if (split.length == 1)
5314
+ {
5315
+ return "";
5316
+ }
5317
+
5318
+ if (split.length == 2)
5319
+ {
5320
+ if (fullname.name.endsWith(":"))
5321
+ {
5322
+ // Windows
5323
+ return "";
5324
+ }
5325
+
5326
+ return split[1];
5327
+ }
5328
+
5329
+ // Windows
5330
+ assert(split.length == 4);
5331
+
5332
+ return split[2] + ":" + split[3];
51765333 }
51775334
51785335 String GetPigmentTexture()
....@@ -5246,7 +5403,7 @@
52465403 System.out.print("; textures = " + textures);
52475404 System.out.println("; usedtextures = " + usedtextures);
52485405
5249
- if (GetTextures() == null)
5406
+ if (GetTextures() == null) // What is that??
52505407 GetTextures().name = ":";
52515408
52525409 String texname = tex;
....@@ -5277,6 +5434,43 @@
52775434 child.ResetPigmentTexture();
52785435 blockloop = false;
52795436 }
5437
+ }
5438
+
5439
+ UUID GetUUID()
5440
+ {
5441
+ if (uuid == null)
5442
+ {
5443
+ // Serial
5444
+ uuid = UUID.randomUUID();
5445
+ }
5446
+
5447
+ return uuid;
5448
+ }
5449
+
5450
+ Object3D GetObject(UUID uid)
5451
+ {
5452
+ if (blockloop)
5453
+ return null;
5454
+
5455
+ if (GetUUID().equals(uid))
5456
+ return this;
5457
+
5458
+ int nb = Size();
5459
+ for (int i = 0; i < nb; i++)
5460
+ {
5461
+ Object3D child = (Object3D) get(i);
5462
+
5463
+ if (child == null)
5464
+ continue;
5465
+
5466
+ blockloop = true;
5467
+ Object3D obj = child.GetObject(uid);
5468
+ blockloop = false;
5469
+ if (obj != null)
5470
+ return obj;
5471
+ }
5472
+
5473
+ return null;
52805474 }
52815475
52825476 void SetBumpTexture(String tex)
....@@ -5323,9 +5517,9 @@
53235517 boolean NeedSupport()
53245518 {
53255519 return
5326
- CameraPane.SUPPORT && !CameraPane.movingcamera && link2master && /*live &&*/ support != null
5520
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
53275521 // PROBLEM with CROWD!!
5328
- && (Globals.DrawMode() == iCameraPane.SHADOW || Globals.CROWD);
5522
+ && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
53295523 }
53305524
53315525 static boolean DEBUG_SELECTION = false;
....@@ -5340,7 +5534,7 @@
53405534 }
53415535
53425536 if (display.DrawMode() == iCameraPane.SELECTION &&
5343
- hide)
5537
+ (hide || dontselect))
53445538 return;
53455539
53465540 if (name != null && name.contains("sclera"))
....@@ -5582,7 +5776,17 @@
55825776 tex = GetTextures();
55835777 }
55845778
5585
- display.BindTextures(tex, texres);
5779
+ boolean failed = false;
5780
+
5781
+ try
5782
+ {
5783
+ display.BindTextures(tex, texres);
5784
+ }
5785
+ catch (Exception e)
5786
+ {
5787
+ System.err.println("FAILED: " + this);
5788
+ failed = true;
5789
+ }
55865790
55875791 if (!compiled)
55885792 {
....@@ -5604,7 +5808,8 @@
56045808 }
56055809 }
56065810
5607
- display.ReleaseTextures(tex);
5811
+ if (!failed)
5812
+ display.ReleaseTextures(tex);
56085813
56095814 display.PopMaterial(this, selected);
56105815 }
....@@ -5733,6 +5938,9 @@
57335938
57345939 void drawSelf(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
57355940 {
5941
+ if (display.DrawMode() == iCameraPane.SELECTION && dontselect)
5942
+ return;
5943
+
57365944 if (hide)
57375945 return;
57385946 // shadow optimisation
....@@ -5858,6 +6066,9 @@
58586066 if (display.DrawMode() == display.SHADOW && projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000)
58596067 return; // no shadow for transparent objects
58606068
6069
+ if (display.DrawMode() == iCameraPane.SELECTION && dontselect)
6070
+ return;
6071
+
58616072 if (hide)
58626073 return;
58636074
....@@ -5898,6 +6109,7 @@
58986109 return;
58996110 }
59006111
6112
+ //bRep.GenUV(1/material.diffuseness);
59016113 // bRep.lock = true;
59026114
59036115 //javax.media.opengl.GL gl = display.GetGL();
....@@ -6840,8 +7052,8 @@
68407052 // {
68417053 // CameraPane.Ymax = spoth;
68427054 // }
6843
- info.g.drawLine(spotw, spoth, spotw, spoth - 15);
6844
- info.g.drawLine(spotw, spoth, spotw - 15, spoth);
7055
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
7056
+ //info.g.drawLine(spotw, spoth, spotw - 15, spoth);
68457057 spot.translate(0, -32);
68467058 info.g.setColor(Color.green);
68477059 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
....@@ -6896,7 +7108,7 @@
68967108 startX = info.x;
68977109 startY = info.y;
68987110
6899
- hitSomething = 0;
7111
+ hitSomething = -1;
69007112 cVector origin = new cVector();
69017113 //LA.xformPos(origin, toParent, origin);
69027114 Rectangle spot = new Rectangle();
....@@ -6929,7 +7141,7 @@
69297141 }
69307142
69317143 //System.out.println("info.modifiers = " + info.modifiers);
6932
- modified = (info.modifiers & CameraPane.META) != 0;
7144
+ modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META
69337145 //System.out.println("modified = " + modified);
69347146 //new Exception().printStackTrace();
69357147 //viewCode = info.pane.renderCamera.viewCode;
....@@ -6957,7 +7169,7 @@
69577169 return true;
69587170 }
69597171
6960
- void doEditDrag0(ClickInfo info)
7172
+ void doEditDrag0(ClickInfo info, boolean opposite)
69617173 {
69627174 if (hitSomething == 0)
69637175 {
....@@ -6972,6 +7184,7 @@
69727184 //System.out.println("hitSomething = " + hitSomething);
69737185
69747186 double scale = 0.005f * info.camera.Distance();
7187
+
69757188 cVector xlate = new cVector();
69767189 //cVector xlate2 = new cVector();
69777190 switch (hitSomething)
....@@ -6984,7 +7197,7 @@
69847197
69857198 scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance();
69867199
6987
- if (modified)
7200
+ if (modified || opposite)
69887201 {
69897202 //assert(false);
69907203 /*
....@@ -7078,6 +7291,7 @@
70787291
70797292 if (modified)
70807293 {
7294
+ // Rotate 90 degrees
70817295 angle /= (Math.PI / 4);
70827296 angle = Math.floor(angle + 0.5);
70837297 angle *= (Math.PI / 4);
....@@ -7119,24 +7333,27 @@
71197333
71207334 case hitScale: // scale
71217335 double hScale = (double) (info.x - centerPt.x) / 32;
7336
+ double sign = 1;
7337
+ if (hScale < 0)
7338
+ {
7339
+ sign = -1;
7340
+ }
7341
+ hScale = sign*Math.pow(sign*hScale, scale * 50);
71227342 if (hScale < 0.01)
71237343 {
7124
- hScale = 0.01;
7344
+ //hScale = 0.01;
71257345 }
7126
- hScale = Math.pow(hScale, scale * 50);
7127
- if (hScale < 0.01)
7128
- {
7129
- hScale = 0.01;
7130
- }
7346
+
71317347 double vScale = (double) (info.y - centerPt.y) / 32;
7132
- if (vScale < 0.01)
7348
+ sign = 1;
7349
+ if (vScale < 0)
71337350 {
7134
- vScale = 0.01;
7351
+ sign = -1;
71357352 }
7136
- vScale = Math.pow(vScale, scale * 50);
7353
+ vScale = sign*Math.pow(sign*vScale, scale * 50);
71377354 if (vScale < 0.01)
71387355 {
7139
- vScale = 0.01;
7356
+ //vScale = 0.01;
71407357 }
71417358 LA.matCopy(startMat, toParent);
71427359 /**/
....@@ -7147,17 +7364,24 @@
71477364 }
71487365 /**/
71497366
7367
+ double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2);
7368
+
7369
+ if (totalScale < 0.01)
7370
+ {
7371
+ totalScale = 0.01;
7372
+ }
7373
+
71507374 switch (info.pane.RenderCamera().viewCode)
71517375 {
71527376 case 3: // '\001'
71537377 if (modified)
71547378 {
71557379 //LA.matScale(toParent, 1, hScale, vScale);
7156
- LA.matScale(toParent, vScale, 1, 1);
7380
+ LA.matScale(toParent, totalScale, 1, 1);
71577381 } // vScale, 1);
71587382 else
71597383 {
7160
- LA.matScale(toParent, vScale, vScale, vScale);
7384
+ LA.matScale(toParent, totalScale, totalScale, totalScale);
71617385 } // vScale, 1);
71627386 break;
71637387
....@@ -7165,10 +7389,10 @@
71657389 if (modified)
71667390 {
71677391 //LA.matScale(toParent, hScale, 1, vScale);
7168
- LA.matScale(toParent, 1, vScale, 1);
7392
+ LA.matScale(toParent, 1, totalScale, 1);
71697393 } else
71707394 {
7171
- LA.matScale(toParent, vScale, 1, vScale);
7395
+ LA.matScale(toParent, totalScale, 1, totalScale);
71727396 }
71737397 break;
71747398
....@@ -7176,10 +7400,10 @@
71767400 if (modified)
71777401 {
71787402 //LA.matScale(toParent, hScale, vScale, 1);
7179
- LA.matScale(toParent, 1, 1, vScale);
7403
+ LA.matScale(toParent, 1, 1, totalScale);
71807404 } else
71817405 {
7182
- LA.matScale(toParent, vScale, vScale, 1);
7406
+ LA.matScale(toParent, totalScale, totalScale, 1);
71837407 }
71847408 break;
71857409 }
....@@ -7312,14 +7536,22 @@
73127536 //return super.toString() + " (id=" + list + ")" + " (brep=" + bRep + ")";
73137537 //return name + " (id=" + list + ")" + " (brep=" + bRep + ") " + super.toString();
73147538 //return name + " (#tri = " + (bRep==null?0:bRep.VertexCount()) + ") " + super.toString();
7539
+
7540
+ String objname;
7541
+
73157542 if (false) //parent != null)
73167543 {
7317
- return name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")";
7544
+ objname = name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")";
73187545 } else
73197546 {
7320
- return GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count /*- 1*/) + ") ")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ +System.identityHashCode(this);
7547
+ objname = GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count - 1) + ")")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ "";
73217548 } // + super.toString();
73227549 //return name + " (" + (SizeOf.deepSizeOf(this)/1024) + "K) " + this.getClass().getName();
7550
+
7551
+ if (!Globals.ADVANCED)
7552
+ return objname;
7553
+
7554
+ return objname + " " + System.identityHashCode(this);
73237555 }
73247556
73257557 public int hashCode()
....@@ -7375,6 +7607,7 @@
73757607 objectUI.closeUI();
73767608 if (editWindow != null)
73777609 {
7610
+ editWindow.ctrlPanel.FlushUI();
73787611 editWindow.refreshContents();
73797612 } // ? new
73807613 objectUI = null;
....@@ -7395,7 +7628,7 @@
73957628 /*transient*/ cVector2[] projectedVertices = new cVector2[0];
73967629
73977630 Object3D /*Composite*/ parent;
7398
- Object3D /*Composite*/ fileparent;
7631
+ Object3D /*Composite*/ fileparent; // In the case of FileObject
73997632
74007633 double[][] toParent; // dynamic matrix
74017634 double[][] fromParent;
....@@ -7510,7 +7743,7 @@
75107743 {
75117744 assert(bRep != null);
75127745 if (!(support instanceof GenericJoint)) // support.bRep != null)
7513
- GrafreeD.Assert(support.bRep == bRep.support);
7746
+ Grafreed.Assert(support.bRep == bRep.support);
75147747 }
75157748 else
75167749 {
....@@ -7559,9 +7792,9 @@
75597792 private static cVector edge2 = new cVector();
75607793 //private static cVector norm = new cVector();
75617794 /*transient private*/ int hitSomething;
7562
- private static final int hitCenter = 1;
7563
- private static final int hitScale = 2;
7564
- private static final int hitRotate = 3;
7795
+ static final int hitCenter = 1;
7796
+ static final int hitScale = 2;
7797
+ static final int hitRotate = 3;
75657798 /*transient*/ /*private*/ int viewCode; // Now used for transparency cache flag
75667799 /*transient*/ private Point centerPt;
75677800 /*transient*/ private int startX;