|
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
CERN - European Laboratory for Particle Physics Robert Gomez-Reino Garrido - [EMAIL PROTECTED] CERN - EP/CMD (40-R-A006) CH 1211 Geneva Switzerland Phone: +41 22 7671654 Fax: +41 22 7678940 |
- Re: [JAVA3D] ALLOW_CHILDREN_READ in an imported model Robert Gomez-Reino
- Re: [JAVA3D] ALLOW_CHILDREN_READ in an imported mo... Robert Gomez-Reino
