Hello

On Saturday 21 February 2004 19:19, you wrote:
> can someone tell me where i can find tutorials on how to import vrml or lwo
> files in java3d?

java3d has built-in support for loading lw3 (Lightwave) and obj (Wavefront).

For vrml and others you have to use 3rd-party loaders. (ask google or have a
look at http://www.j3d.org ) If you have a question about one of these, feel
free to ask.

> step by step tutorial..

Most loaders implement "com.sun.j3d.loaders.Loader". Using this interface you
have to (loader is the name of the implementing class for now) :

Scene scene = loader.load("filename");
BranchGroup BA = scene.getSceneGroup();

BA now contains the model saved in the file "filename". You can use that
BranchGroup just like every other BranchGroup in java3d. For example you can
call

simpleuniverse.addBranchGraph(BA)

to add the model to the universe. One little "problem": the model is added at
the center of the universe. The camera is also at the center. In order to see
the model you have to move the camera a bit, with:

simpleuniverse.getViewingPlatform().setNominalViewingTransform();

have fun
Gilson Laurent

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to