.. | .. |
---|
21 | 21 | |
---|
22 | 22 | ScriptNode scriptnode; |
---|
23 | 23 | |
---|
| 24 | + void InitOthers() |
---|
| 25 | + { |
---|
| 26 | + if (projectedVertices == null || projectedVertices.length <= 2) |
---|
| 27 | + { |
---|
| 28 | + projectedVertices = new Object3D.cVector2[3]; |
---|
| 29 | + } |
---|
| 30 | + for (int i = 0; i < 3; i++) |
---|
| 31 | + { |
---|
| 32 | + projectedVertices[i] = new cVector2(); // Others |
---|
| 33 | + } |
---|
| 34 | + projectedVertices[0].x = 100; // bump |
---|
| 35 | + } |
---|
| 36 | + |
---|
24 | 37 | void MinMax(cVector minima, cVector maxima) |
---|
25 | 38 | { |
---|
26 | 39 | for (int xyz = 0; xyz < 3; xyz++) |
---|
.. | .. |
---|
296 | 309 | boolean speedup = false; |
---|
297 | 310 | boolean rewind = false; |
---|
298 | 311 | |
---|
| 312 | + float NORMALPUSH = 0; |
---|
| 313 | + |
---|
299 | 314 | Object3D support; |
---|
300 | 315 | |
---|
301 | 316 | Object3D GetObject() |
---|
.. | .. |
---|
355 | 370 | |
---|
356 | 371 | int MemorySize() |
---|
357 | 372 | { |
---|
358 | | - if (memorysize == 0) |
---|
| 373 | + if (true) // memorysize == 0) |
---|
359 | 374 | { |
---|
360 | 375 | try |
---|
361 | 376 | { |
---|
.. | .. |
---|
779 | 794 | // factor = CameraPane.STEP; |
---|
780 | 795 | // } |
---|
781 | 796 | |
---|
782 | | - if (marked && CameraPane.isLIVE() && live && CameraPane.drawMode == CameraPane.SHADOW && currentframe != CameraPane.framecount) |
---|
| 797 | + if (marked && CameraPane.isLIVE() && live && |
---|
| 798 | + //TEMP21aug2018 |
---|
| 799 | + CameraPane.drawMode == CameraPane.SHADOW && |
---|
| 800 | + currentframe != CameraPane.framecount) |
---|
783 | 801 | { |
---|
784 | 802 | currentframe = CameraPane.framecount; |
---|
785 | 803 | |
---|
.. | .. |
---|
935 | 953 | |
---|
936 | 954 | public Object clone() |
---|
937 | 955 | { |
---|
938 | | - return GraphreeD.clone(this); |
---|
| 956 | + return GrafreeD.clone(this); |
---|
939 | 957 | } |
---|
940 | 958 | |
---|
941 | 959 | Object3D copyExpand() |
---|
.. | .. |
---|
1446 | 1464 | // if (other == null) |
---|
1447 | 1465 | // return; |
---|
1448 | 1466 | |
---|
1449 | | - System.out.println("Link support this = " + this + "; other = " + other); |
---|
| 1467 | + if (other != null) |
---|
| 1468 | + { |
---|
| 1469 | + BoundaryRep.SEUIL = other.material.cameralight; |
---|
| 1470 | + |
---|
| 1471 | + // Set default to 0.1 |
---|
| 1472 | + BoundaryRep.SEUIL /= 2; |
---|
| 1473 | + System.out.println("SEUIL = " + BoundaryRep.SEUIL); |
---|
| 1474 | + } |
---|
| 1475 | + |
---|
| 1476 | + System.out.println("Link this = " + this + "; support = " + other); |
---|
1450 | 1477 | |
---|
1451 | 1478 | //if (bRep != null) |
---|
1452 | 1479 | // bRep.linkVerticesThis(other.bRep); |
---|
.. | .. |
---|
1701 | 1728 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1702 | 1729 | o.bRep = transientrep; |
---|
1703 | 1730 | if (clone) |
---|
1704 | | - o.bRep = (BoundaryRep) GraphreeD.clone(transientrep); |
---|
| 1731 | + o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); |
---|
1705 | 1732 | o.CreateMaterial(); |
---|
1706 | 1733 | o.SetAttributes(this, -1); |
---|
1707 | 1734 | //parent |
---|
.. | .. |
---|
1714 | 1741 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1715 | 1742 | o.bRep = bRep; |
---|
1716 | 1743 | if (clone) |
---|
1717 | | - o.bRep = (BoundaryRep) GraphreeD.clone(bRep); |
---|
| 1744 | + o.bRep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
1718 | 1745 | o.CreateMaterial(); |
---|
1719 | 1746 | //o.overwriteThis(this, -1); |
---|
1720 | 1747 | o.SetAttributes(this, -1); |
---|
.. | .. |
---|
1756 | 1783 | // { |
---|
1757 | 1784 | // assert(bRep == null); |
---|
1758 | 1785 | // Object3D o = new Object3D("Geometry:" + this.name); |
---|
1759 | | -// o.bRep = (BoundaryRep) GraphreeD.clone(transientrep); |
---|
| 1786 | +// o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); |
---|
1760 | 1787 | // o.CreateMaterial(); |
---|
1761 | 1788 | // parent.addChild(o); |
---|
1762 | 1789 | // } |
---|
.. | .. |
---|
1765 | 1792 | // { |
---|
1766 | 1793 | // assert(transientrep == null); |
---|
1767 | 1794 | // Object3D o = new Object3D("Geometry:" + this.name); |
---|
1768 | | -// o.bRep = (BoundaryRep) GraphreeD.clone(bRep); |
---|
| 1795 | +// o.bRep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
1769 | 1796 | // o.CreateMaterial(); |
---|
1770 | 1797 | // parent.addChild(o); |
---|
1771 | 1798 | // } |
---|
.. | .. |
---|
1816 | 1843 | if (obj.name == null) |
---|
1817 | 1844 | continue; // can't be a null one |
---|
1818 | 1845 | |
---|
1819 | | - //if (n.contains(obj.name)) // dec 2013 name.split(":")[0])) // Poser generates a count |
---|
1820 | | - if (n.startsWith(obj.name)) |
---|
| 1846 | + String name = obj.name.split(":")[0]; // Poser generates a count |
---|
| 1847 | + //if (n.startsWith(obj.name)) |
---|
| 1848 | + if (n.contains(name)) |
---|
1821 | 1849 | { |
---|
1822 | 1850 | theobj = obj; |
---|
1823 | 1851 | count++; |
---|
.. | .. |
---|
2120 | 2148 | if (/*parent != null &&*/ material == null) |
---|
2121 | 2149 | { |
---|
2122 | 2150 | material = new cMaterial(GetMaterial()); |
---|
2123 | | - if (projectedVertices == null || projectedVertices.length <= 2) |
---|
2124 | | - { |
---|
2125 | | - projectedVertices = new Object3D.cVector2[3]; |
---|
2126 | | - } |
---|
2127 | | - for (int i = 0; i < 3; i++) |
---|
2128 | | - { |
---|
2129 | | - projectedVertices[i] = new cVector2(); // Others |
---|
2130 | | - } |
---|
2131 | | - projectedVertices[0].x = 100; // bump |
---|
| 2151 | + |
---|
| 2152 | + InitOthers(); |
---|
2132 | 2153 | |
---|
2133 | 2154 | if (this instanceof Camera) |
---|
2134 | 2155 | { |
---|
.. | .. |
---|
2732 | 2753 | blockloop = false; |
---|
2733 | 2754 | } |
---|
2734 | 2755 | |
---|
| 2756 | + void GenNormalsMINE() |
---|
| 2757 | + { |
---|
| 2758 | + if (blockloop) |
---|
| 2759 | + return; |
---|
| 2760 | + |
---|
| 2761 | + blockloop = true; |
---|
| 2762 | + GenNormalsMINE0(); |
---|
| 2763 | + for (int i = 0; i < Children().Size(); i++) |
---|
| 2764 | + { |
---|
| 2765 | + Object3D child = (Object3D) Children().get(i); // reserve(i); |
---|
| 2766 | + if (child == null) |
---|
| 2767 | + continue; |
---|
| 2768 | + child.GenNormalsMINE(); |
---|
| 2769 | +// Children().release(i); |
---|
| 2770 | + } |
---|
| 2771 | + blockloop = false; |
---|
| 2772 | + } |
---|
| 2773 | + |
---|
2735 | 2774 | void ClearColors() |
---|
2736 | 2775 | { |
---|
2737 | 2776 | if (blockloop) |
---|
.. | .. |
---|
2876 | 2915 | if (bRep != null) |
---|
2877 | 2916 | { |
---|
2878 | 2917 | bRep.GenerateNormals(crease); |
---|
| 2918 | + Touch(); |
---|
| 2919 | + } |
---|
| 2920 | + } |
---|
| 2921 | + |
---|
| 2922 | + void GenNormalsMINE0() |
---|
| 2923 | + { |
---|
| 2924 | + if (bRep != null) |
---|
| 2925 | + { |
---|
| 2926 | + bRep.GenerateNormalsMINE(); |
---|
2879 | 2927 | Touch(); |
---|
2880 | 2928 | } |
---|
2881 | 2929 | } |
---|
.. | .. |
---|
3153 | 3201 | |
---|
3154 | 3202 | BoundaryRep sup = bRep.support; |
---|
3155 | 3203 | bRep.support = null; |
---|
3156 | | - BoundaryRep temprep = (BoundaryRep) GraphreeD.clone(bRep); |
---|
| 3204 | + BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
3157 | 3205 | // bRep.SplitInTwo(onlyone); // thread... |
---|
3158 | 3206 | temprep.SplitInTwo(reduction34, onlyone); |
---|
3159 | 3207 | bRep = temprep; |
---|
.. | .. |
---|
3677 | 3725 | if (child == null) |
---|
3678 | 3726 | continue; |
---|
3679 | 3727 | |
---|
3680 | | - if (GraphreeD.RENDERME > 0) |
---|
| 3728 | + if (GrafreeD.RENDERME > 0) |
---|
3681 | 3729 | { |
---|
3682 | 3730 | if (child instanceof Merge) |
---|
3683 | 3731 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
3717 | 3765 | |
---|
3718 | 3766 | boolean getCentroid(cVector centroid, boolean xform) |
---|
3719 | 3767 | { |
---|
3720 | | - assert(false); |
---|
| 3768 | +// for speaker assert(false); |
---|
3721 | 3769 | if (blockloop) |
---|
3722 | 3770 | return false; |
---|
3723 | 3771 | |
---|
.. | .. |
---|
3828 | 3876 | if (child == null) |
---|
3829 | 3877 | continue; |
---|
3830 | 3878 | |
---|
3831 | | - if (GraphreeD.RENDERME > 0) |
---|
| 3879 | + if (GrafreeD.RENDERME > 0) |
---|
3832 | 3880 | { |
---|
3833 | 3881 | if (child instanceof Merge) |
---|
3834 | 3882 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4023 | 4071 | if (child == null) |
---|
4024 | 4072 | continue; |
---|
4025 | 4073 | |
---|
4026 | | - if (GraphreeD.RENDERME > 0) |
---|
| 4074 | + if (GrafreeD.RENDERME > 0) |
---|
4027 | 4075 | { |
---|
4028 | 4076 | if (child instanceof Merge) |
---|
4029 | 4077 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4111 | 4159 | if (blockloop) |
---|
4112 | 4160 | return; |
---|
4113 | 4161 | |
---|
4114 | | - for (int i=0; i<size(); i++) |
---|
| 4162 | + for (int i=0; i<Size(); i++) |
---|
4115 | 4163 | { |
---|
4116 | 4164 | if (get(i).parent != this) |
---|
4117 | 4165 | { |
---|
.. | .. |
---|
4120 | 4168 | } |
---|
4121 | 4169 | blockloop = true; |
---|
4122 | 4170 | get(i).RepairParent(); |
---|
| 4171 | + blockloop = false; |
---|
| 4172 | + } |
---|
| 4173 | + } |
---|
| 4174 | + |
---|
| 4175 | + void RepairShadow() |
---|
| 4176 | + { |
---|
| 4177 | + if (blockloop) |
---|
| 4178 | + return; |
---|
| 4179 | + |
---|
| 4180 | + if (this.material != null) |
---|
| 4181 | + this.InitOthers(); |
---|
| 4182 | + |
---|
| 4183 | + for (int i=0; i<Size(); i++) |
---|
| 4184 | + { |
---|
| 4185 | + blockloop = true; |
---|
| 4186 | + get(i).RepairShadow(); |
---|
4123 | 4187 | blockloop = false; |
---|
4124 | 4188 | } |
---|
4125 | 4189 | } |
---|
.. | .. |
---|
4515 | 4579 | |
---|
4516 | 4580 | Object3D GetFileRoot() |
---|
4517 | 4581 | { |
---|
| 4582 | + if (overflow) |
---|
| 4583 | + return null; |
---|
| 4584 | + |
---|
| 4585 | + overflow = true; |
---|
| 4586 | + |
---|
| 4587 | + Object3D pfr = null; |
---|
| 4588 | + |
---|
4518 | 4589 | if (parent == null && fileparent == null) |
---|
4519 | | - return this; |
---|
| 4590 | + pfr = this; |
---|
4520 | 4591 | |
---|
4521 | 4592 | if (parent == null && fileparent != null) // V4.gfd??? |
---|
4522 | | - return fileparent; |
---|
| 4593 | + pfr = fileparent; |
---|
4523 | 4594 | |
---|
4524 | | - if (parent == null) |
---|
4525 | | - return this; |
---|
| 4595 | + if (pfr == null && parent == null) |
---|
| 4596 | + pfr = this; |
---|
4526 | 4597 | |
---|
4527 | | - return parent.GetFileRoot(); |
---|
| 4598 | + if (pfr == null) |
---|
| 4599 | + pfr = parent.GetFileRoot(); |
---|
| 4600 | + |
---|
| 4601 | + overflow = false; |
---|
| 4602 | + |
---|
| 4603 | + return pfr; |
---|
4528 | 4604 | } |
---|
4529 | 4605 | |
---|
4530 | 4606 | cTreePath GetPath() |
---|
.. | .. |
---|
5280 | 5356 | if (name != null && name.contains("sclera")) |
---|
5281 | 5357 | name = name; |
---|
5282 | 5358 | |
---|
5283 | | - if (this instanceof CheckerIG) |
---|
| 5359 | + if (this instanceof Checker) |
---|
5284 | 5360 | return; |
---|
5285 | 5361 | |
---|
5286 | 5362 | if (display.drawMode == display.SHADOW && PASSTEST) |
---|
.. | .. |
---|
5507 | 5583 | display.options2[2] = material.factor; |
---|
5508 | 5584 | |
---|
5509 | 5585 | cColor.HSBtoRGB(material.color, material.modulation, 1, display.options3); |
---|
5510 | | - display.options3[3] = material.cameralight/0.2f; |
---|
| 5586 | + display.options4[0] = material.cameralight/0.2f; |
---|
| 5587 | + display.options4[1] = material.subsurface; |
---|
| 5588 | + display.options4[2] = material.sheen; |
---|
5511 | 5589 | |
---|
5512 | 5590 | // if (display.CURRENTANTIALIAS > 0) |
---|
5513 | 5591 | // display.options3[3] /= 4; |
---|
.. | .. |
---|
5807 | 5885 | if (!child.HasTransparency()) |
---|
5808 | 5886 | { |
---|
5809 | 5887 | sel = root != null && root.selection != null && root.selection.indexOf(child) != -1; |
---|
5810 | | - // GraphreeD.tracein("draw ", child); |
---|
| 5888 | + // GrafreeD.tracein("draw ", child); |
---|
5811 | 5889 | boolean wasblocked = blockdraw; |
---|
5812 | 5890 | blockdraw = true; |
---|
5813 | 5891 | child.draw(display, root, selected || sel, wasblocked || blocked); // || child.IsSelected()); |
---|
5814 | 5892 | blockdraw = false; |
---|
5815 | | - // GraphreeD.traceout("draw ", child); |
---|
| 5893 | + // GrafreeD.traceout("draw ", child); |
---|
5816 | 5894 | } |
---|
5817 | 5895 | |
---|
5818 | 5896 | release(i); |
---|
.. | .. |
---|
5907 | 5985 | |
---|
5908 | 5986 | javax.media.opengl.GL gl = display.GetGL(); |
---|
5909 | 5987 | |
---|
5910 | | - if (CameraPane.BOXMODE) // || CameraPane.movingcamera) |
---|
| 5988 | + if (CameraPane.BOXMODE && !selected) // || CameraPane.movingcamera) |
---|
5911 | 5989 | { |
---|
5912 | 5990 | int fc = bRep.FaceCount(); |
---|
5913 | 5991 | int vc = bRep.VertexCount(); |
---|
.. | .. |
---|
6648 | 6726 | gl.glNormal3f((float) v2.x, (float) v2.y, (float) v2.z); |
---|
6649 | 6727 | } |
---|
6650 | 6728 | |
---|
| 6729 | + // P |
---|
| 6730 | + float x = (float)pv.x; |
---|
| 6731 | + float y = (float)pv.y; |
---|
| 6732 | + float z = (float)pv.z; |
---|
| 6733 | + |
---|
6651 | 6734 | if (hasnorm) |
---|
6652 | 6735 | { |
---|
6653 | 6736 | // if (!pv.norm.normalized()) |
---|
6654 | 6737 | // assert(pv.norm.normalized()); |
---|
6655 | 6738 | |
---|
6656 | 6739 | //System.out.println("normalp = " + pv.norm.x + ", " + pv.norm.y + ", " + pv.norm.z); |
---|
6657 | | - gl.glNormal3f((float) pv.norm.x, (float) pv.norm.y, (float) pv.norm.z); |
---|
| 6740 | + float nx = (float)pv.norm.x; |
---|
| 6741 | + float ny = (float)pv.norm.y; |
---|
| 6742 | + float nz = (float)pv.norm.z; |
---|
| 6743 | + |
---|
| 6744 | + x += nx * NORMALPUSH; |
---|
| 6745 | + y += ny * NORMALPUSH; |
---|
| 6746 | + z += nz * NORMALPUSH; |
---|
| 6747 | + |
---|
| 6748 | + gl.glNormal3f(nx, ny, nz); |
---|
6658 | 6749 | } |
---|
6659 | 6750 | gl.glColor4f(pv.AO, pv.AO, pv.AO, 1); |
---|
6660 | 6751 | SetColor(display, pv); |
---|
.. | .. |
---|
6665 | 6756 | else |
---|
6666 | 6757 | gl.glTexCoord2f((float) pv.s, (float) pv.t); |
---|
6667 | 6758 | //System.out.println("vertexp = " + pv.x + ", " + pv.y + ", " + pv.z); |
---|
6668 | | - gl.glVertex3f((float) pv./*pos.*/x, (float) pv./*pos.*/y, (float) pv./*pos.*/z); |
---|
| 6759 | + |
---|
| 6760 | + gl.glVertex3f(x, y, z); |
---|
| 6761 | + |
---|
| 6762 | + // Q |
---|
| 6763 | + x = (float)qv.x; |
---|
| 6764 | + y = (float)qv.y; |
---|
| 6765 | + z = (float)qv.z; |
---|
| 6766 | + |
---|
6669 | 6767 | // Print(pv); |
---|
6670 | 6768 | if (hasnorm) |
---|
6671 | 6769 | { |
---|
6672 | 6770 | // assert(qv.norm.normalized()); |
---|
6673 | 6771 | //System.out.println("normalq = " + qv.norm.x + ", " + qv.norm.y + ", " + qv.norm.z); |
---|
6674 | | - gl.glNormal3f((float) qv.norm.x, (float) qv.norm.y, (float) qv.norm.z); |
---|
| 6772 | + float nx = (float)qv.norm.x; |
---|
| 6773 | + float ny = (float)qv.norm.y; |
---|
| 6774 | + float nz = (float)qv.norm.z; |
---|
| 6775 | + |
---|
| 6776 | + x += nx * NORMALPUSH; |
---|
| 6777 | + y += ny * NORMALPUSH; |
---|
| 6778 | + z += nz * NORMALPUSH; |
---|
| 6779 | + |
---|
| 6780 | + gl.glNormal3f(nx, ny, nz); |
---|
6675 | 6781 | } |
---|
6676 | 6782 | //System.out.println("vertexq = " + qv.s + ", " + qv.t); |
---|
6677 | 6783 | // boolean locked = false; |
---|
.. | .. |
---|
6695 | 6801 | // } |
---|
6696 | 6802 | gl.glColor4f(qv.AO, qv.AO, qv.AO, 1); |
---|
6697 | 6803 | SetColor(display, qv); |
---|
| 6804 | + |
---|
| 6805 | + gl.glVertex3f(x, y, z); |
---|
6698 | 6806 | //gl.glColor4f(r, g, b, 1); |
---|
6699 | 6807 | //gl.glColor4f(qv.boundary, qv.boundary, qv.boundary, 1); |
---|
6700 | 6808 | //System.out.println("vertexq = " + qv.x + ", " + qv.y + ", " + qv.z); |
---|
6701 | | - gl.glVertex3f((float) qv./*pos.*/x, (float) qv./*pos.*/y, (float) qv./*pos.*/z); |
---|
6702 | 6809 | // Print(qv); |
---|
| 6810 | + |
---|
| 6811 | + // R |
---|
| 6812 | + x = (float)rv.x; |
---|
| 6813 | + y = (float)rv.y; |
---|
| 6814 | + z = (float)rv.z; |
---|
| 6815 | + |
---|
6703 | 6816 | if (hasnorm) |
---|
6704 | 6817 | { |
---|
6705 | 6818 | // assert(rv.norm.normalized()); |
---|
6706 | 6819 | //System.out.println("normalr = " + rv.norm.x + ", " + rv.norm.y + ", " + rv.norm.z); |
---|
6707 | | - gl.glNormal3f((float) rv.norm.x, (float) rv.norm.y, (float) rv.norm.z); |
---|
| 6820 | + float nx = (float)rv.norm.x; |
---|
| 6821 | + float ny = (float)rv.norm.y; |
---|
| 6822 | + float nz = (float)rv.norm.z; |
---|
| 6823 | + |
---|
| 6824 | + x += nx * NORMALPUSH; |
---|
| 6825 | + y += ny * NORMALPUSH; |
---|
| 6826 | + z += nz * NORMALPUSH; |
---|
| 6827 | + |
---|
| 6828 | + gl.glNormal3f(nx, ny, nz); |
---|
6708 | 6829 | } |
---|
6709 | 6830 | |
---|
6710 | 6831 | // if ((dot&4) == 0) |
---|
.. | .. |
---|
6725 | 6846 | //gl.glColor4f(r, g, b, 1); |
---|
6726 | 6847 | //gl.glColor4f(rv.boundary, rv.boundary, rv.boundary, 1); |
---|
6727 | 6848 | //System.out.println("vertexr = " + rv.x + ", " + rv.y + ", " + rv.z); |
---|
6728 | | - gl.glVertex3f((float) rv./*pos.*/x, (float) rv./*pos.*/y, (float) rv./*pos.*/z); |
---|
| 6849 | + gl.glVertex3f(x, y, z); |
---|
6729 | 6850 | // Print(rv); |
---|
6730 | 6851 | //gl.glEnd(); |
---|
6731 | 6852 | } |
---|
.. | .. |
---|
7719 | 7840 | if (parent == null) |
---|
7720 | 7841 | { |
---|
7721 | 7842 | System.out.println("NULL PARENT"); |
---|
7722 | | - new Exception().printStackTrace(); |
---|
| 7843 | + //new Exception().printStackTrace(); |
---|
7723 | 7844 | } else |
---|
7724 | 7845 | { |
---|
7725 | 7846 | if (parent instanceof BezierPatch) |
---|
.. | .. |
---|
7735 | 7856 | info.pane.repaint(); |
---|
7736 | 7857 | } |
---|
7737 | 7858 | |
---|
| 7859 | + boolean overflow = false; |
---|
| 7860 | + |
---|
7738 | 7861 | void TransformToWorld(cVector out) // , cVector out) |
---|
7739 | 7862 | { |
---|
| 7863 | + if (overflow) |
---|
| 7864 | + return; |
---|
| 7865 | + |
---|
| 7866 | + overflow = true; |
---|
| 7867 | + |
---|
7740 | 7868 | // june 2013 ??? assert (in == out); |
---|
7741 | 7869 | cVector in = out; |
---|
7742 | 7870 | if (toParent != null && !(this instanceof Texture || this instanceof TextureNode)) |
---|
.. | .. |
---|
7753 | 7881 | { |
---|
7754 | 7882 | (parent!=null?parent:fileparent).TransformToWorld(out); //, out); |
---|
7755 | 7883 | } |
---|
| 7884 | + |
---|
| 7885 | + overflow = false; |
---|
7756 | 7886 | } |
---|
7757 | 7887 | |
---|
7758 | 7888 | void TransformToLocal(cVector out) //, cVector out) |
---|
.. | .. |
---|
7995 | 8125 | max = new cVector(); |
---|
7996 | 8126 | } |
---|
7997 | 8127 | |
---|
7998 | | - Object3D sourcenode = GetFileRoot(); |
---|
7999 | | - |
---|
8000 | | - if (!sourcenode.name.contains("rclab")) |
---|
| 8128 | + if (false) // Can crawl!! |
---|
8001 | 8129 | { |
---|
8002 | | - getBounds(min, max, true); |
---|
| 8130 | + Object3D sourcenode = GetFileRoot(); |
---|
8003 | 8131 | |
---|
8004 | | - if (min.y != Double.POSITIVE_INFINITY && min.y > 2) |
---|
| 8132 | + if (sourcenode != null && !sourcenode.name.contains("rclab")) |
---|
8005 | 8133 | { |
---|
8006 | | -// sourcenode.getBounds(min, max, true); |
---|
8007 | | - sourcenode.getBounds(v0, v1, true); |
---|
8008 | | -// sourcenode.toParent = sourcenode.toParent; |
---|
8009 | | -// get(0).toParent = get(0).toParent; |
---|
8010 | | -// sourcenode.GlobalTransform(); |
---|
| 8134 | + getBounds(min, max, true); |
---|
| 8135 | + |
---|
| 8136 | + if (min.y != Double.POSITIVE_INFINITY && min.y > 2) |
---|
| 8137 | + { |
---|
| 8138 | + // sourcenode.getBounds(min, max, true); |
---|
| 8139 | + sourcenode.getBounds(v0, v1, true); |
---|
| 8140 | + // sourcenode.toParent = sourcenode.toParent; |
---|
| 8141 | + // get(0).toParent = get(0).toParent; |
---|
| 8142 | + // sourcenode.GlobalTransform(); |
---|
| 8143 | + } |
---|
8011 | 8144 | } |
---|
8012 | 8145 | } |
---|
8013 | 8146 | |
---|
.. | .. |
---|
8016 | 8149 | if (support != null) |
---|
8017 | 8150 | { |
---|
8018 | 8151 | assert(bRep != null); |
---|
8019 | | - GraphreeD.Assert(support.bRep == bRep.support); |
---|
| 8152 | + if (!(support instanceof GenericJoint)) // support.bRep != null) |
---|
| 8153 | + GrafreeD.Assert(support.bRep == bRep.support); |
---|
8020 | 8154 | } |
---|
8021 | 8155 | else |
---|
8022 | 8156 | { |
---|
.. | .. |
---|
8099 | 8233 | { |
---|
8100 | 8234 | Object3D targ = this; |
---|
8101 | 8235 | |
---|
| 8236 | + targ.NORMALPUSH = obj.NORMALPUSH; |
---|
| 8237 | + |
---|
8102 | 8238 | if (obj.material != null) |
---|
8103 | 8239 | { |
---|
8104 | 8240 | if ((mask&MATERIAL)!=0) // ==(COLOR|MATERIAL)) |
---|