Danny,
To add a sphere to the live scene. Create a BranchGroup, add your
transform group, add your sphere and then add this BG to the live BG
(root BG).
rootBG (live)
|
addBG (not live until added)
|
TG
|
sphere
- John Wright
Danny Kahn 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".
===========================================================================
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".