Hi Guys,
I am trying to add and remove Sphere objects to and from my universe
dynamically at runtime. However, each time I try to add a TransformGroup
child to the BranchGroup I get this error:
javax.media.j3d.RestrictedAccessException: Group: only a BranchGroup node
may be added
Can anyone please help me?
Thanks a billion in advance,
-Rouben
Andre Bialojahn - 07 Oct 2004 19:18 GMT
> Hi Guys,
>
[quoted text clipped - 6 lines]
>
> Can anyone please help me?
Just wrap each of your Spheres in a BranchGroup. They then can be
added and removed as wanted.
Have you already read the Java3D Tutorial, spanning 8 pdfs and resi-
ding on SUNs website?
André
Christian Wiech - 08 Oct 2004 19:04 GMT
Hi,
I think you can't transform a TransformGroup into a BranchGroup. But perhaps
you can add the spheres TransformGroup to another Branchgroup and than you
connect that one to the BranchGroup. Now you have a BranchGroup connected
as a child to a BranchGroup and it should be possible to add /detach it.
Cheers
Christian
> Hi Guys,
>
[quoted text clipped - 9 lines]
> Thanks a billion in advance,
> -Rouben