----- Original Message -----
Sent: Wednesday, September 03, 2003 11:36
AM
Subject: [JAVA3D] ALLOW_CHILDREN_READ in
an imported model
Hi all,
I am trying to access to the Shapes3D of a model
imported from 3ds max,I am using this code to get the children:
Enumeration en =
scene.getAllChildren();
traverse(en);
public
void traverse (Enumeration e)
{
while(e.hasMoreElements())
{
Object o =
e.nextElement();
if (o instanceof
Shape3D){
// found a Shape3D do what you want with it
}
if (o instanceof Group)
{
Group g = (Group) o;
this.traverse(g.getAllChildren());
}
}
}
I have set the capabilities to read the children,
like: scene.setCapability(BranchGroup.ALLOW_CHILDREN_READ); and so on, but
when I get to the children of the TransformGroup instanced with the
loader: "TransformGroup theModel = loader.getModel();" apparently it has
a BranchGroup as a children that has no capability set to read it's
children. Since the TransformGroup is loaded from the 3DS file I
don't know how can I set the ALLOW_CHILDREN_READ capability of this
BranchGroup.
Can anybody help me with this?
Thanks,
Boby
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of
the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".