Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Java 3D / October 2004

Tip: Looking for answers? Try searching our database.

newbie question: How to dynamically add TransformGroup to a BranchGroup

Thread view: 
Rouben - 07 Oct 2004 16:34 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.