Search in sources :

Example 1 with FbxImage

use of com.jme3.scene.plugins.fbx.objects.FbxImage in project jmonkeyengine by jMonkeyEngine.

the class SceneLoader method loadObjects.

private void loadObjects(FbxElement element) throws IOException {
    FbxObject obj = null;
    for (FbxElement e : element.children) {
        switch(e.id) {
            case "Geometry":
                FbxMesh mesh = new FbxMesh(this, e);
                obj = mesh;
                if (mesh.geometries != null)
                    geomMap.put(mesh.id, mesh);
                break;
            case "Material":
                obj = new FbxMaterial(this, e);
                break;
            case "Model":
                FbxNode node = new FbxNode(this, e);
                obj = node;
                modelMap.put(node.id, node);
                if (node.isLimb())
                    limbMap.put(node.id, node);
                break;
            case "Pose":
                FbxBindPose pose = new FbxBindPose(this, e);
                obj = pose;
                bindMap.put(pose.id, pose);
                break;
            case "Texture":
                obj = new FbxTexture(this, e);
                break;
            case "Video":
                obj = new FbxImage(this, e);
                break;
            case "Deformer":
                obj = loadDeformer(e);
                break;
            case "AnimationLayer":
                FbxObject layer = new FbxObject(this, e);
                obj = layer;
                alayerMap.put(layer.id, layer);
                break;
            case "AnimationCurve":
                obj = new FbxAnimCurve(this, e);
                break;
            case "AnimationCurveNode":
                obj = new FbxAnimNode(this, e);
                break;
            default:
                obj = null;
        }
        if (obj != null)
            allObjects.put(obj.id, obj);
    }
}
Also used : FbxElement(com.jme3.scene.plugins.fbx.file.FbxElement) FbxObject(com.jme3.scene.plugins.fbx.objects.FbxObject) FbxNode(com.jme3.scene.plugins.fbx.objects.FbxNode) FbxAnimCurve(com.jme3.scene.plugins.fbx.objects.FbxAnimCurve) FbxTexture(com.jme3.scene.plugins.fbx.objects.FbxTexture) FbxMesh(com.jme3.scene.plugins.fbx.objects.FbxMesh) FbxBindPose(com.jme3.scene.plugins.fbx.objects.FbxBindPose) FbxAnimNode(com.jme3.scene.plugins.fbx.objects.FbxAnimNode) FbxMaterial(com.jme3.scene.plugins.fbx.objects.FbxMaterial) FbxImage(com.jme3.scene.plugins.fbx.objects.FbxImage)

Aggregations

FbxElement (com.jme3.scene.plugins.fbx.file.FbxElement)1 FbxAnimCurve (com.jme3.scene.plugins.fbx.objects.FbxAnimCurve)1 FbxAnimNode (com.jme3.scene.plugins.fbx.objects.FbxAnimNode)1 FbxBindPose (com.jme3.scene.plugins.fbx.objects.FbxBindPose)1 FbxImage (com.jme3.scene.plugins.fbx.objects.FbxImage)1 FbxMaterial (com.jme3.scene.plugins.fbx.objects.FbxMaterial)1 FbxMesh (com.jme3.scene.plugins.fbx.objects.FbxMesh)1 FbxNode (com.jme3.scene.plugins.fbx.objects.FbxNode)1 FbxObject (com.jme3.scene.plugins.fbx.objects.FbxObject)1 FbxTexture (com.jme3.scene.plugins.fbx.objects.FbxTexture)1