Xj3D VRML/X3D Code API

Package org.web3d.j3d.loaders

Implementations of Java 3D file loaders for Web3D file formats.

See:
          Description

Class Summary
BaseLoader A Java3D file loader implementation for reading X3D utf8 files only and building a Java3D scenegraph with them.
J3DScene Java3D representation of a complete scene in VRML.
VRML97Loader A Java3D file loader implementation for reading VRML97 utf8 files only and building a Java3D scenegraph with them.
Web3DLoader A Java3D file loader implementation for reading all Web3D file formats building a Java3D scenegraph with them.
X3DLoader A Java3D file loader implementation for reading X3D utf8 files only and building a Java3D scenegraph with them.
 

Package org.web3d.j3d.loaders Description

Implementations of Java 3D file loaders for Web3D file formats.

All the files available here implement the Loader interface. For more information on how to use loaders, see the How to use the Loader page at Xj3D.org.

The loaders have two very different code paths depending on what you want to do. If you need just static geometry then the loader will perform a blocking load call and will not return until all of the world file is loaded. If the world contains inlines then in will recurse into these and load them too before returning to the caller. It will also disable all runtime aspects of the scene. Scripts will have their initialize() method called, but nothing will be done with the script or any changes it may make to the scene graph. If you have a proto that depends on the script's initialize() method to build geometry, you will not see it happen.

If you want the full runtime model of VRML/X3D as part of your loading process, then you need to make sure you at least have the LOAD_BEHAVIOR_NODES flag set. This will start up the full execution model and the content of the script will run as normal. All user interaction will be applied, but due to the limitations of the loader, things may not really function correctly. For example, clicking on an Anchor node will not do anything, nor will viewpoint binding. Also, by default, the navigation code is turned off. This is because we are assuming that the user will probably use this to load multiple files over time or even simultaneously. If the navigation code is running, each loaded file will be fighting for the mouse events, control of the view and picking. Put a few of these into a single scene simultanouesly, and there is no telling what will happen!


Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium