Fábio Magalhães wrote: > How can i change this code to load a vrml object ? > wich package should i import?
The exact class name depends on which VRML loader you wish to use. Have a look here for a list of them: http://www.j3d.org/utilities/loaders.html Here's how to do it with Xj3D import org.web3d.j3d.loaders.VRML97Loader; ..... private BranchGroup constructContentBranch() { Scene myVrmlScene = null; try { VRML97Loader ldr = new VRML97Loader(); // set various flags here if you want behaviours etc myVrmlScene = ldr.load(".\\cube.wrl"); } catch (Exception e) { System.out.println("Could not open OBJ file...existing"); System.exit(1); } //Construct and return branch group containing our VRML scene. BranchGroup contentBranchGroup = new BranchGroup(); contentBranchGroup.addChild(myVrmlScene.getSceneGroup()); return(contentBranchGroup); } -- Justin Couch http://www.vlc.com.au/~justin/ Java Architect & Bit Twiddler http://www.yumetech.com/ Author, Java 3D FAQ Maintainer http://www.j3d.org/ ------------------------------------------------------------------- "Humanism is dead. Animals think, feel; so do machines now. Neither man nor woman is the measure of all things. Every organism processes data according to its domain, its environment; you, with all your brains, would be useless in a mouse's universe..." - Greg Bear, Slant ------------------------------------------------------------------- =========================================================================== 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".