This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > July 2005 > Load to a x3d file object that is stored in other x3d file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Load to a x3d file object that is stored in other x3d file
nunomartins01

2005-07-27, 8:16 pm

Hi!

I'm trying to create a x3d node while in navigation mode. I know that
in the SAI tutorial is a tutorial about "how to create nodes". I
have already tested it, but it only works for predefined x3d nodes
(box, cone, cylinder...)

What I wanted is to have my x3d world, and other x3d files, each one
with an object made by me, and then in the principal x3d world I wanted
to make a link with these other x3d files and load the objects to the
principal file.

I don't know if I'm explaining well....
What I want is to load to the principal x3d file objects that are
stored in another x3d files...

I have tried to use the createProto, and createInstance but it didn't
work...

This is the code to add a normal node like a box, cylinder:

Thanks
Nuno

mainScene = x3dBrowser.createX3DFromURL(new String[] {
"cubo.x3d" });
x3dBrowser.replaceWorld(mainScene);

shape = mainScene.createNode("Shape");
shape_geometry = (SFNode) (shape.getField("geometry"));
box = mainScene.createNode("Box");

shape_geometry.setValue(box);
mainScene.addRootNode(shape);

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews