.. | .. |
---|
24 | 24 | |
---|
25 | 25 | private UUID uuid = UUID.randomUUID(); |
---|
26 | 26 | |
---|
27 | | - // TEMPORARY for mocap undo |
---|
28 | | - mocap.reader.BVHReader.BVHResult bvh; |
---|
29 | | - Object3D skeleton; |
---|
| 27 | + // TEMPORARY for mocap undo. No need to be transient. |
---|
| 28 | + mocap.reader.BVHReader.BVHResult savebvh; |
---|
| 29 | + Object3D saveskeleton; |
---|
30 | 30 | // |
---|
31 | 31 | |
---|
| 32 | + byte[] versions[] = new byte[100][]; |
---|
| 33 | + int versionindex = -1; |
---|
| 34 | + |
---|
32 | 35 | ScriptNode scriptnode; |
---|
33 | 36 | |
---|
34 | 37 | void InitOthers() |
---|
.. | .. |
---|
170 | 173 | |
---|
171 | 174 | void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
172 | 175 | { |
---|
| 176 | + Object3D o; |
---|
| 177 | + |
---|
173 | 178 | if (hashtable.containsKey(GetUUID())) |
---|
174 | 179 | { |
---|
175 | | - Object3D o = hashtable.get(GetUUID()); |
---|
| 180 | + o = hashtable.get(GetUUID()); |
---|
176 | 181 | |
---|
177 | | - assert(this.bRep == o.bRep); |
---|
178 | | - if (this.bRep != null) |
---|
179 | | - assert(this.bRep.support == o.transientrep); |
---|
| 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); |
---|
180 | 191 | |
---|
181 | | - return; |
---|
| 192 | + hashtable.put(GetUUID(), o); |
---|
182 | 193 | } |
---|
183 | 194 | |
---|
184 | | - Object3D o = new Object3D(); |
---|
185 | | - |
---|
186 | | - hashtable.put(GetUUID(), o); |
---|
187 | | - |
---|
188 | | - for (int i=0; i<Size(); i++) |
---|
| 195 | + if (!blockloop) |
---|
189 | 196 | { |
---|
190 | | - get(i).ExtractBigData(hashtable); |
---|
| 197 | + blockloop = true; |
---|
| 198 | + |
---|
| 199 | + for (int i=0; i<Size(); i++) |
---|
| 200 | + { |
---|
| 201 | + get(i).ExtractBigData(hashtable); |
---|
| 202 | + } |
---|
| 203 | + |
---|
| 204 | + blockloop = false; |
---|
191 | 205 | } |
---|
192 | 206 | |
---|
193 | 207 | ExtractBigData(o); |
---|
.. | .. |
---|
195 | 209 | |
---|
196 | 210 | void ExtractBigData(Object3D o) |
---|
197 | 211 | { |
---|
| 212 | + if (o.bRep != null) |
---|
| 213 | + Grafreed.Assert(o.bRep == this.bRep); |
---|
| 214 | + |
---|
198 | 215 | o.bRep = this.bRep; |
---|
199 | | - if (this.bRep != null) |
---|
| 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) |
---|
200 | 224 | { |
---|
201 | | - o.transientrep = this.bRep.support; |
---|
202 | | - o.bRep.support = null; |
---|
| 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; |
---|
203 | 230 | } |
---|
204 | 231 | |
---|
205 | 232 | // o.support = this.support; |
---|
.. | .. |
---|
223 | 250 | |
---|
224 | 251 | RestoreBigData(o); |
---|
225 | 252 | |
---|
226 | | - hashtable.remove(GetUUID()); |
---|
| 253 | + if (blockloop) |
---|
| 254 | + return; |
---|
| 255 | + |
---|
| 256 | + blockloop = true; |
---|
| 257 | + |
---|
| 258 | + //hashtable.remove(GetUUID()); |
---|
227 | 259 | |
---|
228 | 260 | for (int i=0; i<Size(); i++) |
---|
229 | 261 | { |
---|
230 | 262 | get(i).RestoreBigData(hashtable); |
---|
231 | 263 | } |
---|
| 264 | + |
---|
| 265 | + blockloop = false; |
---|
232 | 266 | } |
---|
233 | 267 | |
---|
234 | 268 | void RestoreBigData(Object3D o) |
---|
235 | 269 | { |
---|
236 | 270 | this.bRep = o.bRep; |
---|
237 | | - if (this.bRep != null) |
---|
238 | | - this.bRep.support = o.transientrep; |
---|
| 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; |
---|
239 | 279 | // this.support = o.support; |
---|
240 | 280 | // this.fileparent = o.fileparent; |
---|
241 | 281 | } |
---|
.. | .. |
---|
563 | 603 | toParent = LA.newMatrix(); |
---|
564 | 604 | fromParent = LA.newMatrix(); |
---|
565 | 605 | } |
---|
| 606 | + |
---|
566 | 607 | if (toParentMarked == null) |
---|
567 | 608 | { |
---|
568 | 609 | if (maxcount != 1) |
---|
569 | 610 | { |
---|
570 | 611 | new Exception().printStackTrace(); |
---|
571 | 612 | } |
---|
| 613 | + |
---|
572 | 614 | toParentMarked = LA.newMatrix(); |
---|
573 | 615 | fromParentMarked = LA.newMatrix(); |
---|
574 | 616 | } |
---|
.. | .. |
---|
879 | 921 | |
---|
880 | 922 | if (marked && Globals.isLIVE() && live && |
---|
881 | 923 | //TEMP21aug2018 |
---|
882 | | - (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) && |
---|
| 924 | + (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) && |
---|
883 | 925 | currentframe != Globals.framecount) |
---|
884 | 926 | { |
---|
885 | 927 | currentframe = Globals.framecount; |
---|
.. | .. |
---|
891 | 933 | |
---|
892 | 934 | boolean changedir = random && Math.random() < 0.01; // && !link2master; |
---|
893 | 935 | |
---|
894 | | - if (transformcount*factor > maxcount || (step == 1 && changedir)) |
---|
| 936 | + if (transformcount*factor >= maxcount && (rewind || random) || |
---|
| 937 | + (step == 1 && changedir)) |
---|
895 | 938 | { |
---|
896 | 939 | countdown = 1; |
---|
897 | 940 | delay = speedup?8:1; |
---|
.. | .. |
---|
963 | 1006 | if (material == null || material.multiply) |
---|
964 | 1007 | return true; |
---|
965 | 1008 | |
---|
| 1009 | + // Transparent objects are dynamic because we have to sort the triangles. |
---|
966 | 1010 | return material.opacity > 0.99; |
---|
967 | 1011 | } |
---|
968 | 1012 | |
---|
.. | .. |
---|
1363 | 1407 | toParent = LA.newMatrix(); |
---|
1364 | 1408 | fromParent = LA.newMatrix(); |
---|
1365 | 1409 | } |
---|
| 1410 | + |
---|
1366 | 1411 | LA.matCopy(other.toParent, toParent); |
---|
1367 | 1412 | LA.matCopy(other.fromParent, fromParent); |
---|
1368 | 1413 | |
---|
.. | .. |
---|
2384 | 2429 | } |
---|
2385 | 2430 | */ |
---|
2386 | 2431 | } |
---|
| 2432 | + else |
---|
| 2433 | + { |
---|
| 2434 | + //((ObjEditor)editWindow).SetupUI2(null); |
---|
| 2435 | + } |
---|
2387 | 2436 | } |
---|
2388 | 2437 | |
---|
2389 | 2438 | void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root) |
---|
.. | .. |
---|
2425 | 2474 | { |
---|
2426 | 2475 | editWindow.refreshContents(); |
---|
2427 | 2476 | } |
---|
| 2477 | + else |
---|
| 2478 | + { |
---|
| 2479 | + if (manipWindow != null) |
---|
| 2480 | + { |
---|
| 2481 | + manipWindow.refreshContents(); |
---|
| 2482 | + } |
---|
| 2483 | + } |
---|
| 2484 | + |
---|
2428 | 2485 | //if (parent != null) |
---|
2429 | 2486 | //parent.refreshEditWindow(); |
---|
2430 | 2487 | } |
---|
.. | .. |
---|
3501 | 3558 | if (blockloop) |
---|
3502 | 3559 | return; |
---|
3503 | 3560 | |
---|
3504 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3561 | + if (//marked || // does not make sense |
---|
| 3562 | + (bRep != null || material != null)) // borderline... |
---|
3505 | 3563 | live = h; |
---|
3506 | 3564 | |
---|
3507 | 3565 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3522 | 3580 | return; |
---|
3523 | 3581 | |
---|
3524 | 3582 | //if (bRep != null) |
---|
3525 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3583 | + if (//marked || // does not make sense |
---|
| 3584 | + (bRep != null || material != null)) // borderline... |
---|
3526 | 3585 | link2master = h; |
---|
3527 | 3586 | |
---|
3528 | 3587 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3542 | 3601 | if (blockloop) |
---|
3543 | 3602 | return; |
---|
3544 | 3603 | |
---|
3545 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3604 | + if (//marked || // does not make sense |
---|
| 3605 | + (bRep != null || material != null)) // borderline... |
---|
3546 | 3606 | hide = h; |
---|
3547 | 3607 | |
---|
3548 | 3608 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3562 | 3622 | if (blockloop) |
---|
3563 | 3623 | return; |
---|
3564 | 3624 | |
---|
3565 | | - if (bRep != null && material != null) // borderline... |
---|
| 3625 | + if (bRep != null || material != null) // borderline... |
---|
3566 | 3626 | marked = h; |
---|
3567 | 3627 | |
---|
3568 | 3628 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3572 | 3632 | continue; |
---|
3573 | 3633 | blockloop = true; |
---|
3574 | 3634 | 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); |
---|
3575 | 3675 | blockloop = false; |
---|
3576 | 3676 | // release(i); |
---|
3577 | 3677 | } |
---|
.. | .. |
---|
4349 | 4449 | } |
---|
4350 | 4450 | } |
---|
4351 | 4451 | |
---|
| 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 | + |
---|
4352 | 4501 | void RepairTexture() |
---|
4353 | 4502 | { |
---|
4354 | 4503 | if (this instanceof FileObject || blockloop) |
---|
.. | .. |
---|
4863 | 5012 | } |
---|
4864 | 5013 | } |
---|
4865 | 5014 | |
---|
| 5015 | + ObjEditor GetWindow() |
---|
| 5016 | + { |
---|
| 5017 | + if (editWindow != null) |
---|
| 5018 | + return editWindow; |
---|
| 5019 | + |
---|
| 5020 | + return manipWindow; |
---|
| 5021 | + } |
---|
| 5022 | + |
---|
4866 | 5023 | cTreePath Select(int indexcount, boolean deselect) |
---|
4867 | 5024 | { |
---|
4868 | 5025 | if (hide || dontselect) |
---|
.. | .. |
---|
4899 | 5056 | if (leaf != null) |
---|
4900 | 5057 | { |
---|
4901 | 5058 | cTreePath tp = new cTreePath(this, leaf); |
---|
4902 | | - if (editWindow != null) |
---|
| 5059 | + ObjEditor window = GetWindow(); |
---|
| 5060 | + if (window != null) |
---|
4903 | 5061 | { |
---|
4904 | 5062 | //System.out.println("editWindow = " + editWindow + " vs " + this); |
---|
4905 | | - editWindow.Select(tp, deselect, true); |
---|
| 5063 | + window.Select(tp, deselect, true); |
---|
4906 | 5064 | } |
---|
4907 | 5065 | |
---|
4908 | 5066 | return tp; |
---|
.. | .. |
---|
4919 | 5077 | |
---|
4920 | 5078 | if (child == null) |
---|
4921 | 5079 | continue; |
---|
| 5080 | + |
---|
4922 | 5081 | if (child.HasTransparency() && child.size() != 0) |
---|
4923 | 5082 | { |
---|
4924 | 5083 | cTreePath leaf = child.Select(indexcount, deselect); |
---|
.. | .. |
---|
4928 | 5087 | if (leaf != null) |
---|
4929 | 5088 | { |
---|
4930 | 5089 | cTreePath tp = new cTreePath(this, leaf); |
---|
4931 | | - if (editWindow != null) |
---|
| 5090 | + ObjEditor window = GetWindow(); |
---|
| 5091 | + if (window != null) |
---|
4932 | 5092 | { |
---|
4933 | | - editWindow.Select(tp, deselect, true); |
---|
| 5093 | + window.Select(tp, deselect, true); |
---|
4934 | 5094 | } |
---|
4935 | 5095 | |
---|
4936 | 5096 | return tp; |
---|
.. | .. |
---|
5572 | 5732 | boolean NeedSupport() |
---|
5573 | 5733 | { |
---|
5574 | 5734 | return |
---|
5575 | | - CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null |
---|
| 5735 | + CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null |
---|
5576 | 5736 | // PROBLEM with CROWD!! |
---|
5577 | 5737 | && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD); |
---|
5578 | 5738 | } |
---|
5579 | 5739 | |
---|
5580 | 5740 | 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 | + } |
---|
5581 | 5752 | |
---|
5582 | 5753 | void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked) |
---|
5583 | 5754 | { |
---|
.. | .. |
---|
5640 | 5811 | support = support; |
---|
5641 | 5812 | |
---|
5642 | 5813 | //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
5643 | | - 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); |
---|
5644 | 5815 | |
---|
5645 | 5816 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5646 | 5817 | { |
---|
.. | .. |
---|
5660 | 5831 | boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection(); |
---|
5661 | 5832 | |
---|
5662 | 5833 | if (!selectmode && //display.DrawMode() != display.SELECTION && |
---|
5663 | | - (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))) |
---|
5664 | 5836 | { |
---|
5665 | 5837 | Globals.lighttouched = true; |
---|
5666 | 5838 | } // all panes... |
---|
| 5839 | + |
---|
5667 | 5840 | //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW && |
---|
5668 | 5841 | if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW && |
---|
5669 | 5842 | (touched || (bRep != null && bRep.displaylist <= 0))) |
---|
.. | .. |
---|
5791 | 5964 | if (GetBRep() != null) |
---|
5792 | 5965 | { |
---|
5793 | 5966 | display.NextIndex(); |
---|
| 5967 | + |
---|
5794 | 5968 | // vertex color conflict : gl.glCallList(list); |
---|
5795 | 5969 | DrawNode(display, root, selected); |
---|
5796 | 5970 | if (this instanceof BezierPatch) |
---|
.. | .. |
---|
5831 | 6005 | tex = GetTextures(); |
---|
5832 | 6006 | } |
---|
5833 | 6007 | |
---|
5834 | | - boolean failed = false; |
---|
| 6008 | + boolean failedPigment = false; |
---|
| 6009 | + boolean failedBump = false; |
---|
5835 | 6010 | |
---|
5836 | 6011 | try |
---|
5837 | 6012 | { |
---|
5838 | | - display.BindTextures(tex, texres); |
---|
| 6013 | + display.BindPigmentTexture(tex, texres); |
---|
5839 | 6014 | } |
---|
5840 | 6015 | catch (Exception e) |
---|
5841 | 6016 | { |
---|
5842 | 6017 | System.err.println("FAILED: " + this); |
---|
5843 | | - 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; |
---|
5844 | 6029 | } |
---|
5845 | 6030 | |
---|
5846 | 6031 | if (!compiled) |
---|
.. | .. |
---|
5863 | 6048 | } |
---|
5864 | 6049 | } |
---|
5865 | 6050 | |
---|
5866 | | - if (!failed) |
---|
5867 | | - display.ReleaseTextures(tex); |
---|
| 6051 | + if (!failedBump) |
---|
| 6052 | + display.ReleaseBumpTexture(tex); |
---|
| 6053 | + |
---|
| 6054 | + if (!failedPigment) |
---|
| 6055 | + display.ReleasePigmentTexture(tex); |
---|
5868 | 6056 | |
---|
5869 | 6057 | display.PopMaterial(this, selected); |
---|
5870 | 6058 | } |
---|
.. | .. |
---|
6237 | 6425 | // dec 2012 |
---|
6238 | 6426 | new Exception().printStackTrace(); |
---|
6239 | 6427 | return; |
---|
| 6428 | + } |
---|
| 6429 | + |
---|
| 6430 | + if (dontselect) |
---|
| 6431 | + { |
---|
| 6432 | + //bRep.GenerateNormalsMINE(); |
---|
6240 | 6433 | } |
---|
6241 | 6434 | |
---|
6242 | 6435 | display.DrawGeometry(bRep, flipV, selectmode); |
---|
.. | .. |
---|
7089 | 7282 | spot.translate(32, 32); |
---|
7090 | 7283 | spotw = spot.x + spot.width; |
---|
7091 | 7284 | spoth = spot.y + spot.height; |
---|
7092 | | - info.g.setColor(Color.blue); |
---|
| 7285 | + info.g.setColor(Color.cyan); |
---|
7093 | 7286 | info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7094 | 7287 | // if (CameraPane.Xmin > spot.x) |
---|
7095 | 7288 | // { |
---|
.. | .. |
---|
7107 | 7300 | // { |
---|
7108 | 7301 | // CameraPane.Ymax = spoth; |
---|
7109 | 7302 | // } |
---|
7110 | | - // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15); |
---|
7111 | | - //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 |
---|
7112 | 7305 | spot.translate(0, -32); |
---|
7113 | | - info.g.setColor(Color.green); |
---|
| 7306 | + info.g.setColor(Color.yellow); |
---|
7114 | 7307 | info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
| 7308 | + info.g.setColor(Color.green); |
---|
7115 | 7309 | // if (CameraPane.Xmin > spot.x) |
---|
7116 | 7310 | // { |
---|
7117 | 7311 | // CameraPane.Xmin = spot.x; |
---|
.. | .. |
---|
7128 | 7322 | // { |
---|
7129 | 7323 | // CameraPane.Ymax = spoth; |
---|
7130 | 7324 | // } |
---|
7131 | | - info.g.drawArc(boundary.x, boundary.y, |
---|
7132 | | - 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); |
---|
7133 | 7327 | //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360); |
---|
7134 | 7328 | // if (CameraPane.Xmin > boundary.x) |
---|
7135 | 7329 | // { |
---|
.. | .. |
---|
7429 | 7623 | switch (info.pane.RenderCamera().viewCode) |
---|
7430 | 7624 | { |
---|
7431 | 7625 | case 3: // '\001' |
---|
7432 | | - if (modified) |
---|
| 7626 | + if (modified || opposite) |
---|
7433 | 7627 | { |
---|
7434 | 7628 | //LA.matScale(toParent, 1, hScale, vScale); |
---|
7435 | 7629 | LA.matScale(toParent, totalScale, 1, 1); |
---|
7436 | 7630 | } // vScale, 1); |
---|
7437 | 7631 | else |
---|
7438 | 7632 | { |
---|
| 7633 | + // EXCEPTION! |
---|
7439 | 7634 | LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
7440 | 7635 | } // vScale, 1); |
---|
7441 | 7636 | break; |
---|
7442 | 7637 | |
---|
7443 | 7638 | case 2: // '\002' |
---|
7444 | | - if (modified) |
---|
| 7639 | + if (modified || opposite) |
---|
7445 | 7640 | { |
---|
7446 | 7641 | //LA.matScale(toParent, hScale, 1, vScale); |
---|
7447 | 7642 | LA.matScale(toParent, 1, totalScale, 1); |
---|
.. | .. |
---|
7452 | 7647 | break; |
---|
7453 | 7648 | |
---|
7454 | 7649 | case 1: // '\003' |
---|
7455 | | - if (modified) |
---|
| 7650 | + if (modified || opposite) |
---|
7456 | 7651 | { |
---|
7457 | 7652 | //LA.matScale(toParent, hScale, vScale, 1); |
---|
7458 | 7653 | LA.matScale(toParent, 1, 1, totalScale); |
---|
.. | .. |
---|
7672 | 7867 | editWindow = null; |
---|
7673 | 7868 | } // ? |
---|
7674 | 7869 | } |
---|
| 7870 | + else |
---|
| 7871 | + { |
---|
| 7872 | + //editWindow.closeUI(); |
---|
| 7873 | + } |
---|
7675 | 7874 | } |
---|
7676 | 7875 | |
---|
7677 | 7876 | boolean root; // patch for edit windows |
---|
.. | .. |
---|
7829 | 8028 | } |
---|
7830 | 8029 | |
---|
7831 | 8030 | transient ObjEditor editWindow; |
---|
| 8031 | + transient ObjEditor manipWindow; |
---|
| 8032 | + |
---|
| 8033 | + transient boolean pinned; |
---|
| 8034 | + |
---|
7832 | 8035 | transient ObjectUI objectUI; |
---|
7833 | 8036 | public static int povDepth = 0; |
---|
7834 | 8037 | private static cVector tbMin = new cVector(); |
---|