Normand Briere
2019-08-15 33504fc9a180903aace77613264550754fba5706
BoundaryRep.java
....@@ -1997,9 +1997,10 @@
19971997 if (v.vertexlinks == null)
19981998 continue;
19991999
2000
- // Warning: a bit faster but dangerous
2001
- if (v.weights != null && v.weights[j] == 0)
2002
- // < 0.001 * v.totalweight)
2000
+ // Warning: faster but dangerous
2001
+ if (v.weights != null && v.weights[j]
2002
+ // == 0)
2003
+ < 0.001 * v.totalweight)
20032004 {
20042005 //testweight += v.weights[j-1];
20052006 continue;
....@@ -4021,8 +4022,6 @@
40214022 //System.out.println("NEW = " + positions.length);
40224023 uvmap = new float[ta.getVertexCount() * 2];
40234024
4024
- colors = new float[ta.getVertexCount()]; // * 3];
4025
-
40264025 ta.getCoordinates(0, positions);
40274026 ta.getNormals(0, normals);
40284027 // ta.getColors(0, colors);
....@@ -4030,6 +4029,14 @@
40304029
40314030 System.out.println("UV = " + uvmap[2] + ", " + uvmap[3] + ";");
40324031
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
+
40334040 triangles = new int[ta.getVertexCount()];
40344041
40354042 for (int i = 0; i < triangles.length; i++)
....@@ -4067,17 +4074,18 @@
40674074 positions = new float[3 * ga.getVertexCount()];
40684075 normals = new float[3 * ga.getVertexCount()];
40694076 uvmap = new float[2 * ga.getVertexCount()];
4070
- colors = new float[1 * ga.getVertexCount()];
40714077
40724078 tsa.getCoordinates(0, positions);
40734079 tsa.getNormals(0, normals);
40744080 tsa.getTextureCoordinates(0, 0, uvmap);
40754081 // tsa.getColors(0, colors);
4076
-
4077
- for (int i=colors.length; --i>=0;)
4078
- {
4079
- colors[i] = 1;
4080
- }
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
+// }
40814089
40824090 int stripcount = tsa.getNumStrips();
40834091 triangles = new int[stripcount];
....@@ -4086,6 +4094,7 @@
40864094 stripified = true;
40874095 } catch (ClassCastException e)
40884096 {
4097
+ // ??? aug 2019
40894098 TriangleArray ta = (TriangleArray) ga;
40904099
40914100 positions = new float[3 * ga.getVertexCount()];