Normand Briere
2019-08-13 0cdf3fb57ddea3226f094ba45c836c7e9b123e3a
BoundaryRep.java
....@@ -1998,7 +1998,9 @@
19981998 continue;
19991999
20002000 // Warning: faster but dangerous
2001
- if (v.weights != null && v.weights[j] == 0) // < 0.001 * v.totalweight)
2001
+ if (v.weights != null && v.weights[j]
2002
+ // == 0)
2003
+ < 0.001 * v.totalweight)
20022004 {
20032005 //testweight += v.weights[j-1];
20042006 continue;
....@@ -4020,8 +4022,6 @@
40204022 //System.out.println("NEW = " + positions.length);
40214023 uvmap = new float[ta.getVertexCount() * 2];
40224024
4023
- colors = new float[ta.getVertexCount()]; // * 3];
4024
-
40254025 ta.getCoordinates(0, positions);
40264026 ta.getNormals(0, normals);
40274027 // ta.getColors(0, colors);
....@@ -4029,6 +4029,14 @@
40294029
40304030 System.out.println("UV = " + uvmap[2] + ", " + uvmap[3] + ";");
40314031
4032
+ colors = null;
4033
+// colors = new float[ta.getVertexCount()]; // * 3];
4034
+//
4035
+// for (int i=colors.length; --i>=0;)
4036
+// {
4037
+// colors[i] = 1;
4038
+// }
4039
+
40324040 triangles = new int[ta.getVertexCount()];
40334041
40344042 for (int i = 0; i < triangles.length; i++)
....@@ -4066,17 +4074,18 @@
40664074 positions = new float[3 * ga.getVertexCount()];
40674075 normals = new float[3 * ga.getVertexCount()];
40684076 uvmap = new float[2 * ga.getVertexCount()];
4069
- colors = new float[1 * ga.getVertexCount()];
40704077
40714078 tsa.getCoordinates(0, positions);
40724079 tsa.getNormals(0, normals);
40734080 tsa.getTextureCoordinates(0, 0, uvmap);
40744081 // tsa.getColors(0, colors);
4075
-
4076
- for (int i=colors.length; --i>=0;)
4077
- {
4078
- colors[i] = 1;
4079
- }
4082
+
4083
+ colors = null;
4084
+// colors = new float[1 * ga.getVertexCount()];
4085
+// for (int i=colors.length; --i>=0;)
4086
+// {
4087
+// colors[i] = 1;
4088
+// }
40804089
40814090 int stripcount = tsa.getNumStrips();
40824091 triangles = new int[stripcount];
....@@ -4085,6 +4094,7 @@
40854094 stripified = true;
40864095 } catch (ClassCastException e)
40874096 {
4097
+ // ??? aug 2019
40884098 TriangleArray ta = (TriangleArray) ga;
40894099
40904100 positions = new float[3 * ga.getVertexCount()];