Normand Briere
2019-07-17 a5580a47d246c1272b10adba68070f6e13da5e41
Object3D.java
....@@ -14,12 +14,24 @@
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;
2224
25
+ private UUID uuid = UUID.randomUUID();
26
+
27
+ // TEMPORARY for mocap undo. No need to be transient.
28
+ mocap.reader.BVHReader.BVHResult savebvh;
29
+ Object3D saveskeleton;
30
+ //
31
+
32
+ byte[] versions[] = new byte[100][];
33
+ int versionindex = -1;
34
+
2335 ScriptNode scriptnode;
2436
2537 void InitOthers()
....@@ -100,64 +112,173 @@
100112
101113 // transient boolean reduced; // for morph reduction
102114
103
-transient com.bulletphysics.linearmath.Transform cache; // for fast merge
104
-transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
115
+ transient com.bulletphysics.linearmath.Transform cache; // for fast merge
116
+ transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
105117
106
-transient Object3D transientsupport; // for cloning
107
-transient boolean transientlink2master;
118
+ transient Object3D transientsupport; // for cloning
119
+ transient boolean transientlink2master;
108120
109
-void SaveSupports()
110
-{
111
- if (blockloop)
112
- return;
113
-
114
- transientsupport = support;
115
- transientlink2master = link2master;
116
-
117
- support = null;
118
- link2master = false;
119
-
120
- if (bRep != null)
121
+ void SaveSupports()
121122 {
122
- bRep.SaveSupports();
123
+ if (blockloop)
124
+ return;
125
+
126
+ transientsupport = support;
127
+ transientlink2master = link2master;
128
+
129
+ support = null;
130
+ link2master = false;
131
+
132
+ if (bRep != null)
133
+ {
134
+ bRep.SaveSupports();
135
+ }
136
+
137
+ for (int i = 0; i < Size(); i++)
138
+ {
139
+ Object3D child = (Object3D) get(i);
140
+ if (child == null)
141
+ continue;
142
+ blockloop = true;
143
+ child.SaveSupports();
144
+ blockloop = false;
145
+ }
123146 }
124
-
125
- for (int i = 0; i < Size(); i++)
147
+
148
+ void RestoreSupports()
126149 {
127
- Object3D child = (Object3D) get(i);
128
- if (child == null)
129
- continue;
150
+ if (blockloop)
151
+ return;
152
+
153
+ support = transientsupport;
154
+ link2master = transientlink2master;
155
+ transientsupport = null;
156
+ transientlink2master = false;
157
+
158
+ if (bRep != null)
159
+ {
160
+ bRep.RestoreSupports();
161
+ }
162
+
163
+ for (int i = 0; i < Size(); i++)
164
+ {
165
+ Object3D child = (Object3D) get(i);
166
+ if (child == null)
167
+ continue;
168
+ blockloop = true;
169
+ child.RestoreSupports();
170
+ blockloop = false;
171
+ }
172
+ }
173
+
174
+ void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
175
+ {
176
+ Object3D o;
177
+
178
+ if (hashtable.containsKey(GetUUID()))
179
+ {
180
+ o = hashtable.get(GetUUID());
181
+
182
+ Grafreed.Assert(this.bRep == o.bRep);
183
+ //if (this.bRep != null)
184
+ // assert(this.bRep.support == o.transientrep);
185
+ if (this.support != null)
186
+ assert(this.support.bRep == o.transientrep);
187
+ }
188
+ else
189
+ {
190
+ o = new Object3D("copy of " + this.name);
191
+
192
+ hashtable.put(GetUUID(), o);
193
+ }
194
+
195
+ if (!blockloop)
196
+ {
197
+ blockloop = true;
198
+
199
+ for (int i=0; i<Size(); i++)
200
+ {
201
+ get(i).ExtractBigData(hashtable);
202
+ }
203
+
204
+ blockloop = false;
205
+ }
206
+
207
+ ExtractBigData(o);
208
+ }
209
+
210
+ void ExtractBigData(Object3D o)
211
+ {
212
+ if (o.bRep != null)
213
+ Grafreed.Assert(o.bRep == this.bRep);
214
+
215
+ o.bRep = this.bRep;
216
+// July 2019 if (this.bRep != null)
217
+// {
218
+// o.transientrep = this.bRep.support;
219
+// o.bRep.support = null;
220
+// }
221
+ o.selection = this.selection;
222
+
223
+ if (this.support != null)
224
+ {
225
+ if (o.transientrep != null)
226
+ Grafreed.Assert(o.transientrep == this.support.bRep);
227
+
228
+ o.transientrep = this.support.bRep;
229
+ this.support.bRep = null;
230
+ }
231
+
232
+ // o.support = this.support;
233
+ // o.fileparent = this.fileparent;
234
+ // if (this.bRep != null)
235
+ // o.bRep = this.bRep.support;
236
+
237
+ this.bRep = null;
238
+ // if (this.bRep != null)
239
+ // this.bRep.support = null;
240
+ // this.support = null;
241
+ // this.fileparent = null;
242
+ }
243
+
244
+ void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
245
+ {
246
+ if (!hashtable.containsKey(GetUUID()))
247
+ return;
248
+
249
+ Object3D o = hashtable.get(GetUUID());
250
+
251
+ RestoreBigData(o);
252
+
253
+ if (blockloop)
254
+ return;
255
+
130256 blockloop = true;
131
- child.SaveSupports();
257
+
258
+ //hashtable.remove(GetUUID());
259
+
260
+ for (int i=0; i<Size(); i++)
261
+ {
262
+ get(i).RestoreBigData(hashtable);
263
+ }
264
+
132265 blockloop = false;
133266 }
134
-}
135267
136
-void RestoreSupports()
137
-{
138
- if (blockloop)
139
- return;
140
-
141
- support = transientsupport;
142
- link2master = transientlink2master;
143
- transientsupport = null;
144
- transientlink2master = false;
145
-
146
- if (bRep != null)
268
+ void RestoreBigData(Object3D o)
147269 {
148
- bRep.RestoreSupports();
270
+ this.bRep = o.bRep;
271
+ if (this.support != null && o.transientrep != null)
272
+ {
273
+ this.support.bRep = o.transientrep;
274
+ }
275
+
276
+ this.selection = o.selection;
277
+// July 2019 if (this.bRep != null)
278
+// this.bRep.support = o.transientrep;
279
+ // this.support = o.support;
280
+ // this.fileparent = o.fileparent;
149281 }
150
-
151
- for (int i = 0; i < Size(); i++)
152
- {
153
- Object3D child = (Object3D) get(i);
154
- if (child == null)
155
- continue;
156
- blockloop = true;
157
- child.RestoreSupports();
158
- blockloop = false;
159
- }
160
-}
161282
162283 // MOCAP SUPPORT
163284 double tx,ty,tz,rx,ry,rz;
....@@ -482,12 +603,14 @@
482603 toParent = LA.newMatrix();
483604 fromParent = LA.newMatrix();
484605 }
606
+
485607 if (toParentMarked == null)
486608 {
487609 if (maxcount != 1)
488610 {
489611 new Exception().printStackTrace();
490612 }
613
+
491614 toParentMarked = LA.newMatrix();
492615 fromParentMarked = LA.newMatrix();
493616 }
....@@ -798,7 +921,7 @@
798921
799922 if (marked && Globals.isLIVE() && live &&
800923 //TEMP21aug2018
801
- (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
924
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
802925 currentframe != Globals.framecount)
803926 {
804927 currentframe = Globals.framecount;
....@@ -810,7 +933,8 @@
810933
811934 boolean changedir = random && Math.random() < 0.01; // && !link2master;
812935
813
- if (transformcount*factor > maxcount || (step == 1 && changedir))
936
+ if (transformcount*factor >= maxcount && (rewind || random) ||
937
+ (step == 1 && changedir))
814938 {
815939 countdown = 1;
816940 delay = speedup?8:1;
....@@ -882,6 +1006,7 @@
8821006 if (material == null || material.multiply)
8831007 return true;
8841008
1009
+ // Transparent objects are dynamic because we have to sort the triangles.
8851010 return material.opacity > 0.99;
8861011 }
8871012
....@@ -1282,6 +1407,7 @@
12821407 toParent = LA.newMatrix();
12831408 fromParent = LA.newMatrix();
12841409 }
1410
+
12851411 LA.matCopy(other.toParent, toParent);
12861412 LA.matCopy(other.fromParent, fromParent);
12871413
....@@ -2303,6 +2429,10 @@
23032429 }
23042430 */
23052431 }
2432
+ else
2433
+ {
2434
+ //((ObjEditor)editWindow).SetupUI2(null);
2435
+ }
23062436 }
23072437
23082438 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -2344,6 +2474,14 @@
23442474 {
23452475 editWindow.refreshContents();
23462476 }
2477
+ else
2478
+ {
2479
+ if (manipWindow != null)
2480
+ {
2481
+ manipWindow.refreshContents();
2482
+ }
2483
+ }
2484
+
23472485 //if (parent != null)
23482486 //parent.refreshEditWindow();
23492487 }
....@@ -2628,6 +2766,18 @@
26282766 //Touch();
26292767 }
26302768
2769
+ void GenNormalsMeshS()
2770
+ {
2771
+ selection.GenNormalsMesh();
2772
+// for (int i=0; i<selection.size(); i++)
2773
+// {
2774
+// Object3D selectee = (Object3D) selection.elementAt(i);
2775
+// selectee.GenNormals(crease);
2776
+// }
2777
+
2778
+ //Touch();
2779
+ }
2780
+
26312781 void ClearColorsS()
26322782 {
26332783 selection.ClearColors();
....@@ -2759,6 +2909,24 @@
27592909 if (child == null)
27602910 continue;
27612911 child.GenNormals(crease);
2912
+// Children().release(i);
2913
+ }
2914
+ blockloop = false;
2915
+ }
2916
+
2917
+ void GenNormalsMesh()
2918
+ {
2919
+ if (blockloop)
2920
+ return;
2921
+
2922
+ blockloop = true;
2923
+ GenNormalsMesh0();
2924
+ for (int i = 0; i < Children().Size(); i++)
2925
+ {
2926
+ Object3D child = (Object3D) Children().get(i); // reserve(i);
2927
+ if (child == null)
2928
+ continue;
2929
+ child.GenNormalsMesh();
27622930 // Children().release(i);
27632931 }
27642932 blockloop = false;
....@@ -2927,6 +3095,15 @@
29273095 if (bRep != null)
29283096 {
29293097 bRep.GenerateNormals(crease);
3098
+ Touch();
3099
+ }
3100
+ }
3101
+
3102
+ void GenNormalsMesh0()
3103
+ {
3104
+ if (bRep != null)
3105
+ {
3106
+ bRep.GenerateNormalsMesh();
29303107 Touch();
29313108 }
29323109 }
....@@ -3381,7 +3558,8 @@
33813558 if (blockloop)
33823559 return;
33833560
3384
- if (marked || (bRep != null && material != null)) // borderline...
3561
+ if (//marked || // does not make sense
3562
+ (bRep != null || material != null)) // borderline...
33853563 live = h;
33863564
33873565 for (int i = 0; i < Size(); i++)
....@@ -3402,7 +3580,8 @@
34023580 return;
34033581
34043582 //if (bRep != null)
3405
- if (marked || (bRep != null && material != null)) // borderline...
3583
+ if (//marked || // does not make sense
3584
+ (bRep != null || material != null)) // borderline...
34063585 link2master = h;
34073586
34083587 for (int i = 0; i < Size(); i++)
....@@ -3422,7 +3601,8 @@
34223601 if (blockloop)
34233602 return;
34243603
3425
- if (marked || (bRep != null && material != null)) // borderline...
3604
+ if (//marked || // does not make sense
3605
+ (bRep != null || material != null)) // borderline...
34263606 hide = h;
34273607
34283608 for (int i = 0; i < Size(); i++)
....@@ -3442,7 +3622,7 @@
34423622 if (blockloop)
34433623 return;
34443624
3445
- if (bRep != null && material != null) // borderline...
3625
+ if (bRep != null || material != null) // borderline...
34463626 marked = h;
34473627
34483628 for (int i = 0; i < Size(); i++)
....@@ -3452,6 +3632,46 @@
34523632 continue;
34533633 blockloop = true;
34543634 child.MarkLeaves(h);
3635
+ blockloop = false;
3636
+ // release(i);
3637
+ }
3638
+ }
3639
+
3640
+ void RewindLeaves(boolean h)
3641
+ {
3642
+ if (blockloop)
3643
+ return;
3644
+
3645
+ if (bRep != null || material != null) // borderline...
3646
+ rewind = h;
3647
+
3648
+ for (int i = 0; i < Size(); i++)
3649
+ {
3650
+ Object3D child = (Object3D) get(i); // reserve(i);
3651
+ if (child == null)
3652
+ continue;
3653
+ blockloop = true;
3654
+ child.RewindLeaves(h);
3655
+ blockloop = false;
3656
+ // release(i);
3657
+ }
3658
+ }
3659
+
3660
+ void RandomLeaves(boolean h)
3661
+ {
3662
+ if (blockloop)
3663
+ return;
3664
+
3665
+ if (bRep != null || material != null) // borderline...
3666
+ random = h;
3667
+
3668
+ for (int i = 0; i < Size(); i++)
3669
+ {
3670
+ Object3D child = (Object3D) get(i); // reserve(i);
3671
+ if (child == null)
3672
+ continue;
3673
+ blockloop = true;
3674
+ child.RandomLeaves(h);
34553675 blockloop = false;
34563676 // release(i);
34573677 }
....@@ -4229,6 +4449,55 @@
42294449 }
42304450 }
42314451
4452
+ void RepairSOV()
4453
+ {
4454
+ if (blockloop)
4455
+ return;
4456
+
4457
+ String texname = this.GetPigmentTexture();
4458
+
4459
+ if (texname.startsWith("sov"))
4460
+ {
4461
+ String[] s = texname.split("/");
4462
+
4463
+ String[] sname = s[1].split("Color.pn");
4464
+
4465
+ texname = sname[0];
4466
+
4467
+ if (sname.length > 1)
4468
+ {
4469
+ texname += "Color.jpg";
4470
+ }
4471
+
4472
+ this.SetPigmentTexture("sov/" + texname);
4473
+ }
4474
+
4475
+ texname = this.GetBumpTexture();
4476
+
4477
+ if (texname.startsWith("sov"))
4478
+ {
4479
+ String[] s = texname.split("/");
4480
+
4481
+ String[] sname = s[1].split("Bump.pn");
4482
+
4483
+ texname = sname[0];
4484
+
4485
+ if (sname.length > 1)
4486
+ {
4487
+ texname += "Bump.jpg";
4488
+ }
4489
+
4490
+ this.SetBumpTexture("sov/" + texname);
4491
+ }
4492
+
4493
+ for (int i=0; i<Size(); i++)
4494
+ {
4495
+ blockloop = true;
4496
+ get(i).RepairSOV();
4497
+ blockloop = false;
4498
+ }
4499
+ }
4500
+
42324501 void RepairTexture()
42334502 {
42344503 if (this instanceof FileObject || blockloop)
....@@ -4743,6 +5012,14 @@
47435012 }
47445013 }
47455014
5015
+ ObjEditor GetWindow()
5016
+ {
5017
+ if (editWindow != null)
5018
+ return editWindow;
5019
+
5020
+ return manipWindow;
5021
+ }
5022
+
47465023 cTreePath Select(int indexcount, boolean deselect)
47475024 {
47485025 if (hide || dontselect)
....@@ -4779,10 +5056,11 @@
47795056 if (leaf != null)
47805057 {
47815058 cTreePath tp = new cTreePath(this, leaf);
4782
- if (editWindow != null)
5059
+ ObjEditor window = GetWindow();
5060
+ if (window != null)
47835061 {
47845062 //System.out.println("editWindow = " + editWindow + " vs " + this);
4785
- editWindow.Select(tp, deselect, true);
5063
+ window.Select(tp, deselect, true);
47865064 }
47875065
47885066 return tp;
....@@ -4799,6 +5077,7 @@
47995077
48005078 if (child == null)
48015079 continue;
5080
+
48025081 if (child.HasTransparency() && child.size() != 0)
48035082 {
48045083 cTreePath leaf = child.Select(indexcount, deselect);
....@@ -4808,9 +5087,10 @@
48085087 if (leaf != null)
48095088 {
48105089 cTreePath tp = new cTreePath(this, leaf);
4811
- if (editWindow != null)
5090
+ ObjEditor window = GetWindow();
5091
+ if (window != null)
48125092 {
4813
- editWindow.Select(tp, deselect, true);
5093
+ window.Select(tp, deselect, true);
48145094 }
48155095
48165096 return tp;
....@@ -5371,6 +5651,43 @@
53715651 }
53725652 }
53735653
5654
+ UUID GetUUID()
5655
+ {
5656
+ if (uuid == null)
5657
+ {
5658
+ // Serial
5659
+ uuid = UUID.randomUUID();
5660
+ }
5661
+
5662
+ return uuid;
5663
+ }
5664
+
5665
+ Object3D GetObject(UUID uid)
5666
+ {
5667
+ if (blockloop)
5668
+ return null;
5669
+
5670
+ if (GetUUID().equals(uid))
5671
+ return this;
5672
+
5673
+ int nb = Size();
5674
+ for (int i = 0; i < nb; i++)
5675
+ {
5676
+ Object3D child = (Object3D) get(i);
5677
+
5678
+ if (child == null)
5679
+ continue;
5680
+
5681
+ blockloop = true;
5682
+ Object3D obj = child.GetObject(uid);
5683
+ blockloop = false;
5684
+ if (obj != null)
5685
+ return obj;
5686
+ }
5687
+
5688
+ return null;
5689
+ }
5690
+
53745691 void SetBumpTexture(String tex)
53755692 {
53765693 if (GetTextures() == null)
....@@ -5415,12 +5732,23 @@
54155732 boolean NeedSupport()
54165733 {
54175734 return
5418
- CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
5735
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
54195736 // PROBLEM with CROWD!!
54205737 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
54215738 }
54225739
54235740 static boolean DEBUG_SELECTION = false;
5741
+
5742
+ boolean IsLive()
5743
+ {
5744
+ if (live)
5745
+ return true;
5746
+
5747
+ if (parent == null)
5748
+ return false;
5749
+
5750
+ return parent.IsLive();
5751
+ }
54245752
54255753 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
54265754 {
....@@ -5483,7 +5811,7 @@
54835811 support = support;
54845812
54855813 //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5486
- boolean usecalllists = false; // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5814
+ boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
54875815
54885816 if (!usecalllists && bRep != null && bRep.displaylist > 0)
54895817 {
....@@ -5503,10 +5831,12 @@
55035831 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
55045832
55055833 if (!selectmode && //display.DrawMode() != display.SELECTION &&
5506
- (touched || (bRep != null && bRep.displaylist <= 0)))
5834
+ //(touched || (bRep != null && bRep.displaylist <= 0)))
5835
+ (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0)))
55075836 {
55085837 Globals.lighttouched = true;
55095838 } // all panes...
5839
+
55105840 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
55115841 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
55125842 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5634,6 +5964,7 @@
56345964 if (GetBRep() != null)
56355965 {
56365966 display.NextIndex();
5967
+
56375968 // vertex color conflict : gl.glCallList(list);
56385969 DrawNode(display, root, selected);
56395970 if (this instanceof BezierPatch)
....@@ -5674,16 +6005,27 @@
56746005 tex = GetTextures();
56756006 }
56766007
5677
- boolean failed = false;
6008
+ boolean failedPigment = false;
6009
+ boolean failedBump = false;
56786010
56796011 try
56806012 {
5681
- display.BindTextures(tex, texres);
6013
+ display.BindPigmentTexture(tex, texres);
56826014 }
56836015 catch (Exception e)
56846016 {
56856017 System.err.println("FAILED: " + this);
5686
- failed = true;
6018
+ failedPigment = true;
6019
+ }
6020
+
6021
+ try
6022
+ {
6023
+ display.BindBumpTexture(tex, texres);
6024
+ }
6025
+ catch (Exception e)
6026
+ {
6027
+ //System.err.println("FAILED: " + this);
6028
+ failedBump = true;
56876029 }
56886030
56896031 if (!compiled)
....@@ -5706,8 +6048,11 @@
57066048 }
57076049 }
57086050
5709
- if (!failed)
5710
- display.ReleaseTextures(tex);
6051
+ if (!failedBump)
6052
+ display.ReleaseBumpTexture(tex);
6053
+
6054
+ if (!failedPigment)
6055
+ display.ReleasePigmentTexture(tex);
57116056
57126057 display.PopMaterial(this, selected);
57136058 }
....@@ -6080,6 +6425,11 @@
60806425 // dec 2012
60816426 new Exception().printStackTrace();
60826427 return;
6428
+ }
6429
+
6430
+ if (dontselect)
6431
+ {
6432
+ //bRep.GenerateNormalsMINE();
60836433 }
60846434
60856435 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -6932,7 +7282,7 @@
69327282 spot.translate(32, 32);
69337283 spotw = spot.x + spot.width;
69347284 spoth = spot.y + spot.height;
6935
- info.g.setColor(Color.blue);
7285
+ info.g.setColor(Color.cyan);
69367286 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
69377287 // if (CameraPane.Xmin > spot.x)
69387288 // {
....@@ -6950,11 +7300,12 @@
69507300 // {
69517301 // CameraPane.Ymax = spoth;
69527302 // }
6953
- // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
6954
- //info.g.drawLine(spotw, spoth, spotw - 15, spoth);
7303
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
7304
+ //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
69557305 spot.translate(0, -32);
6956
- info.g.setColor(Color.green);
7306
+ info.g.setColor(Color.yellow);
69577307 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7308
+ info.g.setColor(Color.green);
69587309 // if (CameraPane.Xmin > spot.x)
69597310 // {
69607311 // CameraPane.Xmin = spot.x;
....@@ -6971,8 +7322,8 @@
69717322 // {
69727323 // CameraPane.Ymax = spoth;
69737324 // }
6974
- info.g.drawArc(boundary.x, boundary.y,
6975
- boundary.width, boundary.height, 0, 360);
7325
+ info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY,
7326
+ (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360);
69767327 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
69777328 // if (CameraPane.Xmin > boundary.x)
69787329 // {
....@@ -7272,19 +7623,20 @@
72727623 switch (info.pane.RenderCamera().viewCode)
72737624 {
72747625 case 3: // '\001'
7275
- if (modified)
7626
+ if (modified || opposite)
72767627 {
72777628 //LA.matScale(toParent, 1, hScale, vScale);
72787629 LA.matScale(toParent, totalScale, 1, 1);
72797630 } // vScale, 1);
72807631 else
72817632 {
7633
+ // EXCEPTION!
72827634 LA.matScale(toParent, totalScale, totalScale, totalScale);
72837635 } // vScale, 1);
72847636 break;
72857637
72867638 case 2: // '\002'
7287
- if (modified)
7639
+ if (modified || opposite)
72887640 {
72897641 //LA.matScale(toParent, hScale, 1, vScale);
72907642 LA.matScale(toParent, 1, totalScale, 1);
....@@ -7295,7 +7647,7 @@
72957647 break;
72967648
72977649 case 1: // '\003'
7298
- if (modified)
7650
+ if (modified || opposite)
72997651 {
73007652 //LA.matScale(toParent, hScale, vScale, 1);
73017653 LA.matScale(toParent, 1, 1, totalScale);
....@@ -7515,6 +7867,10 @@
75157867 editWindow = null;
75167868 } // ?
75177869 }
7870
+ else
7871
+ {
7872
+ //editWindow.closeUI();
7873
+ }
75187874 }
75197875
75207876 boolean root; // patch for edit windows
....@@ -7526,7 +7882,7 @@
75267882 /*transient*/ cVector2[] projectedVertices = new cVector2[0];
75277883
75287884 Object3D /*Composite*/ parent;
7529
- Object3D /*Composite*/ fileparent;
7885
+ Object3D /*Composite*/ fileparent; // In the case of FileObject
75307886
75317887 double[][] toParent; // dynamic matrix
75327888 double[][] fromParent;
....@@ -7672,6 +8028,10 @@
76728028 }
76738029
76748030 transient ObjEditor editWindow;
8031
+ transient ObjEditor manipWindow;
8032
+
8033
+ transient boolean pinned;
8034
+
76758035 transient ObjectUI objectUI;
76768036 public static int povDepth = 0;
76778037 private static cVector tbMin = new cVector();