We're planning to use your viewer in program development but still are not sure that it provides all necessary functions. We have to get an hierarchy of all nodes of the scene. Could you tell us please if it is possible? We've tried to use such properties as Nodes and RootNodes but didn't get needed result.
It's definitely possible to get a nodes hierarchy. All you have to do is to traverse the scene graph. This can be shown schematically in pseudocode below.
for (each node in Engine.RootNodes)
traverse(node);
function traverse(node)
{
if (node is already visited)
return;
mark node as visited;
for (each field of node)
{
if (field.type == SFNode)
traverse(field.value);
else if (field.type == MFNode)
for (i = 0; i < field.item.count; ++i)
traverse(field.value[i]);
}
}
I've succeeded in reproducing your example on C#. Also I found sax parser (IVRMLTraverser) that entirely meets all our requirements and works perfectly.
Thank you for your help!
Evgenia