Fixed the LGTM error "Container contents are never initialized" by removing the container and related code.
@@ -141,7 +141,6 @@ private void createMd5JointForElementAndParent(Map<String, MD5Joint> md5JointByS
protected void parseSkeletalMeshData(Element rootElement) throws ColladaParseException {
List<MD5Joint> md5JointList = new ArrayList<>();
- List<MD5Mesh> md5MeshList = new ArrayList<>();
skeletonBuilder = new SkeletalMeshDataBuilder();
@@ -350,37 +349,6 @@ protected void parseSkeletalMeshData(Element rootElement) throws ColladaParseExc
skeletonBuilder.addBone(joint.bone);
}
- if (md5MeshList.size() > 0) {
- // TODO: Support multiple mesh somehow?
- MD5Mesh mesh = md5MeshList.get(0);
- for (MD5Weight weight : mesh.weightList) {
- skeletonBuilder.addWeight(new BoneWeight(weight.position, weight.bias, weight.jointIndex));
- }
-
- List<Vector2f> uvs = Lists.newArrayList();
-
- TIntList vertexStartWeight = new TIntArrayList(vertices.size() / 3);
- TIntList vertexWeightCount = new TIntArrayList(vertices.size() / 3);
- // for (MD5Vertex vert : mesh.vertexList) {
- // uvs.add(vert.uv);
- // vertexStartWeight.add(vert.startWeight);
- // vertexWeightCount.add(vert.countWeight);
- // }
-
- for (int i = 0; i < vertices.size() / 3; i++) {
- vertexStartWeight.add(i);
- vertexWeightCount.add(1);
- }
-
- skeletonBuilder.setVertexWeights(vertexStartWeight, vertexWeightCount);
-
- for (int i = 0; i < normals.size() / 2; i++) {
- uvs.add(new Vector2f(normals.get(i * 2 + 0), normals.get(i * 2 + 1)));
- }
- skeletonBuilder.setUvs(uvs);
- skeletonBuilder.setIndices(indices);
- }
-
// Now if you have come this far, you should be able to read the geometry data,
// as well as the skeleton and skinning data from COLLADA documents. And you should be able to draw
// the model in raw triangles, as well as draw the skeleton. Although I haven't discussed how you
