Unfortunately, your assumption that you can only add another branchgroup is
correct, given that you have a compiled or live branchgroup.
You CAN create the transformGroup on the fly, but in order to add it to the
live branchGroup you must 1) create another (new) branch group, 2) add your
transformGroup to your new branchGroup, 3) add your new branchGroup to the
live/compiled branchGroup.
Paraskevas
--- Danny Kahn <[EMAIL PROTECTED]> wrote:
> I was wondering if anyone could clarify the explanation below on adding
> and
> removing shapes to a compiled or live BranchGroup. As far as I can tell
> only the BranchGroup class has an ALLOW_DETACH capability bit, so how do
> you set it for the node that you want to add in? Does this mean that you
> can only add in another BranchGroup node? All I really want to do is to
> add in a sphere to the main content BranchGroup when the user clicks on
> certain locations on the screen. This actually requires adding a new
> TransformGroup for each sphere. So is it possible to create a new
> TransformGroup at runtime when a click has been received and then add it
> as
> a child to a live BranhcGroup? Thanks for your help.
>
> Danny
>
>
>
>
> >Set the capability bit ALLOW_CHILDREN_EXPAND on the branchgroup, and set
> >the ALLOW_DETACH capability bit of the item to be added if you want to
> >remove it. Then you should be able to add and remove even if the scene
> is
> >live or compiled.
> > >
> >
> >Good luck,
> >
> >Nathan Goff
> >
>
>
===========================================================================
> 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".
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
===========================================================================
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".