.. | .. |
---|
3837 | 3837 | if (n == null) |
---|
3838 | 3838 | continue; |
---|
3839 | 3839 | |
---|
| 3840 | + if (v.norm == null) |
---|
| 3841 | + v.norm = new cVector(); |
---|
| 3842 | + |
---|
3840 | 3843 | LA.vecCopy(n, v.norm); |
---|
3841 | 3844 | |
---|
3842 | 3845 | this.SetVertex(v, i); |
---|
.. | .. |
---|
72 | 72 | { |
---|
73 | 73 | super.SetupUI2(oe); |
---|
74 | 74 | |
---|
75 | | - oe.ctrlPanel.add(optionCB = new JCheckBox("Close Surface", box.open)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 75 | + oe.ctrlPanel.add(optionCB = new JCheckBox("Close Surface", !box.open)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
76 | 76 | optionCB.addItemListener(this); |
---|
77 | 77 | oe.ctrlPanel.Return(); |
---|
78 | 78 | } |
---|
.. | .. |
---|
82 | 82 | if (//e.getSource() == nameField || |
---|
83 | 83 | e.getSource() == optionCB) |
---|
84 | 84 | { |
---|
85 | | - box.open = (e.getStateChange() == ItemEvent.SELECTED); |
---|
| 85 | + box.open = (e.getStateChange() != ItemEvent.SELECTED); |
---|
86 | 86 | |
---|
87 | 87 | applySelf(); |
---|
88 | 88 | |
---|
.. | .. |
---|
174 | 174 | boolean Udebug = false; |
---|
175 | 175 | boolean Vdebug = false; |
---|
176 | 176 | boolean NORMALdebug = false; |
---|
177 | | - static boolean doublesided = false; // true; // reversed normals are awful for conformance |
---|
| 177 | + static boolean doublesided = true; // false; // reversed normals are awful for conformance |
---|
178 | 178 | boolean anisotropy = true; |
---|
179 | 179 | boolean softshadow = true; // slower but better false; |
---|
180 | 180 | boolean opacityhalo = false; // reverse the halo effect (e.g. glass) |
---|
.. | .. |
---|
14830 | 14830 | } |
---|
14831 | 14831 | PingThread pingthread = new PingThread(); |
---|
14832 | 14832 | int delta = 2; |
---|
14833 | | - int speed = 5; |
---|
| 14833 | + int speed = 2; |
---|
14834 | 14834 | boolean autorepeat = false; |
---|
14835 | 14835 | |
---|
14836 | 14836 | void GoDown(int mod) |
---|
.. | .. |
---|
94 | 94 | this.objfile = objfile; |
---|
95 | 95 | } |
---|
96 | 96 | |
---|
| 97 | + void ExtractBigData(Object3D o) |
---|
| 98 | + { |
---|
| 99 | + super.ExtractBigData(o); |
---|
| 100 | + |
---|
| 101 | + o.savefilecontent = this.filecontent; |
---|
| 102 | + |
---|
| 103 | + // filecontent transient |
---|
| 104 | + } |
---|
| 105 | + |
---|
| 106 | + void RestoreBigData(Object3D o) |
---|
| 107 | + { |
---|
| 108 | + super.RestoreBigData(o); |
---|
| 109 | + |
---|
| 110 | + this.filecontent = o.savefilecontent; |
---|
| 111 | + } |
---|
| 112 | + |
---|
97 | 113 | Object3D deepCopy() |
---|
98 | 114 | { |
---|
99 | 115 | FileObject e = new FileObject(name, objfile); |
---|
.. | .. |
---|
6010 | 6010 | |
---|
6011 | 6011 | //? SetUndoStates(); |
---|
6012 | 6012 | |
---|
| 6013 | + cameraView.RevertCamera(); |
---|
| 6014 | + |
---|
6013 | 6015 | ResetModel(); |
---|
6014 | 6016 | copy.HardTouch(); // recompile? |
---|
6015 | 6017 | refreshContents(); |
---|
.. | .. |
---|
25 | 25 | // Use GetUUID for backward compatibility with null. |
---|
26 | 26 | private UUID uuid = UUID.randomUUID(); |
---|
27 | 27 | |
---|
28 | | - // TEMPORARY for mocap undo. No need to be transient. |
---|
| 28 | + // TEMPORARY for versions. No need to be transient. |
---|
29 | 29 | mocap.reader.BVHReader.BVHResult savebvh; |
---|
30 | 30 | Object3D saveskeleton; |
---|
| 31 | + |
---|
| 32 | + // FileObject |
---|
| 33 | + Object3D savefilecontent; |
---|
31 | 34 | // |
---|
32 | 35 | |
---|
33 | 36 | String skyboxname; |
---|
.. | .. |
---|
3263 | 3266 | { |
---|
3264 | 3267 | if (bRep != null) |
---|
3265 | 3268 | { |
---|
| 3269 | + //bRep.GenerateNormals2(crease); // in-place doesn't work. it gives wrong normals (diamond artifact). |
---|
3266 | 3270 | bRep.GenerateNormals(crease); |
---|
| 3271 | + if (!bRep.trimmed) |
---|
| 3272 | + bRep.MergeNormals(); |
---|
3267 | 3273 | Touch(); |
---|
3268 | 3274 | } |
---|
3269 | 3275 | } |
---|