Normand Briere
2019-09-06 078d75406ca983141627d87da5a49bd29abe4023
FileObject big data.
6 files modified
37 ■■■■ changed files
BoundaryRep.java 3 ●●●●● patch | view | raw | blame | history
BoxEditor.java 4 ●●●● patch | view | raw | blame | history
CameraPane.java 4 ●●●● patch | view | raw | blame | history
FileObject.java 16 ●●●●● patch | view | raw | blame | history
ObjEditor.java 2 ●●●●● patch | view | raw | blame | history
Object3D.java 8 ●●●● patch | view | raw | blame | history
BoundaryRep.java
....@@ -3837,6 +3837,9 @@
38373837 if (n == null)
38383838 continue;
38393839
3840
+ if (v.norm == null)
3841
+ v.norm = new cVector();
3842
+
38403843 LA.vecCopy(n, v.norm);
38413844
38423845 this.SetVertex(v, i);
BoxEditor.java
....@@ -72,7 +72,7 @@
7272 {
7373 super.SetupUI2(oe);
7474
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);
7676 optionCB.addItemListener(this);
7777 oe.ctrlPanel.Return();
7878 }
....@@ -82,7 +82,7 @@
8282 if (//e.getSource() == nameField ||
8383 e.getSource() == optionCB)
8484 {
85
- box.open = (e.getStateChange() == ItemEvent.SELECTED);
85
+ box.open = (e.getStateChange() != ItemEvent.SELECTED);
8686
8787 applySelf();
8888
CameraPane.java
....@@ -174,7 +174,7 @@
174174 boolean Udebug = false;
175175 boolean Vdebug = false;
176176 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
178178 boolean anisotropy = true;
179179 boolean softshadow = true; // slower but better false;
180180 boolean opacityhalo = false; // reverse the halo effect (e.g. glass)
....@@ -14830,7 +14830,7 @@
1483014830 }
1483114831 PingThread pingthread = new PingThread();
1483214832 int delta = 2;
14833
- int speed = 5;
14833
+ int speed = 2;
1483414834 boolean autorepeat = false;
1483514835
1483614836 void GoDown(int mod)
FileObject.java
....@@ -94,6 +94,22 @@
9494 this.objfile = objfile;
9595 }
9696
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
+
97113 Object3D deepCopy()
98114 {
99115 FileObject e = new FileObject(name, objfile);
ObjEditor.java
....@@ -6010,6 +6010,8 @@
60106010
60116011 //? SetUndoStates();
60126012
6013
+ cameraView.RevertCamera();
6014
+
60136015 ResetModel();
60146016 copy.HardTouch(); // recompile?
60156017 refreshContents();
Object3D.java
....@@ -25,9 +25,12 @@
2525 // Use GetUUID for backward compatibility with null.
2626 private UUID uuid = UUID.randomUUID();
2727
28
- // TEMPORARY for mocap undo. No need to be transient.
28
+ // TEMPORARY for versions. No need to be transient.
2929 mocap.reader.BVHReader.BVHResult savebvh;
3030 Object3D saveskeleton;
31
+
32
+ // FileObject
33
+ Object3D savefilecontent;
3134 //
3235
3336 String skyboxname;
....@@ -3263,7 +3266,10 @@
32633266 {
32643267 if (bRep != null)
32653268 {
3269
+ //bRep.GenerateNormals2(crease); // in-place doesn't work. it gives wrong normals (diamond artifact).
32663270 bRep.GenerateNormals(crease);
3271
+ if (!bRep.trimmed)
3272
+ bRep.MergeNormals();
32673273 Touch();
32683274 }
32693275 }