1

I'm working on a project and I have multiple X3D models that I need to use in the final project outcome. I'm using Java as the main programming language and I've been told that I can import the X3D models into the Java project and I don't know how to.

user3133065
  • 29
  • 1
  • 6
  • `Java` is a programming language, that means you can do whatever you can imagine with it. `x3d` is a markup language, which means any sensible SAX or DOM parser should be able to parse the documents - What you do with that data in turn is up to you. – dot_Sp0T Oct 19 '15 at 19:28
  • it is impossible to import a x3d model in java code – Traian Oct 20 '15 at 09:18
  • Take a look at this: http://stackoverflow.com/questions/11463231/how-to-generate-jaxb-classes-from-xsd – Endery Mar 09 '16 at 14:57

1 Answers1

1

You may have a look at xj3d. It builds a scene-graph from X3D file.

The latest version can be found at http://sourceforge.net/projects/xj3d/, the official site (http://www.xj3d.org/) does not seems to have been updated recently.

EDIT: Replying to comment above (I don't have enough reputation to comment) There is also a binary format for X3D, so standard XML parsers won't work with it.

Gibe
  • 26
  • 4
  • I've had a look into Xj3D and I've downloaded it and tried to implement it into my project but I'm still having trouble trying to get into the project – user3133065 Oct 22 '15 at 08:18
  • Hum, I've checked the Javadoc found there (I don't know if it is up to date or not): https://savage.nps.edu/Xj3D.nps/docs/javadoc/ I think that you can load the file using org.xj3d.loaders.ogl.X3DLoader. Then it gives you an Aviatrix3d scene graph you can navigate in. But there are probably other solutions. But I suggest that you contact xj3d developpers directly. I'm sure that they can direct you to some good docs/tutorials. – Gibe Oct 22 '15 at 14:00