Java applet that loads vrml

Started by cuzone, October 12, 2004, 08:31:06 AM

Previous topic - Next topic

cuzone

Hi!

Is it possible (is it hard) to make jPCT to load VRML files?
It would be absolutly great with a Java applet that could show VRML files, and even better X3D files.

Keep up the good work!!

Kind regards, Erik Dahlstrand - Sweden

EgonOlsen

I think it depends on what exactly you mean by "load VRML". You may either load just the objects from the file or you may also be interested in animations, events or whatever VRML allows. In the former case, you have to parse the VRML somehow, create the objects from it, load the textures and you are basically done (still a lot of work...). In the second case, you need to write somekind of VRML-layer on top of jPCT...which will be a lot more work IMHO.
However...is it possible: yes. Can jPCT do it "out of the box": no.  Does jPCT includes everything that is needed to write such thing: yes.

Hope this helps.

cuzone


Trob

You could use cybergarage.org's CyberX3D VRML loader which has 100% support to VRML 2.0.

When u have loaded the VRML u can get the shapes, materials and textures by looping through the nodes. Its not hard work to do that, cyberx3d have loaded everything in a nice structure in memory. Full fucntions is included to load the shapes, lights materials, textures and more.

My english isnt very good but i hope u got me  :lol:

Trob

Dont use their CyberVRML97, it is deprecated. All functions u need is included in CyberX3D.