Fix compatibility with Java 7

define_list_fix
Eirenliel Allier 9 years ago
parent 4b6be2a789
commit 794932104b
  1. 2
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/objects/FbxMesh.java
  2. 6
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/objects/FbxNode.java

@ -320,7 +320,7 @@ public class FbxMesh extends FbxObject {
// Build reverse vertex mapping
reverseVertexMap = new ArrayList<>(srcVertexCount);
for(int i = 0; i < srcVertexCount; ++i)
reverseVertexMap.add(new ArrayList<>());
reverseVertexMap.add(new ArrayList<Integer>());
for(int i = 0; i < vCount; ++i) {
int index = vertexMap.get(i);
reverseVertexMap.get(index).add(i);

@ -19,7 +19,6 @@ import com.jme3.scene.plugins.fbx.file.FbxElement;
public class FbxNode extends FbxObject {
public Map<String, Object> userData = new HashMap<>();
public FaceCullMode cullMode = FaceCullMode.Back;
public Transform localTransform;
public Node node;
@ -44,6 +43,7 @@ public class FbxNode extends FbxObject {
public FbxNode(SceneLoader scene, FbxElement element) {
super(scene, element);
node = new Node(name);
Vector3f translationLocalRaw = new Vector3f();
Vector3f rotationOffsetRaw = new Vector3f();
Vector3f rotationPivotRaw = new Vector3f();
@ -108,7 +108,7 @@ public class FbxNode extends FbxObject {
scene.warning("Unsupported user data type: " + userDataType + ". Ignoring.");
continue;
}
userData.put(userDataKey, userDataValue);
node.setUserData(userDataKey, userDataValue);
break;
}
}
@ -164,8 +164,6 @@ public class FbxNode extends FbxObject {
localTransform = new Transform(transformMatrix.toTranslationVector(), transformMatrix.toRotationQuat(), transformMatrix.toScaleVector());
node = new Node(name);
userData.forEach((s, o) -> node.setUserData(s, o));
node.setLocalTransform(localTransform);
}

Loading…
Cancel
Save