use of com.jme3.scene.plugins.fbx.file.FbxFile in project jmonkeyengine by jMonkeyEngine.
the class FbxLoader method loadData.
private void loadData(InputStream stream) throws IOException {
FbxFile scene = FbxReader.readFBX(stream);
FbxDump.dumpFile(scene);
for (FbxElement e : scene.rootElements) {
if (e.id.equals("FBXHeaderExtension")) {
loadHeader(e);
} else if (e.id.equals("GlobalSettings")) {
loadGlobalSettings(e);
} else if (e.id.equals("Objects")) {
loadObjects(e);
} else if (e.id.equals("Connections")) {
connectObjects(e);
}
}
}
use of com.jme3.scene.plugins.fbx.file.FbxFile in project jmonkeyengine by jMonkeyEngine.
the class SceneLoader method loadScene.
private void loadScene(InputStream stream) throws IOException {
logger.log(Level.FINE, "Loading scene {0}", sceneFilename);
long startTime = System.currentTimeMillis();
FbxFile scene = FbxReader.readFBX(stream);
for (FbxElement e : scene.rootElements) {
// Is it possible for elements to be in wrong order?
switch(e.id) {
case "GlobalSettings":
loadGlobalSettings(e);
break;
case "Objects":
loadObjects(e);
break;
case "Connections":
loadConnections(e);
break;
}
}
long estimatedTime = System.currentTimeMillis() - startTime;
logger.log(Level.FINE, "Loading done in {0} ms", estimatedTime);
}
Aggregations