Hi all:
We are trying to search a TransformGroup in a tree. To do this, we are
using the method getAllChildren() recursively. This method works right
if the transform group capability is setted to ALLOW_CHILDREN_READ but
we don't know if this capability is setted in all TransformGroup in the
tree, because we are working in any Scene Grapth.
We can't set this capability in our code, because the TransformGroup is
just alived or compiled.
Do you know any other way to search a TransformGroup in a tree?
Here is our code:
public boolean depth_first_search (TransformGroup tg)
{
Enumeration children;
boolean dfs = false;
if (tg == i3D_object_owner)
return true;
else if (tg != null)
{
children = tg.getAllChildren();
while (children.hasMoreElements())
dfs = dfs || depth_first_search((TransformGroup)
children.nextElement());
return dfs;
}
else
return false;
}
===
Un saludo, Mart�n
[EMAIL PROTECTED]
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com