.. | .. |
---|
797 | 797 | |
---|
798 | 798 | if (marked && Globals.isLIVE() && live && |
---|
799 | 799 | //TEMP21aug2018 |
---|
800 | | - Globals.DrawMode() == iCameraPane.SHADOW && |
---|
| 800 | + (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) && |
---|
801 | 801 | currentframe != Globals.framecount) |
---|
802 | 802 | { |
---|
803 | 803 | currentframe = Globals.framecount; |
---|
.. | .. |
---|
912 | 912 | fromParent = null; // LA.newMatrix(); |
---|
913 | 913 | bRep = null; // new BoundaryRep(); |
---|
914 | 914 | |
---|
| 915 | + if (oname != null && oname.equals("LeftHand")) |
---|
| 916 | + { |
---|
| 917 | + name = oname; |
---|
| 918 | + } |
---|
| 919 | + |
---|
915 | 920 | /* |
---|
916 | 921 | float hue = (float)Math.random(); |
---|
917 | 922 | Color col; |
---|
.. | .. |
---|
954 | 959 | |
---|
955 | 960 | public Object clone() |
---|
956 | 961 | { |
---|
957 | | - return GrafreeD.clone(this); |
---|
| 962 | + return Grafreed.clone(this); |
---|
958 | 963 | } |
---|
959 | 964 | |
---|
960 | 965 | Object3D copyExpand() |
---|
.. | .. |
---|
1470 | 1475 | BoundaryRep.SEUIL = other.material.cameralight; |
---|
1471 | 1476 | |
---|
1472 | 1477 | // Set default to 0.1 |
---|
1473 | | - BoundaryRep.SEUIL /= 2; |
---|
| 1478 | + BoundaryRep.SEUIL /= 4; // 2; |
---|
1474 | 1479 | System.out.println("SEUIL = " + BoundaryRep.SEUIL); |
---|
1475 | 1480 | } |
---|
1476 | 1481 | |
---|
.. | .. |
---|
1729 | 1734 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1730 | 1735 | o.bRep = transientrep; |
---|
1731 | 1736 | if (clone) |
---|
1732 | | - o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); |
---|
| 1737 | + o.bRep = (BoundaryRep) Grafreed.clone(transientrep); |
---|
1733 | 1738 | o.CreateMaterial(); |
---|
1734 | 1739 | o.SetAttributes(this, -1); |
---|
1735 | 1740 | //parent |
---|
.. | .. |
---|
1742 | 1747 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1743 | 1748 | o.bRep = bRep; |
---|
1744 | 1749 | if (clone) |
---|
1745 | | - o.bRep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
| 1750 | + o.bRep = (BoundaryRep) Grafreed.clone(bRep); |
---|
1746 | 1751 | o.CreateMaterial(); |
---|
1747 | 1752 | //o.overwriteThis(this, -1); |
---|
1748 | 1753 | o.SetAttributes(this, -1); |
---|
.. | .. |
---|
2477 | 2482 | return retval; |
---|
2478 | 2483 | } |
---|
2479 | 2484 | |
---|
2480 | | - void doEditDrag(ClickInfo info) |
---|
| 2485 | + void doEditDrag(ClickInfo info, boolean opposite) |
---|
2481 | 2486 | { |
---|
2482 | 2487 | switch (doSomething) |
---|
2483 | 2488 | { |
---|
2484 | 2489 | case 1: // '\001' |
---|
2485 | 2490 | //super. |
---|
2486 | | - doEditDrag0(info); |
---|
| 2491 | + doEditDrag0(info, opposite); |
---|
2487 | 2492 | break; |
---|
2488 | 2493 | |
---|
2489 | 2494 | case 2: // '\002' |
---|
.. | .. |
---|
2496 | 2501 | { |
---|
2497 | 2502 | //sel.hitSomething = childToDrag.hitSomething; |
---|
2498 | 2503 | //childToDrag.doEditDrag(info); |
---|
2499 | | - sel.doEditDrag(info); |
---|
| 2504 | + sel.doEditDrag(info, opposite); |
---|
2500 | 2505 | } else |
---|
2501 | 2506 | { |
---|
2502 | 2507 | //super. |
---|
2503 | | - doEditDrag0(info); |
---|
| 2508 | + doEditDrag0(info, opposite); |
---|
2504 | 2509 | } |
---|
2505 | 2510 | } |
---|
2506 | 2511 | break; |
---|
.. | .. |
---|
2983 | 2988 | blockloop = false; |
---|
2984 | 2989 | } |
---|
2985 | 2990 | |
---|
| 2991 | + void TransformChildren() |
---|
| 2992 | + { |
---|
| 2993 | + if (toParent != null) |
---|
| 2994 | + { |
---|
| 2995 | + for (int i=Size(); --i>=0;) |
---|
| 2996 | + { |
---|
| 2997 | + Object3D v = get(i); |
---|
| 2998 | + |
---|
| 2999 | + if (v.toParent == null) |
---|
| 3000 | + { |
---|
| 3001 | + v.toParent = LA.newMatrix(); |
---|
| 3002 | + v.fromParent = LA.newMatrix(); |
---|
| 3003 | + } |
---|
| 3004 | + |
---|
| 3005 | + LA.matConcat(v.toParent, toParent, v.toParent); |
---|
| 3006 | + LA.matConcat(fromParent, v.fromParent, v.fromParent); |
---|
| 3007 | + } |
---|
| 3008 | + |
---|
| 3009 | + toParent = null; // LA.matIdentity(toParent); |
---|
| 3010 | + fromParent = null; // LA.matIdentity(fromParent); |
---|
| 3011 | + |
---|
| 3012 | + Touch(); |
---|
| 3013 | + } |
---|
| 3014 | + } |
---|
| 3015 | + |
---|
2986 | 3016 | void TransformGeometry() |
---|
2987 | 3017 | { |
---|
2988 | 3018 | Object3D obj = this; |
---|
.. | .. |
---|
3204 | 3234 | |
---|
3205 | 3235 | BoundaryRep sup = bRep.support; |
---|
3206 | 3236 | bRep.support = null; |
---|
3207 | | - BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
| 3237 | + BoundaryRep temprep = (BoundaryRep) Grafreed.clone(bRep); |
---|
3208 | 3238 | // bRep.SplitInTwo(onlyone); // thread... |
---|
3209 | 3239 | temprep.SplitInTwo(reduction34, onlyone); |
---|
3210 | 3240 | bRep = temprep; |
---|
.. | .. |
---|
3728 | 3758 | if (child == null) |
---|
3729 | 3759 | continue; |
---|
3730 | 3760 | |
---|
3731 | | - if (GrafreeD.RENDERME > 0) |
---|
| 3761 | + if (Grafreed.RENDERME > 0) |
---|
3732 | 3762 | { |
---|
3733 | 3763 | if (child instanceof Merge) |
---|
3734 | 3764 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
3879 | 3909 | if (child == null) |
---|
3880 | 3910 | continue; |
---|
3881 | 3911 | |
---|
3882 | | - if (GrafreeD.RENDERME > 0) |
---|
| 3912 | + if (Grafreed.RENDERME > 0) |
---|
3883 | 3913 | { |
---|
3884 | 3914 | if (child instanceof Merge) |
---|
3885 | 3915 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4074 | 4104 | if (child == null) |
---|
4075 | 4105 | continue; |
---|
4076 | 4106 | |
---|
4077 | | - if (GrafreeD.RENDERME > 0) |
---|
| 4107 | + if (Grafreed.RENDERME > 0) |
---|
4078 | 4108 | { |
---|
4079 | 4109 | if (child instanceof Merge) |
---|
4080 | 4110 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
5379 | 5409 | return |
---|
5380 | 5410 | CameraPane.SUPPORT && !CameraPane.movingcamera && link2master && /*live &&*/ support != null |
---|
5381 | 5411 | // PROBLEM with CROWD!! |
---|
5382 | | - && (Globals.DrawMode() == iCameraPane.SHADOW || Globals.CROWD); |
---|
| 5412 | + && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD); |
---|
5383 | 5413 | } |
---|
5384 | 5414 | |
---|
5385 | 5415 | static boolean DEBUG_SELECTION = false; |
---|
.. | .. |
---|
7012 | 7042 | return true; |
---|
7013 | 7043 | } |
---|
7014 | 7044 | |
---|
7015 | | - void doEditDrag0(ClickInfo info) |
---|
| 7045 | + void doEditDrag0(ClickInfo info, boolean opposite) |
---|
7016 | 7046 | { |
---|
7017 | 7047 | if (hitSomething == 0) |
---|
7018 | 7048 | { |
---|
.. | .. |
---|
7039 | 7069 | |
---|
7040 | 7070 | scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance(); |
---|
7041 | 7071 | |
---|
7042 | | - if (modified) |
---|
| 7072 | + if (modified || opposite) |
---|
7043 | 7073 | { |
---|
7044 | 7074 | //assert(false); |
---|
7045 | 7075 | /* |
---|
.. | .. |
---|
7133 | 7163 | |
---|
7134 | 7164 | if (modified) |
---|
7135 | 7165 | { |
---|
| 7166 | + // Rotate 90 degrees |
---|
7136 | 7167 | angle /= (Math.PI / 4); |
---|
7137 | 7168 | angle = Math.floor(angle + 0.5); |
---|
7138 | 7169 | angle *= (Math.PI / 4); |
---|
.. | .. |
---|
7367 | 7398 | //return super.toString() + " (id=" + list + ")" + " (brep=" + bRep + ")"; |
---|
7368 | 7399 | //return name + " (id=" + list + ")" + " (brep=" + bRep + ") " + super.toString(); |
---|
7369 | 7400 | //return name + " (#tri = " + (bRep==null?0:bRep.VertexCount()) + ") " + super.toString(); |
---|
| 7401 | + |
---|
| 7402 | + String objname; |
---|
| 7403 | + |
---|
7370 | 7404 | if (false) //parent != null) |
---|
7371 | 7405 | { |
---|
7372 | | - return name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")"; |
---|
| 7406 | + objname = name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")"; |
---|
7373 | 7407 | } else |
---|
7374 | 7408 | { |
---|
7375 | | - return GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count /*- 1*/) + ") ")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ +System.identityHashCode(this); |
---|
| 7409 | + objname = GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count /*- 1*/) + ")")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ ""; |
---|
7376 | 7410 | } // + super.toString(); |
---|
7377 | 7411 | //return name + " (" + (SizeOf.deepSizeOf(this)/1024) + "K) " + this.getClass().getName(); |
---|
| 7412 | + |
---|
| 7413 | + if (!Globals.ADVANCED) |
---|
| 7414 | + return objname; |
---|
| 7415 | + |
---|
| 7416 | + return objname + " " + System.identityHashCode(this); |
---|
7378 | 7417 | } |
---|
7379 | 7418 | |
---|
7380 | 7419 | public int hashCode() |
---|
.. | .. |
---|
7566 | 7605 | { |
---|
7567 | 7606 | assert(bRep != null); |
---|
7568 | 7607 | if (!(support instanceof GenericJoint)) // support.bRep != null) |
---|
7569 | | - GrafreeD.Assert(support.bRep == bRep.support); |
---|
| 7608 | + Grafreed.Assert(support.bRep == bRep.support); |
---|
7570 | 7609 | } |
---|
7571 | 7610 | else |
---|
7572 | 7611 | { |
---|