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
....@@ -1997,9 +2001,10 @@
19972001 if (v.vertexlinks == null)
19982002 continue;
19992003
2000
- // Warning: a bit faster but dangerous
2001
- if (v.weights != null && v.weights[j] == 0)
2002
- // < 0.001 * v.totalweight)
2004
+ // Warning: faster but dangerous
2005
+ if (v.weights != null && v.weights[j]
2006
+ // == 0)
2007
+ < 0.0001 * v.totalweight)
20032008 {
20042009 //testweight += v.weights[j-1];
20052010 continue;
....@@ -4021,8 +4026,6 @@
40214026 //System.out.println("NEW = " + positions.length);
40224027 uvmap = new float[ta.getVertexCount() * 2];
40234028
4024
- colors = new float[ta.getVertexCount()]; // * 3];
4025
-
40264029 ta.getCoordinates(0, positions);
40274030 ta.getNormals(0, normals);
40284031 // ta.getColors(0, colors);
....@@ -4030,6 +4033,14 @@
40304033
40314034 System.out.println("UV = " + uvmap[2] + ", " + uvmap[3] + ";");
40324035
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
+
40334044 triangles = new int[ta.getVertexCount()];
40344045
40354046 for (int i = 0; i < triangles.length; i++)
....@@ -4067,17 +4078,18 @@
40674078 positions = new float[3 * ga.getVertexCount()];
40684079 normals = new float[3 * ga.getVertexCount()];
40694080 uvmap = new float[2 * ga.getVertexCount()];
4070
- colors = new float[1 * ga.getVertexCount()];
40714081
40724082 tsa.getCoordinates(0, positions);
40734083 tsa.getNormals(0, normals);
40744084 tsa.getTextureCoordinates(0, 0, uvmap);
40754085 // tsa.getColors(0, colors);
4076
-
4077
- for (int i=colors.length; --i>=0;)
4078
- {
4079
- colors[i] = 1;
4080
- }
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
+// }
40814093
40824094 int stripcount = tsa.getNumStrips();
40834095 triangles = new int[stripcount];
....@@ -4086,6 +4098,7 @@
40864098 stripified = true;
40874099 } catch (ClassCastException e)
40884100 {
4101
+ // ??? aug 2019
40894102 TriangleArray ta = (TriangleArray) ga;
40904103
40914104 positions = new float[3 * ga.getVertexCount()];