Normand Briere
2019-09-02 21ac57b36a9e3b909853c7d64ac29b7ad72490a3
BoundaryRep.java
....@@ -686,6 +686,7 @@
686686
687687 void RecomputeBasis(BoundaryRep other, double[][] toRoot, Vertex v)
688688 {
689
+ CameraPane.CreateSelectedPoint();
689690 CameraPane.selectedpoint.
690691 getAverage(cStatic.point1, true);
691692
....@@ -1003,6 +1004,7 @@
10031004
10041005 v.closestsupport = -1;
10051006
1007
+ CameraPane.CreateSelectedPoint();
10061008 CameraPane.selectedpoint.
10071009 getAverage(cStatic.point1, true);
10081010
....@@ -1261,6 +1263,7 @@
12611263 for (int wi = v0.weights.length; --wi>=0;)
12621264 v[wi] = 0;
12631265
1266
+ CameraPane.CreateSelectedPoint();
12641267 CameraPane.selectedpoint.
12651268 getAverage(cStatic.point1, true);
12661269
....@@ -1398,6 +1401,7 @@
13981401 v0.x = v0.y = v0.z = 0;
13991402 v0.norm.x = v0.norm.y = v0.norm.z = 0;
14001403
1404
+ CameraPane.CreateSelectedPoint();
14011405 CameraPane.selectedpoint.
14021406 getAverage(cStatic.point1, true);
14031407
....@@ -1998,7 +2002,9 @@
19982002 continue;
19992003
20002004 // Warning: faster but dangerous
2001
- if (v.weights != null && v.weights[j] == 0) // < 0.001 * v.totalweight)
2005
+ if (v.weights != null && v.weights[j]
2006
+ // == 0)
2007
+ < 0.0001 * v.totalweight)
20022008 {
20032009 //testweight += v.weights[j-1];
20042010 continue;
....@@ -4020,8 +4026,6 @@
40204026 //System.out.println("NEW = " + positions.length);
40214027 uvmap = new float[ta.getVertexCount() * 2];
40224028
4023
- colors = new float[ta.getVertexCount()]; // * 3];
4024
-
40254029 ta.getCoordinates(0, positions);
40264030 ta.getNormals(0, normals);
40274031 // ta.getColors(0, colors);
....@@ -4029,6 +4033,14 @@
40294033
40304034 System.out.println("UV = " + uvmap[2] + ", " + uvmap[3] + ";");
40314035
4036
+ colors = null;
4037
+// colors = new float[ta.getVertexCount()]; // * 3];
4038
+//
4039
+// for (int i=colors.length; --i>=0;)
4040
+// {
4041
+// colors[i] = 1;
4042
+// }
4043
+
40324044 triangles = new int[ta.getVertexCount()];
40334045
40344046 for (int i = 0; i < triangles.length; i++)
....@@ -4066,17 +4078,18 @@
40664078 positions = new float[3 * ga.getVertexCount()];
40674079 normals = new float[3 * ga.getVertexCount()];
40684080 uvmap = new float[2 * ga.getVertexCount()];
4069
- colors = new float[1 * ga.getVertexCount()];
40704081
40714082 tsa.getCoordinates(0, positions);
40724083 tsa.getNormals(0, normals);
40734084 tsa.getTextureCoordinates(0, 0, uvmap);
40744085 // tsa.getColors(0, colors);
4075
-
4076
- for (int i=colors.length; --i>=0;)
4077
- {
4078
- colors[i] = 1;
4079
- }
4086
+
4087
+ colors = null;
4088
+// colors = new float[1 * ga.getVertexCount()];
4089
+// for (int i=colors.length; --i>=0;)
4090
+// {
4091
+// colors[i] = 1;
4092
+// }
40804093
40814094 int stripcount = tsa.getNumStrips();
40824095 triangles = new int[stripcount];
....@@ -4085,6 +4098,7 @@
40854098 stripified = true;
40864099 } catch (ClassCastException e)
40874100 {
4101
+ // ??? aug 2019
40884102 TriangleArray ta = (TriangleArray) ga;
40894103
40904104 positions = new float[3 * ga.getVertexCount()];