.. | .. |
---|
954 | 954 | |
---|
955 | 955 | public Object clone() |
---|
956 | 956 | { |
---|
957 | | - return GrafreeD.clone(this); |
---|
| 957 | + return Grafreed.clone(this); |
---|
958 | 958 | } |
---|
959 | 959 | |
---|
960 | 960 | Object3D copyExpand() |
---|
.. | .. |
---|
1729 | 1729 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1730 | 1730 | o.bRep = transientrep; |
---|
1731 | 1731 | if (clone) |
---|
1732 | | - o.bRep = (BoundaryRep) GrafreeD.clone(transientrep); |
---|
| 1732 | + o.bRep = (BoundaryRep) Grafreed.clone(transientrep); |
---|
1733 | 1733 | o.CreateMaterial(); |
---|
1734 | 1734 | o.SetAttributes(this, -1); |
---|
1735 | 1735 | //parent |
---|
.. | .. |
---|
1742 | 1742 | Object3D o = new Object3D((clone?"Ge:":"Li:") + this.name); |
---|
1743 | 1743 | o.bRep = bRep; |
---|
1744 | 1744 | if (clone) |
---|
1745 | | - o.bRep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
| 1745 | + o.bRep = (BoundaryRep) Grafreed.clone(bRep); |
---|
1746 | 1746 | o.CreateMaterial(); |
---|
1747 | 1747 | //o.overwriteThis(this, -1); |
---|
1748 | 1748 | o.SetAttributes(this, -1); |
---|
.. | .. |
---|
2477 | 2477 | return retval; |
---|
2478 | 2478 | } |
---|
2479 | 2479 | |
---|
2480 | | - void doEditDrag(ClickInfo info) |
---|
| 2480 | + void doEditDrag(ClickInfo info, boolean opposite) |
---|
2481 | 2481 | { |
---|
2482 | 2482 | switch (doSomething) |
---|
2483 | 2483 | { |
---|
2484 | 2484 | case 1: // '\001' |
---|
2485 | 2485 | //super. |
---|
2486 | | - doEditDrag0(info); |
---|
| 2486 | + doEditDrag0(info, opposite); |
---|
2487 | 2487 | break; |
---|
2488 | 2488 | |
---|
2489 | 2489 | case 2: // '\002' |
---|
.. | .. |
---|
2496 | 2496 | { |
---|
2497 | 2497 | //sel.hitSomething = childToDrag.hitSomething; |
---|
2498 | 2498 | //childToDrag.doEditDrag(info); |
---|
2499 | | - sel.doEditDrag(info); |
---|
| 2499 | + sel.doEditDrag(info, opposite); |
---|
2500 | 2500 | } else |
---|
2501 | 2501 | { |
---|
2502 | 2502 | //super. |
---|
2503 | | - doEditDrag0(info); |
---|
| 2503 | + doEditDrag0(info, opposite); |
---|
2504 | 2504 | } |
---|
2505 | 2505 | } |
---|
2506 | 2506 | break; |
---|
.. | .. |
---|
3204 | 3204 | |
---|
3205 | 3205 | BoundaryRep sup = bRep.support; |
---|
3206 | 3206 | bRep.support = null; |
---|
3207 | | - BoundaryRep temprep = (BoundaryRep) GrafreeD.clone(bRep); |
---|
| 3207 | + BoundaryRep temprep = (BoundaryRep) Grafreed.clone(bRep); |
---|
3208 | 3208 | // bRep.SplitInTwo(onlyone); // thread... |
---|
3209 | 3209 | temprep.SplitInTwo(reduction34, onlyone); |
---|
3210 | 3210 | bRep = temprep; |
---|
.. | .. |
---|
3728 | 3728 | if (child == null) |
---|
3729 | 3729 | continue; |
---|
3730 | 3730 | |
---|
3731 | | - if (GrafreeD.RENDERME > 0) |
---|
| 3731 | + if (Grafreed.RENDERME > 0) |
---|
3732 | 3732 | { |
---|
3733 | 3733 | if (child instanceof Merge) |
---|
3734 | 3734 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
3879 | 3879 | if (child == null) |
---|
3880 | 3880 | continue; |
---|
3881 | 3881 | |
---|
3882 | | - if (GrafreeD.RENDERME > 0) |
---|
| 3882 | + if (Grafreed.RENDERME > 0) |
---|
3883 | 3883 | { |
---|
3884 | 3884 | if (child instanceof Merge) |
---|
3885 | 3885 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
4074 | 4074 | if (child == null) |
---|
4075 | 4075 | continue; |
---|
4076 | 4076 | |
---|
4077 | | - if (GrafreeD.RENDERME > 0) |
---|
| 4077 | + if (Grafreed.RENDERME > 0) |
---|
4078 | 4078 | { |
---|
4079 | 4079 | if (child instanceof Merge) |
---|
4080 | 4080 | ((Merge)child).renderme(); |
---|
.. | .. |
---|
5159 | 5159 | |
---|
5160 | 5160 | // System.out.println("Fullname = " + fullname); |
---|
5161 | 5161 | |
---|
5162 | | - if (fullname.name.indexOf(":") == -1) |
---|
5163 | | - return fullname.name; |
---|
| 5162 | + // Does not work on Windows due to C: |
---|
| 5163 | +// if (fullname.name.indexOf(":") == -1) |
---|
| 5164 | +// return fullname.name; |
---|
| 5165 | +// |
---|
| 5166 | +// return fullname.name.substring(0,fullname.name.indexOf(":")); |
---|
5164 | 5167 | |
---|
5165 | | - return fullname.name.substring(0,fullname.name.indexOf(":")); |
---|
| 5168 | + String[] split = fullname.name.split(":"); |
---|
| 5169 | + |
---|
| 5170 | + if (split.length == 0) |
---|
| 5171 | + { |
---|
| 5172 | + return ""; |
---|
| 5173 | + } |
---|
| 5174 | + |
---|
| 5175 | + if (split.length <= 2) |
---|
| 5176 | + { |
---|
| 5177 | + if (fullname.name.endsWith(":")) |
---|
| 5178 | + { |
---|
| 5179 | + // Windows |
---|
| 5180 | + return fullname.name.substring(0, fullname.name.length()-1); |
---|
| 5181 | + } |
---|
| 5182 | + |
---|
| 5183 | + return split[0]; |
---|
| 5184 | + } |
---|
| 5185 | + |
---|
| 5186 | + // Windows |
---|
| 5187 | + assert(split.length == 4); |
---|
| 5188 | + |
---|
| 5189 | + return split[0] + ":" + split[1]; |
---|
5166 | 5190 | } |
---|
5167 | 5191 | |
---|
5168 | 5192 | static String GetBump(cTexture fullname) |
---|
.. | .. |
---|
5171 | 5195 | return ""; |
---|
5172 | 5196 | |
---|
5173 | 5197 | // System.out.println("Fullname = " + fullname); |
---|
5174 | | - if (fullname.name.indexOf(":") == -1) |
---|
5175 | | - return ""; |
---|
5176 | | - |
---|
5177 | | - return fullname.name.substring(fullname.name.indexOf(":")+1,fullname.name.length()); |
---|
| 5198 | + // Does not work on Windows due to C: |
---|
| 5199 | +// if (fullname.name.indexOf(":") == -1) |
---|
| 5200 | +// return ""; |
---|
| 5201 | +// |
---|
| 5202 | +// return fullname.name.substring(fullname.name.indexOf(":")+1,fullname.name.length()); |
---|
| 5203 | + String[] split = fullname.name.split(":"); |
---|
| 5204 | + |
---|
| 5205 | + if (split.length == 0) |
---|
| 5206 | + { |
---|
| 5207 | + return ""; |
---|
| 5208 | + } |
---|
| 5209 | + |
---|
| 5210 | + if (split.length == 1) |
---|
| 5211 | + { |
---|
| 5212 | + return ""; |
---|
| 5213 | + } |
---|
| 5214 | + |
---|
| 5215 | + if (split.length == 2) |
---|
| 5216 | + { |
---|
| 5217 | + if (fullname.name.endsWith(":")) |
---|
| 5218 | + { |
---|
| 5219 | + // Windows |
---|
| 5220 | + return ""; |
---|
| 5221 | + } |
---|
| 5222 | + |
---|
| 5223 | + return split[1]; |
---|
| 5224 | + } |
---|
| 5225 | + |
---|
| 5226 | + // Windows |
---|
| 5227 | + assert(split.length == 4); |
---|
| 5228 | + |
---|
| 5229 | + return split[2] + ":" + split[3]; |
---|
5178 | 5230 | } |
---|
5179 | 5231 | |
---|
5180 | 5232 | String GetPigmentTexture() |
---|
.. | .. |
---|
5248 | 5300 | System.out.print("; textures = " + textures); |
---|
5249 | 5301 | System.out.println("; usedtextures = " + usedtextures); |
---|
5250 | 5302 | |
---|
5251 | | - if (GetTextures() == null) |
---|
| 5303 | + if (GetTextures() == null) // What is that?? |
---|
5252 | 5304 | GetTextures().name = ":"; |
---|
5253 | 5305 | |
---|
5254 | 5306 | String texname = tex; |
---|
.. | .. |
---|
6932 | 6984 | } |
---|
6933 | 6985 | |
---|
6934 | 6986 | //System.out.println("info.modifiers = " + info.modifiers); |
---|
6935 | | - modified = (info.modifiers & CameraPane.META) != 0; |
---|
| 6987 | + modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META |
---|
6936 | 6988 | //System.out.println("modified = " + modified); |
---|
6937 | 6989 | //new Exception().printStackTrace(); |
---|
6938 | 6990 | //viewCode = info.pane.renderCamera.viewCode; |
---|
.. | .. |
---|
6960 | 7012 | return true; |
---|
6961 | 7013 | } |
---|
6962 | 7014 | |
---|
6963 | | - void doEditDrag0(ClickInfo info) |
---|
| 7015 | + void doEditDrag0(ClickInfo info, boolean opposite) |
---|
6964 | 7016 | { |
---|
6965 | 7017 | if (hitSomething == 0) |
---|
6966 | 7018 | { |
---|
.. | .. |
---|
6987 | 7039 | |
---|
6988 | 7040 | scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance(); |
---|
6989 | 7041 | |
---|
6990 | | - if (modified) |
---|
| 7042 | + if (modified || opposite) |
---|
6991 | 7043 | { |
---|
6992 | 7044 | //assert(false); |
---|
6993 | 7045 | /* |
---|
.. | .. |
---|
7081 | 7133 | |
---|
7082 | 7134 | if (modified) |
---|
7083 | 7135 | { |
---|
| 7136 | + // Rotate 90 degrees |
---|
7084 | 7137 | angle /= (Math.PI / 4); |
---|
7085 | 7138 | angle = Math.floor(angle + 0.5); |
---|
7086 | 7139 | angle *= (Math.PI / 4); |
---|
.. | .. |
---|
7514 | 7567 | { |
---|
7515 | 7568 | assert(bRep != null); |
---|
7516 | 7569 | if (!(support instanceof GenericJoint)) // support.bRep != null) |
---|
7517 | | - GrafreeD.Assert(support.bRep == bRep.support); |
---|
| 7570 | + Grafreed.Assert(support.bRep == bRep.support); |
---|
7518 | 7571 | } |
---|
7519 | 7572 | else |
---|
7520 | 7573 | { |
---|