Children nodes 
Author Message
 Children nodes

Hi,

Can somebody tell me how I can get all the children of a node ?

Like

Node root;
Node[] Children;

root = browser.getNode("volumes");

Then I need all Children of this node, and that's where i am stuck.

I was thinking of adding some useless child to root and then removing it
back, so i can catch the children_changed event, but i seems so, you know,
"omslachtig" in Dutch :)

Thanks a lot,

Gerry



Tue, 29 Oct 2002 03:00:00 GMT  
 Children nodes

Did you try
field MFNode allnode []
root = browser.getNode("volumes");
for(i=0; i<root.children.length; i++) {
    allnode[i] = root.children[i];

Quote:
}

Here I suppose that "volumes" is some kind of grouping node that have
children.
Also note that the assignment pass *reference*, not copies of the node; if you
need a copie (a new instance), you'll have to use the createVrmlFromxxx
functions.

Sylvain Carette
vrml designer-composer

Quote:

> Hi,

> Can somebody tell me how I can get all the children of a node ?

> Like

> Node root;
> Node[] Children;

> root = browser.getNode("volumes");

> Then I need all Children of this node, and that's where i am stuck.

> I was thinking of adding some useless child to root and then removing it
> back, so i can catch the children_changed event, but i seems so, you know,
> "omslachtig" in Dutch :)

> Thanks a lot,

> Gerry



Tue, 29 Oct 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. need help with getting children node name from children changed event

2. EAI:Accessing child nodes

3. Adding children nodes using java?

4. A quick question about accessing children nodes

5. cloning children nodes in Java dynamic VRML scene creation

6. blaxxun troubles + text node as a children node of a billboard, not possible?

7. How do I find the position of a child node?

8. how can i USE a node in a children field

9. Transform Node and add/remove children - corridor.wrl (0/1)

10. traversing the children of a node

11. Can I import child from one node to another for an animation

12. Labview 5.1.1 crashes when I use Invoke Node or Property Node

 

 
Powered by phpBB® Forum Software