.. | .. |
---|
1997 | 1997 | if (v.vertexlinks == null) |
---|
1998 | 1998 | continue; |
---|
1999 | 1999 | |
---|
2000 | | - // Warning: a bit faster but dangerous |
---|
| 2000 | + // Warning: faster but dangerous |
---|
2001 | 2001 | if (v.weights != null && v.weights[j] |
---|
2002 | 2002 | // == 0) |
---|
2003 | 2003 | < 0.001 * v.totalweight) |
---|
.. | .. |
---|
4022 | 4022 | //System.out.println("NEW = " + positions.length); |
---|
4023 | 4023 | uvmap = new float[ta.getVertexCount() * 2]; |
---|
4024 | 4024 | |
---|
4025 | | - colors = new float[ta.getVertexCount()]; // * 3]; |
---|
4026 | | - |
---|
4027 | 4025 | ta.getCoordinates(0, positions); |
---|
4028 | 4026 | ta.getNormals(0, normals); |
---|
4029 | 4027 | // ta.getColors(0, colors); |
---|
.. | .. |
---|
4031 | 4029 | |
---|
4032 | 4030 | System.out.println("UV = " + uvmap[2] + ", " + uvmap[3] + ";"); |
---|
4033 | 4031 | |
---|
| 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 | + |
---|
4034 | 4040 | triangles = new int[ta.getVertexCount()]; |
---|
4035 | 4041 | |
---|
4036 | 4042 | for (int i = 0; i < triangles.length; i++) |
---|
.. | .. |
---|
4068 | 4074 | positions = new float[3 * ga.getVertexCount()]; |
---|
4069 | 4075 | normals = new float[3 * ga.getVertexCount()]; |
---|
4070 | 4076 | uvmap = new float[2 * ga.getVertexCount()]; |
---|
4071 | | - colors = new float[1 * ga.getVertexCount()]; |
---|
4072 | 4077 | |
---|
4073 | 4078 | tsa.getCoordinates(0, positions); |
---|
4074 | 4079 | tsa.getNormals(0, normals); |
---|
4075 | 4080 | tsa.getTextureCoordinates(0, 0, uvmap); |
---|
4076 | 4081 | // tsa.getColors(0, colors); |
---|
4077 | | - |
---|
4078 | | - for (int i=colors.length; --i>=0;) |
---|
4079 | | - { |
---|
4080 | | - colors[i] = 1; |
---|
4081 | | - } |
---|
| 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 | +// } |
---|
4082 | 4089 | |
---|
4083 | 4090 | int stripcount = tsa.getNumStrips(); |
---|
4084 | 4091 | triangles = new int[stripcount]; |
---|
.. | .. |
---|
4087 | 4094 | stripified = true; |
---|
4088 | 4095 | } catch (ClassCastException e) |
---|
4089 | 4096 | { |
---|
| 4097 | + // ??? aug 2019 |
---|
4090 | 4098 | TriangleArray ta = (TriangleArray) ga; |
---|
4091 | 4099 | |
---|
4092 | 4100 | positions = new float[3 * ga.getVertexCount()]; |
---|