.. | .. |
---|
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 | 32 | ScriptNode scriptnode; |
---|
.. | .. |
---|
170 | 170 | |
---|
171 | 171 | void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
172 | 172 | { |
---|
| 173 | + Object3D o; |
---|
| 174 | + |
---|
173 | 175 | if (hashtable.containsKey(GetUUID())) |
---|
174 | 176 | { |
---|
175 | | - Object3D o = hashtable.get(GetUUID()); |
---|
| 177 | + o = hashtable.get(GetUUID()); |
---|
176 | 178 | |
---|
177 | | - assert(this.bRep == o.bRep); |
---|
178 | | - if (this.bRep != null) |
---|
179 | | - assert(this.bRep.support == o.transientrep); |
---|
| 179 | + Grafreed.Assert(this.bRep == o.bRep); |
---|
| 180 | + //if (this.bRep != null) |
---|
| 181 | + // assert(this.bRep.support == o.transientrep); |
---|
| 182 | + if (this.support != null) |
---|
| 183 | + assert(this.support.bRep == o.transientrep); |
---|
| 184 | + } |
---|
| 185 | + else |
---|
| 186 | + { |
---|
| 187 | + o = new Object3D("copy of " + this.name); |
---|
180 | 188 | |
---|
181 | | - return; |
---|
| 189 | + hashtable.put(GetUUID(), o); |
---|
182 | 190 | } |
---|
183 | 191 | |
---|
184 | | - Object3D o = new Object3D(); |
---|
185 | | - |
---|
186 | | - hashtable.put(GetUUID(), o); |
---|
187 | | - |
---|
188 | | - for (int i=0; i<Size(); i++) |
---|
| 192 | + if (!blockloop) |
---|
189 | 193 | { |
---|
190 | | - get(i).ExtractBigData(hashtable); |
---|
| 194 | + blockloop = true; |
---|
| 195 | + |
---|
| 196 | + for (int i=0; i<Size(); i++) |
---|
| 197 | + { |
---|
| 198 | + get(i).ExtractBigData(hashtable); |
---|
| 199 | + } |
---|
| 200 | + |
---|
| 201 | + blockloop = false; |
---|
191 | 202 | } |
---|
192 | 203 | |
---|
193 | 204 | ExtractBigData(o); |
---|
.. | .. |
---|
195 | 206 | |
---|
196 | 207 | void ExtractBigData(Object3D o) |
---|
197 | 208 | { |
---|
| 209 | + if (o.bRep != null) |
---|
| 210 | + Grafreed.Assert(o.bRep == this.bRep); |
---|
| 211 | + |
---|
198 | 212 | o.bRep = this.bRep; |
---|
199 | | - if (this.bRep != null) |
---|
| 213 | +// July 2019 if (this.bRep != null) |
---|
| 214 | +// { |
---|
| 215 | +// o.transientrep = this.bRep.support; |
---|
| 216 | +// o.bRep.support = null; |
---|
| 217 | +// } |
---|
| 218 | + |
---|
| 219 | + if (this.support != null) |
---|
200 | 220 | { |
---|
201 | | - o.transientrep = this.bRep.support; |
---|
202 | | - o.bRep.support = null; |
---|
| 221 | + if (o.transientrep != null) |
---|
| 222 | + Grafreed.Assert(o.transientrep == this.support.bRep); |
---|
| 223 | + |
---|
| 224 | + o.transientrep = this.support.bRep; |
---|
| 225 | + this.support.bRep = null; |
---|
203 | 226 | } |
---|
204 | 227 | |
---|
205 | 228 | // o.support = this.support; |
---|
.. | .. |
---|
223 | 246 | |
---|
224 | 247 | RestoreBigData(o); |
---|
225 | 248 | |
---|
226 | | - hashtable.remove(GetUUID()); |
---|
| 249 | + if (blockloop) |
---|
| 250 | + return; |
---|
| 251 | + |
---|
| 252 | + blockloop = true; |
---|
| 253 | + |
---|
| 254 | + //hashtable.remove(GetUUID()); |
---|
227 | 255 | |
---|
228 | 256 | for (int i=0; i<Size(); i++) |
---|
229 | 257 | { |
---|
230 | 258 | get(i).RestoreBigData(hashtable); |
---|
231 | 259 | } |
---|
| 260 | + |
---|
| 261 | + blockloop = false; |
---|
232 | 262 | } |
---|
233 | 263 | |
---|
234 | 264 | void RestoreBigData(Object3D o) |
---|
235 | 265 | { |
---|
236 | 266 | this.bRep = o.bRep; |
---|
237 | | - if (this.bRep != null) |
---|
238 | | - this.bRep.support = o.transientrep; |
---|
| 267 | + if (this.support != null && o.transientrep != null) |
---|
| 268 | + { |
---|
| 269 | + this.support.bRep = o.transientrep; |
---|
| 270 | + } |
---|
| 271 | +// July 2019 if (this.bRep != null) |
---|
| 272 | +// this.bRep.support = o.transientrep; |
---|
239 | 273 | // this.support = o.support; |
---|
240 | 274 | // this.fileparent = o.fileparent; |
---|
241 | 275 | } |
---|
.. | .. |
---|
563 | 597 | toParent = LA.newMatrix(); |
---|
564 | 598 | fromParent = LA.newMatrix(); |
---|
565 | 599 | } |
---|
| 600 | + |
---|
566 | 601 | if (toParentMarked == null) |
---|
567 | 602 | { |
---|
568 | 603 | if (maxcount != 1) |
---|
569 | 604 | { |
---|
570 | 605 | new Exception().printStackTrace(); |
---|
571 | 606 | } |
---|
| 607 | + |
---|
572 | 608 | toParentMarked = LA.newMatrix(); |
---|
573 | 609 | fromParentMarked = LA.newMatrix(); |
---|
574 | 610 | } |
---|
.. | .. |
---|
879 | 915 | |
---|
880 | 916 | if (marked && Globals.isLIVE() && live && |
---|
881 | 917 | //TEMP21aug2018 |
---|
882 | | - (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) && |
---|
| 918 | + (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) && |
---|
883 | 919 | currentframe != Globals.framecount) |
---|
884 | 920 | { |
---|
885 | 921 | currentframe = Globals.framecount; |
---|
.. | .. |
---|
891 | 927 | |
---|
892 | 928 | boolean changedir = random && Math.random() < 0.01; // && !link2master; |
---|
893 | 929 | |
---|
894 | | - if (transformcount*factor > maxcount || (step == 1 && changedir)) |
---|
| 930 | + if (transformcount*factor >= maxcount && (rewind || random) || |
---|
| 931 | + (step == 1 && changedir)) |
---|
895 | 932 | { |
---|
896 | 933 | countdown = 1; |
---|
897 | 934 | delay = speedup?8:1; |
---|
.. | .. |
---|
963 | 1000 | if (material == null || material.multiply) |
---|
964 | 1001 | return true; |
---|
965 | 1002 | |
---|
| 1003 | + // Transparent objects are dynamic because we have to sort the triangles. |
---|
966 | 1004 | return material.opacity > 0.99; |
---|
967 | 1005 | } |
---|
968 | 1006 | |
---|
.. | .. |
---|
1363 | 1401 | toParent = LA.newMatrix(); |
---|
1364 | 1402 | fromParent = LA.newMatrix(); |
---|
1365 | 1403 | } |
---|
| 1404 | + |
---|
1366 | 1405 | LA.matCopy(other.toParent, toParent); |
---|
1367 | 1406 | LA.matCopy(other.fromParent, fromParent); |
---|
1368 | 1407 | |
---|
.. | .. |
---|
2384 | 2423 | } |
---|
2385 | 2424 | */ |
---|
2386 | 2425 | } |
---|
| 2426 | + else |
---|
| 2427 | + { |
---|
| 2428 | + //((ObjEditor)editWindow).SetupUI2(null); |
---|
| 2429 | + } |
---|
2387 | 2430 | } |
---|
2388 | 2431 | |
---|
2389 | 2432 | void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root) |
---|
.. | .. |
---|
2425 | 2468 | { |
---|
2426 | 2469 | editWindow.refreshContents(); |
---|
2427 | 2470 | } |
---|
| 2471 | + else |
---|
| 2472 | + { |
---|
| 2473 | + if (manipWindow != null) |
---|
| 2474 | + { |
---|
| 2475 | + manipWindow.refreshContents(); |
---|
| 2476 | + } |
---|
| 2477 | + } |
---|
| 2478 | + |
---|
2428 | 2479 | //if (parent != null) |
---|
2429 | 2480 | //parent.refreshEditWindow(); |
---|
2430 | 2481 | } |
---|
.. | .. |
---|
3501 | 3552 | if (blockloop) |
---|
3502 | 3553 | return; |
---|
3503 | 3554 | |
---|
3504 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3555 | + if (//marked || // does not make sense |
---|
| 3556 | + (bRep != null || material != null)) // borderline... |
---|
3505 | 3557 | live = h; |
---|
3506 | 3558 | |
---|
3507 | 3559 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3522 | 3574 | return; |
---|
3523 | 3575 | |
---|
3524 | 3576 | //if (bRep != null) |
---|
3525 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3577 | + if (//marked || // does not make sense |
---|
| 3578 | + (bRep != null || material != null)) // borderline... |
---|
3526 | 3579 | link2master = h; |
---|
3527 | 3580 | |
---|
3528 | 3581 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3542 | 3595 | if (blockloop) |
---|
3543 | 3596 | return; |
---|
3544 | 3597 | |
---|
3545 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3598 | + if (//marked || // does not make sense |
---|
| 3599 | + (bRep != null || material != null)) // borderline... |
---|
3546 | 3600 | hide = h; |
---|
3547 | 3601 | |
---|
3548 | 3602 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3562 | 3616 | if (blockloop) |
---|
3563 | 3617 | return; |
---|
3564 | 3618 | |
---|
3565 | | - if (bRep != null && material != null) // borderline... |
---|
| 3619 | + if (bRep != null || material != null) // borderline... |
---|
3566 | 3620 | marked = h; |
---|
3567 | 3621 | |
---|
3568 | 3622 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3572 | 3626 | continue; |
---|
3573 | 3627 | blockloop = true; |
---|
3574 | 3628 | child.MarkLeaves(h); |
---|
| 3629 | + blockloop = false; |
---|
| 3630 | + // release(i); |
---|
| 3631 | + } |
---|
| 3632 | + } |
---|
| 3633 | + |
---|
| 3634 | + void RewindLeaves(boolean h) |
---|
| 3635 | + { |
---|
| 3636 | + if (blockloop) |
---|
| 3637 | + return; |
---|
| 3638 | + |
---|
| 3639 | + if (bRep != null || material != null) // borderline... |
---|
| 3640 | + rewind = h; |
---|
| 3641 | + |
---|
| 3642 | + for (int i = 0; i < Size(); i++) |
---|
| 3643 | + { |
---|
| 3644 | + Object3D child = (Object3D) get(i); // reserve(i); |
---|
| 3645 | + if (child == null) |
---|
| 3646 | + continue; |
---|
| 3647 | + blockloop = true; |
---|
| 3648 | + child.RewindLeaves(h); |
---|
| 3649 | + blockloop = false; |
---|
| 3650 | + // release(i); |
---|
| 3651 | + } |
---|
| 3652 | + } |
---|
| 3653 | + |
---|
| 3654 | + void RandomLeaves(boolean h) |
---|
| 3655 | + { |
---|
| 3656 | + if (blockloop) |
---|
| 3657 | + return; |
---|
| 3658 | + |
---|
| 3659 | + if (bRep != null || material != null) // borderline... |
---|
| 3660 | + random = h; |
---|
| 3661 | + |
---|
| 3662 | + for (int i = 0; i < Size(); i++) |
---|
| 3663 | + { |
---|
| 3664 | + Object3D child = (Object3D) get(i); // reserve(i); |
---|
| 3665 | + if (child == null) |
---|
| 3666 | + continue; |
---|
| 3667 | + blockloop = true; |
---|
| 3668 | + child.RandomLeaves(h); |
---|
3575 | 3669 | blockloop = false; |
---|
3576 | 3670 | // release(i); |
---|
3577 | 3671 | } |
---|
.. | .. |
---|
4349 | 4443 | } |
---|
4350 | 4444 | } |
---|
4351 | 4445 | |
---|
| 4446 | + void RepairSOV() |
---|
| 4447 | + { |
---|
| 4448 | + if (blockloop) |
---|
| 4449 | + return; |
---|
| 4450 | + |
---|
| 4451 | + String texname = this.GetPigmentTexture(); |
---|
| 4452 | + |
---|
| 4453 | + if (texname.startsWith("sov")) |
---|
| 4454 | + { |
---|
| 4455 | + String[] s = texname.split("/"); |
---|
| 4456 | + |
---|
| 4457 | + String[] sname = s[1].split("Color.pn"); |
---|
| 4458 | + |
---|
| 4459 | + texname = sname[0]; |
---|
| 4460 | + |
---|
| 4461 | + if (sname.length > 1) |
---|
| 4462 | + { |
---|
| 4463 | + texname += "Color.jpg"; |
---|
| 4464 | + } |
---|
| 4465 | + |
---|
| 4466 | + this.SetPigmentTexture("sov/" + texname); |
---|
| 4467 | + } |
---|
| 4468 | + |
---|
| 4469 | + texname = this.GetBumpTexture(); |
---|
| 4470 | + |
---|
| 4471 | + if (texname.startsWith("sov")) |
---|
| 4472 | + { |
---|
| 4473 | + String[] s = texname.split("/"); |
---|
| 4474 | + |
---|
| 4475 | + String[] sname = s[1].split("Bump.pn"); |
---|
| 4476 | + |
---|
| 4477 | + texname = sname[0]; |
---|
| 4478 | + |
---|
| 4479 | + if (sname.length > 1) |
---|
| 4480 | + { |
---|
| 4481 | + texname += "Bump.jpg"; |
---|
| 4482 | + } |
---|
| 4483 | + |
---|
| 4484 | + this.SetBumpTexture("sov/" + texname); |
---|
| 4485 | + } |
---|
| 4486 | + |
---|
| 4487 | + for (int i=0; i<Size(); i++) |
---|
| 4488 | + { |
---|
| 4489 | + blockloop = true; |
---|
| 4490 | + get(i).RepairSOV(); |
---|
| 4491 | + blockloop = false; |
---|
| 4492 | + } |
---|
| 4493 | + } |
---|
| 4494 | + |
---|
4352 | 4495 | void RepairTexture() |
---|
4353 | 4496 | { |
---|
4354 | 4497 | if (this instanceof FileObject || blockloop) |
---|
.. | .. |
---|
4863 | 5006 | } |
---|
4864 | 5007 | } |
---|
4865 | 5008 | |
---|
| 5009 | + ObjEditor GetWindow() |
---|
| 5010 | + { |
---|
| 5011 | + if (editWindow != null) |
---|
| 5012 | + return editWindow; |
---|
| 5013 | + |
---|
| 5014 | + return manipWindow; |
---|
| 5015 | + } |
---|
| 5016 | + |
---|
4866 | 5017 | cTreePath Select(int indexcount, boolean deselect) |
---|
4867 | 5018 | { |
---|
4868 | 5019 | if (hide || dontselect) |
---|
.. | .. |
---|
4899 | 5050 | if (leaf != null) |
---|
4900 | 5051 | { |
---|
4901 | 5052 | cTreePath tp = new cTreePath(this, leaf); |
---|
4902 | | - if (editWindow != null) |
---|
| 5053 | + ObjEditor window = GetWindow(); |
---|
| 5054 | + if (window != null) |
---|
4903 | 5055 | { |
---|
4904 | 5056 | //System.out.println("editWindow = " + editWindow + " vs " + this); |
---|
4905 | | - editWindow.Select(tp, deselect, true); |
---|
| 5057 | + window.Select(tp, deselect, true); |
---|
4906 | 5058 | } |
---|
4907 | 5059 | |
---|
4908 | 5060 | return tp; |
---|
.. | .. |
---|
4919 | 5071 | |
---|
4920 | 5072 | if (child == null) |
---|
4921 | 5073 | continue; |
---|
| 5074 | + |
---|
4922 | 5075 | if (child.HasTransparency() && child.size() != 0) |
---|
4923 | 5076 | { |
---|
4924 | 5077 | cTreePath leaf = child.Select(indexcount, deselect); |
---|
.. | .. |
---|
4928 | 5081 | if (leaf != null) |
---|
4929 | 5082 | { |
---|
4930 | 5083 | cTreePath tp = new cTreePath(this, leaf); |
---|
4931 | | - if (editWindow != null) |
---|
| 5084 | + ObjEditor window = GetWindow(); |
---|
| 5085 | + if (window != null) |
---|
4932 | 5086 | { |
---|
4933 | | - editWindow.Select(tp, deselect, true); |
---|
| 5087 | + window.Select(tp, deselect, true); |
---|
4934 | 5088 | } |
---|
4935 | 5089 | |
---|
4936 | 5090 | return tp; |
---|
.. | .. |
---|
5572 | 5726 | boolean NeedSupport() |
---|
5573 | 5727 | { |
---|
5574 | 5728 | return |
---|
5575 | | - CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null |
---|
| 5729 | + CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null |
---|
5576 | 5730 | // PROBLEM with CROWD!! |
---|
5577 | 5731 | && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD); |
---|
5578 | 5732 | } |
---|
5579 | 5733 | |
---|
5580 | 5734 | static boolean DEBUG_SELECTION = false; |
---|
| 5735 | + |
---|
| 5736 | + boolean IsLive() |
---|
| 5737 | + { |
---|
| 5738 | + if (live) |
---|
| 5739 | + return true; |
---|
| 5740 | + |
---|
| 5741 | + if (parent == null) |
---|
| 5742 | + return false; |
---|
| 5743 | + |
---|
| 5744 | + return parent.IsLive(); |
---|
| 5745 | + } |
---|
5581 | 5746 | |
---|
5582 | 5747 | void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked) |
---|
5583 | 5748 | { |
---|
.. | .. |
---|
5640 | 5805 | support = support; |
---|
5641 | 5806 | |
---|
5642 | 5807 | //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); |
---|
| 5808 | + boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
5644 | 5809 | |
---|
5645 | 5810 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5646 | 5811 | { |
---|
.. | .. |
---|
5660 | 5825 | boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection(); |
---|
5661 | 5826 | |
---|
5662 | 5827 | if (!selectmode && //display.DrawMode() != display.SELECTION && |
---|
5663 | | - (touched || (bRep != null && bRep.displaylist <= 0))) |
---|
| 5828 | + //(touched || (bRep != null && bRep.displaylist <= 0))) |
---|
| 5829 | + (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0))) |
---|
5664 | 5830 | { |
---|
5665 | 5831 | Globals.lighttouched = true; |
---|
5666 | 5832 | } // all panes... |
---|
| 5833 | + |
---|
5667 | 5834 | //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW && |
---|
5668 | 5835 | if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW && |
---|
5669 | 5836 | (touched || (bRep != null && bRep.displaylist <= 0))) |
---|
.. | .. |
---|
5791 | 5958 | if (GetBRep() != null) |
---|
5792 | 5959 | { |
---|
5793 | 5960 | display.NextIndex(); |
---|
| 5961 | + |
---|
5794 | 5962 | // vertex color conflict : gl.glCallList(list); |
---|
5795 | 5963 | DrawNode(display, root, selected); |
---|
5796 | 5964 | if (this instanceof BezierPatch) |
---|
.. | .. |
---|
5831 | 5999 | tex = GetTextures(); |
---|
5832 | 6000 | } |
---|
5833 | 6001 | |
---|
5834 | | - boolean failed = false; |
---|
| 6002 | + boolean failedPigment = false; |
---|
| 6003 | + boolean failedBump = false; |
---|
5835 | 6004 | |
---|
5836 | 6005 | try |
---|
5837 | 6006 | { |
---|
5838 | | - display.BindTextures(tex, texres); |
---|
| 6007 | + display.BindPigmentTexture(tex, texres); |
---|
5839 | 6008 | } |
---|
5840 | 6009 | catch (Exception e) |
---|
5841 | 6010 | { |
---|
5842 | 6011 | System.err.println("FAILED: " + this); |
---|
5843 | | - failed = true; |
---|
| 6012 | + failedPigment = true; |
---|
| 6013 | + } |
---|
| 6014 | + |
---|
| 6015 | + try |
---|
| 6016 | + { |
---|
| 6017 | + display.BindBumpTexture(tex, texres); |
---|
| 6018 | + } |
---|
| 6019 | + catch (Exception e) |
---|
| 6020 | + { |
---|
| 6021 | + //System.err.println("FAILED: " + this); |
---|
| 6022 | + failedBump = true; |
---|
5844 | 6023 | } |
---|
5845 | 6024 | |
---|
5846 | 6025 | if (!compiled) |
---|
.. | .. |
---|
5863 | 6042 | } |
---|
5864 | 6043 | } |
---|
5865 | 6044 | |
---|
5866 | | - if (!failed) |
---|
5867 | | - display.ReleaseTextures(tex); |
---|
| 6045 | + if (!failedBump) |
---|
| 6046 | + display.ReleaseBumpTexture(tex); |
---|
| 6047 | + |
---|
| 6048 | + if (!failedPigment) |
---|
| 6049 | + display.ReleasePigmentTexture(tex); |
---|
5868 | 6050 | |
---|
5869 | 6051 | display.PopMaterial(this, selected); |
---|
5870 | 6052 | } |
---|
.. | .. |
---|
6237 | 6419 | // dec 2012 |
---|
6238 | 6420 | new Exception().printStackTrace(); |
---|
6239 | 6421 | return; |
---|
| 6422 | + } |
---|
| 6423 | + |
---|
| 6424 | + if (dontselect) |
---|
| 6425 | + { |
---|
| 6426 | + //bRep.GenerateNormalsMINE(); |
---|
6240 | 6427 | } |
---|
6241 | 6428 | |
---|
6242 | 6429 | display.DrawGeometry(bRep, flipV, selectmode); |
---|
.. | .. |
---|
7089 | 7276 | spot.translate(32, 32); |
---|
7090 | 7277 | spotw = spot.x + spot.width; |
---|
7091 | 7278 | spoth = spot.y + spot.height; |
---|
7092 | | - info.g.setColor(Color.blue); |
---|
| 7279 | + info.g.setColor(Color.cyan); |
---|
7093 | 7280 | info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
7094 | 7281 | // if (CameraPane.Xmin > spot.x) |
---|
7095 | 7282 | // { |
---|
.. | .. |
---|
7107 | 7294 | // { |
---|
7108 | 7295 | // CameraPane.Ymax = spoth; |
---|
7109 | 7296 | // } |
---|
7110 | | - // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15); |
---|
7111 | | - //info.g.drawLine(spotw, spoth, spotw - 15, spoth); |
---|
| 7297 | + // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15 |
---|
| 7298 | + //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15 |
---|
7112 | 7299 | spot.translate(0, -32); |
---|
7113 | | - info.g.setColor(Color.green); |
---|
| 7300 | + info.g.setColor(Color.yellow); |
---|
7114 | 7301 | info.g.fillRect(spot.x, spot.y, spot.width, spot.height); |
---|
| 7302 | + info.g.setColor(Color.green); |
---|
7115 | 7303 | // if (CameraPane.Xmin > spot.x) |
---|
7116 | 7304 | // { |
---|
7117 | 7305 | // CameraPane.Xmin = spot.x; |
---|
.. | .. |
---|
7128 | 7316 | // { |
---|
7129 | 7317 | // CameraPane.Ymax = spoth; |
---|
7130 | 7318 | // } |
---|
7131 | | - info.g.drawArc(boundary.x, boundary.y, |
---|
7132 | | - boundary.width, boundary.height, 0, 360); |
---|
| 7319 | + info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY, |
---|
| 7320 | + (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360); |
---|
7133 | 7321 | //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360); |
---|
7134 | 7322 | // if (CameraPane.Xmin > boundary.x) |
---|
7135 | 7323 | // { |
---|
.. | .. |
---|
7429 | 7617 | switch (info.pane.RenderCamera().viewCode) |
---|
7430 | 7618 | { |
---|
7431 | 7619 | case 3: // '\001' |
---|
7432 | | - if (modified) |
---|
| 7620 | + if (modified || opposite) |
---|
7433 | 7621 | { |
---|
7434 | 7622 | //LA.matScale(toParent, 1, hScale, vScale); |
---|
7435 | 7623 | LA.matScale(toParent, totalScale, 1, 1); |
---|
7436 | 7624 | } // vScale, 1); |
---|
7437 | 7625 | else |
---|
7438 | 7626 | { |
---|
| 7627 | + // EXCEPTION! |
---|
7439 | 7628 | LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
7440 | 7629 | } // vScale, 1); |
---|
7441 | 7630 | break; |
---|
7442 | 7631 | |
---|
7443 | 7632 | case 2: // '\002' |
---|
7444 | | - if (modified) |
---|
| 7633 | + if (modified || opposite) |
---|
7445 | 7634 | { |
---|
7446 | 7635 | //LA.matScale(toParent, hScale, 1, vScale); |
---|
7447 | 7636 | LA.matScale(toParent, 1, totalScale, 1); |
---|
.. | .. |
---|
7452 | 7641 | break; |
---|
7453 | 7642 | |
---|
7454 | 7643 | case 1: // '\003' |
---|
7455 | | - if (modified) |
---|
| 7644 | + if (modified || opposite) |
---|
7456 | 7645 | { |
---|
7457 | 7646 | //LA.matScale(toParent, hScale, vScale, 1); |
---|
7458 | 7647 | LA.matScale(toParent, 1, 1, totalScale); |
---|
.. | .. |
---|
7672 | 7861 | editWindow = null; |
---|
7673 | 7862 | } // ? |
---|
7674 | 7863 | } |
---|
| 7864 | + else |
---|
| 7865 | + { |
---|
| 7866 | + //editWindow.closeUI(); |
---|
| 7867 | + } |
---|
7675 | 7868 | } |
---|
7676 | 7869 | |
---|
7677 | 7870 | boolean root; // patch for edit windows |
---|
.. | .. |
---|
7829 | 8022 | } |
---|
7830 | 8023 | |
---|
7831 | 8024 | transient ObjEditor editWindow; |
---|
| 8025 | + transient ObjEditor manipWindow; |
---|
| 8026 | + |
---|
| 8027 | + transient boolean pinned; |
---|
| 8028 | + |
---|
7832 | 8029 | transient ObjectUI objectUI; |
---|
7833 | 8030 | public static int povDepth = 0; |
---|
7834 | 8031 | private static cVector tbMin = new cVector(); |
---|