.. | .. |
---|
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() |
---|
.. | .. |
---|
1701 | 1701 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1702 | 1702 | o.bRep = transientrep; |
---|
1703 | 1703 | if (clone) |
---|
1704 | | - o.bRep = (BoundaryRep) GraphreeD.clone(transientrep); |
---|
| 1704 | + o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); |
---|
1705 | 1705 | o.CreateMaterial(); |
---|
1706 | 1706 | o.SetAttributes(this, -1); |
---|
1707 | 1707 | //parent |
---|
.. | .. |
---|
1714 | 1714 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1715 | 1715 | o.bRep = bRep; |
---|
1716 | 1716 | if (clone) |
---|
1717 | | - o.bRep = (BoundaryRep) GraphreeD.clone(bRep); |
---|
| 1717 | + o.bRep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
1718 | 1718 | o.CreateMaterial(); |
---|
1719 | 1719 | //o.overwriteThis(this, -1); |
---|
1720 | 1720 | o.SetAttributes(this, -1); |
---|
.. | .. |
---|
1756 | 1756 | // { |
---|
1757 | 1757 | // assert(bRep == null); |
---|
1758 | 1758 | // Object3D o = new Object3D("Geometry:" + this.name); |
---|
1759 | | -// o.bRep = (BoundaryRep) GraphreeD.clone(transientrep); |
---|
| 1759 | +// o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); |
---|
1760 | 1760 | // o.CreateMaterial(); |
---|
1761 | 1761 | // parent.addChild(o); |
---|
1762 | 1762 | // } |
---|
.. | .. |
---|
1765 | 1765 | // { |
---|
1766 | 1766 | // assert(transientrep == null); |
---|
1767 | 1767 | // Object3D o = new Object3D("Geometry:" + this.name); |
---|
1768 | | -// o.bRep = (BoundaryRep) GraphreeD.clone(bRep); |
---|
| 1768 | +// o.bRep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
1769 | 1769 | // o.CreateMaterial(); |
---|
1770 | 1770 | // parent.addChild(o); |
---|
1771 | 1771 | // } |
---|
.. | .. |
---|
3153 | 3153 | |
---|
3154 | 3154 | BoundaryRep sup = bRep.support; |
---|
3155 | 3155 | bRep.support = null; |
---|
3156 | | - BoundaryRep temprep = (BoundaryRep) GraphreeD.clone(bRep); |
---|
| 3156 | + BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
3157 | 3157 | // bRep.SplitInTwo(onlyone); // thread... |
---|
3158 | 3158 | temprep.SplitInTwo(reduction34, onlyone); |
---|
3159 | 3159 | bRep = temprep; |
---|
.. | .. |
---|
3677 | 3677 | if (child == null) |
---|
3678 | 3678 | continue; |
---|
3679 | 3679 | |
---|
3680 | | - if (GraphreeD.RENDERME > 0) |
---|
| 3680 | + if (GrafreeD.RENDERME > 0) |
---|
3681 | 3681 | { |
---|
3682 | 3682 | if (child instanceof Merge) |
---|
3683 | 3683 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
3717 | 3717 | |
---|
3718 | 3718 | boolean getCentroid(cVector centroid, boolean xform) |
---|
3719 | 3719 | { |
---|
3720 | | - assert(false); |
---|
| 3720 | +// for speaker assert(false); |
---|
3721 | 3721 | if (blockloop) |
---|
3722 | 3722 | return false; |
---|
3723 | 3723 | |
---|
.. | .. |
---|
3828 | 3828 | if (child == null) |
---|
3829 | 3829 | continue; |
---|
3830 | 3830 | |
---|
3831 | | - if (GraphreeD.RENDERME > 0) |
---|
| 3831 | + if (GrafreeD.RENDERME > 0) |
---|
3832 | 3832 | { |
---|
3833 | 3833 | if (child instanceof Merge) |
---|
3834 | 3834 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4023 | 4023 | if (child == null) |
---|
4024 | 4024 | continue; |
---|
4025 | 4025 | |
---|
4026 | | - if (GraphreeD.RENDERME > 0) |
---|
| 4026 | + if (GrafreeD.RENDERME > 0) |
---|
4027 | 4027 | { |
---|
4028 | 4028 | if (child instanceof Merge) |
---|
4029 | 4029 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4515 | 4515 | |
---|
4516 | 4516 | Object3D GetFileRoot() |
---|
4517 | 4517 | { |
---|
| 4518 | + if (overflow) |
---|
| 4519 | + return null; |
---|
| 4520 | + |
---|
| 4521 | + overflow = true; |
---|
| 4522 | + |
---|
| 4523 | + Object3D pfr = null; |
---|
| 4524 | + |
---|
4518 | 4525 | if (parent == null && fileparent == null) |
---|
4519 | | - return this; |
---|
| 4526 | + pfr = this; |
---|
4520 | 4527 | |
---|
4521 | 4528 | if (parent == null && fileparent != null) // V4.gfd??? |
---|
4522 | | - return fileparent; |
---|
| 4529 | + pfr = fileparent; |
---|
4523 | 4530 | |
---|
4524 | | - if (parent == null) |
---|
4525 | | - return this; |
---|
| 4531 | + if (pfr == null && parent == null) |
---|
| 4532 | + pfr = this; |
---|
4526 | 4533 | |
---|
4527 | | - return parent.GetFileRoot(); |
---|
| 4534 | + if (pfr == null) |
---|
| 4535 | + pfr = parent.GetFileRoot(); |
---|
| 4536 | + |
---|
| 4537 | + overflow = false; |
---|
| 4538 | + |
---|
| 4539 | + return pfr; |
---|
4528 | 4540 | } |
---|
4529 | 4541 | |
---|
4530 | 4542 | cTreePath GetPath() |
---|
.. | .. |
---|
5280 | 5292 | if (name != null && name.contains("sclera")) |
---|
5281 | 5293 | name = name; |
---|
5282 | 5294 | |
---|
5283 | | - if (this instanceof CheckerIG) |
---|
| 5295 | + if (this instanceof Checker) |
---|
5284 | 5296 | return; |
---|
5285 | 5297 | |
---|
5286 | 5298 | if (display.drawMode == display.SHADOW && PASSTEST) |
---|
.. | .. |
---|
5507 | 5519 | display.options2[2] = material.factor; |
---|
5508 | 5520 | |
---|
5509 | 5521 | cColor.HSBtoRGB(material.color, material.modulation, 1, display.options3); |
---|
5510 | | - display.options3[3] = material.cameralight/0.2f; |
---|
| 5522 | + display.options4[0] = material.cameralight/0.2f; |
---|
| 5523 | + display.options4[1] = material.subsurface; |
---|
| 5524 | + display.options4[2] = material.sheen; |
---|
5511 | 5525 | |
---|
5512 | 5526 | // if (display.CURRENTANTIALIAS > 0) |
---|
5513 | 5527 | // display.options3[3] /= 4; |
---|
.. | .. |
---|
5807 | 5821 | if (!child.HasTransparency()) |
---|
5808 | 5822 | { |
---|
5809 | 5823 | sel = root != null && root.selection != null && root.selection.indexOf(child) != -1; |
---|
5810 | | - // GraphreeD.tracein("draw ", child); |
---|
| 5824 | + // GrafreeD.tracein("draw ", child); |
---|
5811 | 5825 | boolean wasblocked = blockdraw; |
---|
5812 | 5826 | blockdraw = true; |
---|
5813 | 5827 | child.draw(display, root, selected || sel, wasblocked || blocked); // || child.IsSelected()); |
---|
5814 | 5828 | blockdraw = false; |
---|
5815 | | - // GraphreeD.traceout("draw ", child); |
---|
| 5829 | + // GrafreeD.traceout("draw ", child); |
---|
5816 | 5830 | } |
---|
5817 | 5831 | |
---|
5818 | 5832 | release(i); |
---|
.. | .. |
---|
7735 | 7749 | info.pane.repaint(); |
---|
7736 | 7750 | } |
---|
7737 | 7751 | |
---|
| 7752 | + boolean overflow = false; |
---|
| 7753 | + |
---|
7738 | 7754 | void TransformToWorld(cVector out) // , cVector out) |
---|
7739 | 7755 | { |
---|
| 7756 | + if (overflow) |
---|
| 7757 | + return; |
---|
| 7758 | + |
---|
| 7759 | + overflow = true; |
---|
| 7760 | + |
---|
7740 | 7761 | // june 2013 ??? assert (in == out); |
---|
7741 | 7762 | cVector in = out; |
---|
7742 | 7763 | if (toParent != null && !(this instanceof Texture || this instanceof TextureNode)) |
---|
.. | .. |
---|
7753 | 7774 | { |
---|
7754 | 7775 | (parent!=null?parent:fileparent).TransformToWorld(out); //, out); |
---|
7755 | 7776 | } |
---|
| 7777 | + |
---|
| 7778 | + overflow = false; |
---|
7756 | 7779 | } |
---|
7757 | 7780 | |
---|
7758 | 7781 | void TransformToLocal(cVector out) //, cVector out) |
---|
.. | .. |
---|
7995 | 8018 | max = new cVector(); |
---|
7996 | 8019 | } |
---|
7997 | 8020 | |
---|
7998 | | - Object3D sourcenode = GetFileRoot(); |
---|
7999 | | - |
---|
8000 | | - if (!sourcenode.name.contains("rclab")) |
---|
| 8021 | + if (false) // Can crawl!! |
---|
8001 | 8022 | { |
---|
8002 | | - getBounds(min, max, true); |
---|
| 8023 | + Object3D sourcenode = GetFileRoot(); |
---|
8003 | 8024 | |
---|
8004 | | - if (min.y != Double.POSITIVE_INFINITY && min.y > 2) |
---|
| 8025 | + if (sourcenode != null && !sourcenode.name.contains("rclab")) |
---|
8005 | 8026 | { |
---|
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(); |
---|
| 8027 | + getBounds(min, max, true); |
---|
| 8028 | + |
---|
| 8029 | + if (min.y != Double.POSITIVE_INFINITY && min.y > 2) |
---|
| 8030 | + { |
---|
| 8031 | + // sourcenode.getBounds(min, max, true); |
---|
| 8032 | + sourcenode.getBounds(v0, v1, true); |
---|
| 8033 | + // sourcenode.toParent = sourcenode.toParent; |
---|
| 8034 | + // get(0).toParent = get(0).toParent; |
---|
| 8035 | + // sourcenode.GlobalTransform(); |
---|
| 8036 | + } |
---|
8011 | 8037 | } |
---|
8012 | 8038 | } |
---|
8013 | 8039 | |
---|
.. | .. |
---|
8016 | 8042 | if (support != null) |
---|
8017 | 8043 | { |
---|
8018 | 8044 | assert(bRep != null); |
---|
8019 | | - GraphreeD.Assert(support.bRep == bRep.support); |
---|
| 8045 | + if (!(support instanceof GenericJoint)) // support.bRep != null) |
---|
| 8046 | + GrafreeD.Assert(support.bRep == bRep.support); |
---|
8020 | 8047 | } |
---|
8021 | 8048 | else |
---|
8022 | 8049 | { |
---|