.. | .. |
---|
355 | 355 | |
---|
356 | 356 | int MemorySize() |
---|
357 | 357 | { |
---|
358 | | - if (memorysize == 0) |
---|
| 358 | + if (true) // memorysize == 0) |
---|
359 | 359 | { |
---|
360 | 360 | try |
---|
361 | 361 | { |
---|
.. | .. |
---|
935 | 935 | |
---|
936 | 936 | public Object clone() |
---|
937 | 937 | { |
---|
938 | | - return GraphreeD.clone(this); |
---|
| 938 | + return GrafreeD.clone(this); |
---|
939 | 939 | } |
---|
940 | 940 | |
---|
941 | 941 | Object3D copyExpand() |
---|
.. | .. |
---|
1446 | 1446 | // if (other == null) |
---|
1447 | 1447 | // return; |
---|
1448 | 1448 | |
---|
1449 | | - System.out.println("Link support this = " + this + "; other = " + other); |
---|
| 1449 | + if (other != null) |
---|
| 1450 | + { |
---|
| 1451 | + BoundaryRep.SEUIL = other.material.cameralight; |
---|
| 1452 | + |
---|
| 1453 | + // Set default to 0.1 |
---|
| 1454 | + BoundaryRep.SEUIL /= 2; |
---|
| 1455 | + System.out.println("SEUIL = " + BoundaryRep.SEUIL); |
---|
| 1456 | + } |
---|
| 1457 | + |
---|
| 1458 | + System.out.println("Link this = " + this + "; support = " + other); |
---|
1450 | 1459 | |
---|
1451 | 1460 | //if (bRep != null) |
---|
1452 | 1461 | // bRep.linkVerticesThis(other.bRep); |
---|
.. | .. |
---|
1701 | 1710 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1702 | 1711 | o.bRep = transientrep; |
---|
1703 | 1712 | if (clone) |
---|
1704 | | - o.bRep = (BoundaryRep) GraphreeD.clone(transientrep); |
---|
| 1713 | + o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); |
---|
1705 | 1714 | o.CreateMaterial(); |
---|
1706 | 1715 | o.SetAttributes(this, -1); |
---|
1707 | 1716 | //parent |
---|
.. | .. |
---|
1714 | 1723 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1715 | 1724 | o.bRep = bRep; |
---|
1716 | 1725 | if (clone) |
---|
1717 | | - o.bRep = (BoundaryRep) GraphreeD.clone(bRep); |
---|
| 1726 | + o.bRep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
1718 | 1727 | o.CreateMaterial(); |
---|
1719 | 1728 | //o.overwriteThis(this, -1); |
---|
1720 | 1729 | o.SetAttributes(this, -1); |
---|
.. | .. |
---|
1756 | 1765 | // { |
---|
1757 | 1766 | // assert(bRep == null); |
---|
1758 | 1767 | // Object3D o = new Object3D("Geometry:" + this.name); |
---|
1759 | | -// o.bRep = (BoundaryRep) GraphreeD.clone(transientrep); |
---|
| 1768 | +// o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); |
---|
1760 | 1769 | // o.CreateMaterial(); |
---|
1761 | 1770 | // parent.addChild(o); |
---|
1762 | 1771 | // } |
---|
.. | .. |
---|
1765 | 1774 | // { |
---|
1766 | 1775 | // assert(transientrep == null); |
---|
1767 | 1776 | // Object3D o = new Object3D("Geometry:" + this.name); |
---|
1768 | | -// o.bRep = (BoundaryRep) GraphreeD.clone(bRep); |
---|
| 1777 | +// o.bRep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
1769 | 1778 | // o.CreateMaterial(); |
---|
1770 | 1779 | // parent.addChild(o); |
---|
1771 | 1780 | // } |
---|
.. | .. |
---|
1816 | 1825 | if (obj.name == null) |
---|
1817 | 1826 | continue; // can't be a null one |
---|
1818 | 1827 | |
---|
1819 | | - //if (n.contains(obj.name)) // dec 2013 name.split(":")[0])) // Poser generates a count |
---|
1820 | | - if (n.startsWith(obj.name)) |
---|
| 1828 | + String name = obj.name.split(":")[0]; // Poser generates a count |
---|
| 1829 | + //if (n.startsWith(obj.name)) |
---|
| 1830 | + if (n.contains(name)) |
---|
1821 | 1831 | { |
---|
1822 | 1832 | theobj = obj; |
---|
1823 | 1833 | count++; |
---|
.. | .. |
---|
2732 | 2742 | blockloop = false; |
---|
2733 | 2743 | } |
---|
2734 | 2744 | |
---|
| 2745 | + void GenNormalsMINE() |
---|
| 2746 | + { |
---|
| 2747 | + if (blockloop) |
---|
| 2748 | + return; |
---|
| 2749 | + |
---|
| 2750 | + blockloop = true; |
---|
| 2751 | + GenNormalsMINE0(); |
---|
| 2752 | + for (int i = 0; i < Children().Size(); i++) |
---|
| 2753 | + { |
---|
| 2754 | + Object3D child = (Object3D) Children().get(i); // reserve(i); |
---|
| 2755 | + if (child == null) |
---|
| 2756 | + continue; |
---|
| 2757 | + child.GenNormalsMINE(); |
---|
| 2758 | +// Children().release(i); |
---|
| 2759 | + } |
---|
| 2760 | + blockloop = false; |
---|
| 2761 | + } |
---|
| 2762 | + |
---|
2735 | 2763 | void ClearColors() |
---|
2736 | 2764 | { |
---|
2737 | 2765 | if (blockloop) |
---|
.. | .. |
---|
2876 | 2904 | if (bRep != null) |
---|
2877 | 2905 | { |
---|
2878 | 2906 | bRep.GenerateNormals(crease); |
---|
| 2907 | + Touch(); |
---|
| 2908 | + } |
---|
| 2909 | + } |
---|
| 2910 | + |
---|
| 2911 | + void GenNormalsMINE0() |
---|
| 2912 | + { |
---|
| 2913 | + if (bRep != null) |
---|
| 2914 | + { |
---|
| 2915 | + bRep.GenerateNormalsMINE(); |
---|
2879 | 2916 | Touch(); |
---|
2880 | 2917 | } |
---|
2881 | 2918 | } |
---|
.. | .. |
---|
3153 | 3190 | |
---|
3154 | 3191 | BoundaryRep sup = bRep.support; |
---|
3155 | 3192 | bRep.support = null; |
---|
3156 | | - BoundaryRep temprep = (BoundaryRep) GraphreeD.clone(bRep); |
---|
| 3193 | + BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
3157 | 3194 | // bRep.SplitInTwo(onlyone); // thread... |
---|
3158 | 3195 | temprep.SplitInTwo(reduction34, onlyone); |
---|
3159 | 3196 | bRep = temprep; |
---|
.. | .. |
---|
3677 | 3714 | if (child == null) |
---|
3678 | 3715 | continue; |
---|
3679 | 3716 | |
---|
3680 | | - if (GraphreeD.RENDERME > 0) |
---|
| 3717 | + if (GrafreeD.RENDERME > 0) |
---|
3681 | 3718 | { |
---|
3682 | 3719 | if (child instanceof Merge) |
---|
3683 | 3720 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
3828 | 3865 | if (child == null) |
---|
3829 | 3866 | continue; |
---|
3830 | 3867 | |
---|
3831 | | - if (GraphreeD.RENDERME > 0) |
---|
| 3868 | + if (GrafreeD.RENDERME > 0) |
---|
3832 | 3869 | { |
---|
3833 | 3870 | if (child instanceof Merge) |
---|
3834 | 3871 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4023 | 4060 | if (child == null) |
---|
4024 | 4061 | continue; |
---|
4025 | 4062 | |
---|
4026 | | - if (GraphreeD.RENDERME > 0) |
---|
| 4063 | + if (GrafreeD.RENDERME > 0) |
---|
4027 | 4064 | { |
---|
4028 | 4065 | if (child instanceof Merge) |
---|
4029 | 4066 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4111 | 4148 | if (blockloop) |
---|
4112 | 4149 | return; |
---|
4113 | 4150 | |
---|
4114 | | - for (int i=0; i<size(); i++) |
---|
| 4151 | + for (int i=0; i<Size(); i++) |
---|
4115 | 4152 | { |
---|
4116 | 4153 | if (get(i).parent != this) |
---|
4117 | 4154 | { |
---|
.. | .. |
---|
5519 | 5556 | display.options2[2] = material.factor; |
---|
5520 | 5557 | |
---|
5521 | 5558 | cColor.HSBtoRGB(material.color, material.modulation, 1, display.options3); |
---|
5522 | | - display.options3[3] = material.cameralight/0.2f; |
---|
| 5559 | + display.options4[0] = material.cameralight/0.2f; |
---|
| 5560 | + display.options4[1] = material.subsurface; |
---|
| 5561 | + display.options4[2] = material.sheen; |
---|
5523 | 5562 | |
---|
5524 | 5563 | // if (display.CURRENTANTIALIAS > 0) |
---|
5525 | 5564 | // display.options3[3] /= 4; |
---|
.. | .. |
---|
5819 | 5858 | if (!child.HasTransparency()) |
---|
5820 | 5859 | { |
---|
5821 | 5860 | sel = root != null && root.selection != null && root.selection.indexOf(child) != -1; |
---|
5822 | | - // GraphreeD.tracein("draw ", child); |
---|
| 5861 | + // GrafreeD.tracein("draw ", child); |
---|
5823 | 5862 | boolean wasblocked = blockdraw; |
---|
5824 | 5863 | blockdraw = true; |
---|
5825 | 5864 | child.draw(display, root, selected || sel, wasblocked || blocked); // || child.IsSelected()); |
---|
5826 | 5865 | blockdraw = false; |
---|
5827 | | - // GraphreeD.traceout("draw ", child); |
---|
| 5866 | + // GrafreeD.traceout("draw ", child); |
---|
5828 | 5867 | } |
---|
5829 | 5868 | |
---|
5830 | 5869 | release(i); |
---|
.. | .. |
---|
7731 | 7770 | if (parent == null) |
---|
7732 | 7771 | { |
---|
7733 | 7772 | System.out.println("NULL PARENT"); |
---|
7734 | | - new Exception().printStackTrace(); |
---|
| 7773 | + //new Exception().printStackTrace(); |
---|
7735 | 7774 | } else |
---|
7736 | 7775 | { |
---|
7737 | 7776 | if (parent instanceof BezierPatch) |
---|
.. | .. |
---|
8041 | 8080 | { |
---|
8042 | 8081 | assert(bRep != null); |
---|
8043 | 8082 | if (!(support instanceof GenericJoint)) // support.bRep != null) |
---|
8044 | | - GraphreeD.Assert(support.bRep == bRep.support); |
---|
| 8083 | + GrafreeD.Assert(support.bRep == bRep.support); |
---|
8045 | 8084 | } |
---|
8046 | 8085 | else |
---|
8047 | 8086 | { |
---|