Hi serge,

i already did that.
but still i can't get the parent (i want to retrieve the TransformGroup from
the Sphere).
what else should i do?

thanks
Dafna

----- Original Message -----
From: "Serge Bernier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 14, 2003 5:10 PM
Subject: Re: [JAVA3D] getParent question


> Hey
>
> you have to set the capability of the BranchGroup and the TransformGroup.
>
> To have access to all the TransformGroup you have to write:
>
> TransformGroup TG = new TransformGroup();
> TG.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
> TG.setCapability(TransformGroup.ALLOW_CHILDREN_WRITTE);
>
> and for the BranchGroup:
>
> BranchGroup BG = new BranchGroup();
> BG.setCapability(BranchGroup.ALLOW_CHILDREN_READ);
> BG.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);
>
>
> This should give you access to the TG and BG at runtime.
>
> Check thoses link for more info on Capability settings.
>
> 1-http://java.sun.com/products/java-
> media/3D/forDevelopers/J3D_1_3_API/j3dapi/index.html
> 2-http://java.sun.com/products/java-
>
media/3D/forDevelopers/J3D_1_3_API/j3dapi/javax/media/j3d/TransformGroup.htm
l
>
>
> Serge Bernier
>
>
>
> Selon dafna gordon <[EMAIL PROTECTED]>:
>
> > Hi All,
> >
> > i have a scene which contains many spheres. every Sphere is a child of a
> > TransformGroup, and everyTransformGroup is a child of a BranchGroup
which is
> > then compiled and added to the simpleUniverse.
> > i save my spheres in hashTable which i then use in another method.
> > in the other method i get the spheres from the hashTable. for every
Sphere
> > that i get, i want to get also the parent TransformGroup. i tired using
the
> > getParent method but i get an exception which says that it can't be done
on a
> > live or compiled object. so, i tried to apply  detach on the parent
> > BranchGroup and then call the getParent, but it didn't work also.
> > how can i get the TransformGroup of each Sphere? is there some other
method
> > that can retrieve the TransformGroup / parent?
> >
> > thanks
> > Dafna
> >
> >
===========================================================================
> > 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".
>

===========================================================================
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".

Reply via email to