Fix compatibility with Java 7
This commit is contained in:
parent
4b6be2a789
commit
794932104b
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/objects
@ -320,7 +320,7 @@ public class FbxMesh extends FbxObject {
|
|||||||
// Build reverse vertex mapping
|
// Build reverse vertex mapping
|
||||||
reverseVertexMap = new ArrayList<>(srcVertexCount);
|
reverseVertexMap = new ArrayList<>(srcVertexCount);
|
||||||
for(int i = 0; i < srcVertexCount; ++i)
|
for(int i = 0; i < srcVertexCount; ++i)
|
||||||
reverseVertexMap.add(new ArrayList<>());
|
reverseVertexMap.add(new ArrayList<Integer>());
|
||||||
for(int i = 0; i < vCount; ++i) {
|
for(int i = 0; i < vCount; ++i) {
|
||||||
int index = vertexMap.get(i);
|
int index = vertexMap.get(i);
|
||||||
reverseVertexMap.get(index).add(i);
|
reverseVertexMap.get(index).add(i);
|
||||||
|
@ -19,7 +19,6 @@ import com.jme3.scene.plugins.fbx.file.FbxElement;
|
|||||||
|
|
||||||
public class FbxNode extends FbxObject {
|
public class FbxNode extends FbxObject {
|
||||||
|
|
||||||
public Map<String, Object> userData = new HashMap<>();
|
|
||||||
public FaceCullMode cullMode = FaceCullMode.Back;
|
public FaceCullMode cullMode = FaceCullMode.Back;
|
||||||
public Transform localTransform;
|
public Transform localTransform;
|
||||||
public Node node;
|
public Node node;
|
||||||
@ -44,6 +43,7 @@ public class FbxNode extends FbxObject {
|
|||||||
|
|
||||||
public FbxNode(SceneLoader scene, FbxElement element) {
|
public FbxNode(SceneLoader scene, FbxElement element) {
|
||||||
super(scene, element);
|
super(scene, element);
|
||||||
|
node = new Node(name);
|
||||||
Vector3f translationLocalRaw = new Vector3f();
|
Vector3f translationLocalRaw = new Vector3f();
|
||||||
Vector3f rotationOffsetRaw = new Vector3f();
|
Vector3f rotationOffsetRaw = new Vector3f();
|
||||||
Vector3f rotationPivotRaw = new Vector3f();
|
Vector3f rotationPivotRaw = new Vector3f();
|
||||||
@ -108,7 +108,7 @@ public class FbxNode extends FbxObject {
|
|||||||
scene.warning("Unsupported user data type: " + userDataType + ". Ignoring.");
|
scene.warning("Unsupported user data type: " + userDataType + ". Ignoring.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
userData.put(userDataKey, userDataValue);
|
node.setUserData(userDataKey, userDataValue);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -164,8 +164,6 @@ public class FbxNode extends FbxObject {
|
|||||||
|
|
||||||
localTransform = new Transform(transformMatrix.toTranslationVector(), transformMatrix.toRotationQuat(), transformMatrix.toScaleVector());
|
localTransform = new Transform(transformMatrix.toTranslationVector(), transformMatrix.toRotationQuat(), transformMatrix.toScaleVector());
|
||||||
|
|
||||||
node = new Node(name);
|
|
||||||
userData.forEach((s, o) -> node.setUserData(s, o));
|
|
||||||
node.setLocalTransform(localTransform);
|
node.setLocalTransform(localTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user