The goal of the exercise is to put some 'file' viewer inside Eclipse.
I am trying first with COLLADA. I am using 'SVN' trunck.
I try something like this just to test drive:
private BranchGroup createScene(String daeFile) throws Exception {
BranchGroup bg = new BranchGroup();
AssetFolder root = new COLLADALoader().load(daeFile);
LibraryVisualScenes scenes = root.getLibraryVisualsScenes();
Iterator<Scene> itScene = scenes.getScenes().values().iterator();
if (itScene.hasNext()) {
Scene myScene = itScene.next();
if(myScene.getNodes().values().iterator().hasNext()) {
Node myNode = myScene.getNodes().values().iterator().next();
Model myDaeModelFile = new Model(myNode,null);
bg.addChild(myDaeModelFile);
}
}
return bg;
}
When called, I get the following exception :
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at org.jibx.runtime.impl.UnmarshallingContext.createReaderFactory(UnmarshallingContext.java:187)
at org.jibx.runtime.impl.UnmarshallingContext.<clinit>(UnmarshallingContext.java:73)
at org.jagatoo.loaders.models.collada.jibx.JiBX_bindingFactory.createUnmarshallingContext()
at org.jagatoo.loaders.models.collada.COLLADALoader.<init>(COLLADALoader.java:52)
at org.xith3d.test.XithTest.createScene(XithTest.java:45)
at org.xith3d.test.XithTest.<init>(XithTest.java:104)
at org.xith3d.test.XithTest.main(XithTest.java:112)
I guess I am missing something. But what ?
Best regards,
Sebastien.