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
....@@ -2000,7 +2004,7 @@
20002004 // Warning: faster but dangerous
20012005 if (v.weights != null && v.weights[j]
20022006 // == 0)
2003
- < 0.001 * v.totalweight)
2007
+ < 0.0001 * v.totalweight)
20042008 {
20052009 //testweight += v.weights[j-1];
20062010 continue;
....@@ -4022,8 +4026,6 @@
40224026 //System.out.println("NEW = " + positions.length);
40234027 uvmap = new float[ta.getVertexCount() * 2];
40244028
4025
- colors = new float[ta.getVertexCount()]; // * 3];
4026
-
40274029 ta.getCoordinates(0, positions);
40284030 ta.getNormals(0, normals);
40294031 // ta.getColors(0, colors);
....@@ -4031,6 +4033,14 @@
40314033
40324034 System.out.println("UV = " + uvmap[2] + ", " + uvmap[3] + ";");
40334035
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
+
40344044 triangles = new int[ta.getVertexCount()];
40354045
40364046 for (int i = 0; i < triangles.length; i++)
....@@ -4068,17 +4078,18 @@
40684078 positions = new float[3 * ga.getVertexCount()];
40694079 normals = new float[3 * ga.getVertexCount()];
40704080 uvmap = new float[2 * ga.getVertexCount()];
4071
- colors = new float[1 * ga.getVertexCount()];
40724081
40734082 tsa.getCoordinates(0, positions);
40744083 tsa.getNormals(0, normals);
40754084 tsa.getTextureCoordinates(0, 0, uvmap);
40764085 // tsa.getColors(0, colors);
4077
-
4078
- for (int i=colors.length; --i>=0;)
4079
- {
4080
- colors[i] = 1;
4081
- }
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
+// }
40824093
40834094 int stripcount = tsa.getNumStrips();
40844095 triangles = new int[stripcount];
....@@ -4087,6 +4098,7 @@
40874098 stripified = true;
40884099 } catch (ClassCastException e)
40894100 {
4101
+ // ??? aug 2019
40904102 TriangleArray ta = (TriangleArray) ga;
40914103
40924104 positions = new float[3 * ga.getVertexCount()];