| 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);
|