answered that myself. it works perfectly (in an action performed that is).
much easier than writing a behaviour, which is what i was doing. thank you
so much.
Shamim Khaliq [EMAIL PROTECTED] <http://www.shamimkhaliq.co.uk/>
----- Original Message -----
From: Shamim Khaliq <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 10, 2001 6:33 PM
Subject: Re: [JAVA3D] Creating shapes at runtime???
> can you do this (create a branch group, add it to the live one) in an
> actionPerformed(ActionEvent) method?
>
> Shamim Khaliq [EMAIL PROTECTED] <http://www.shamimkhaliq.co.uk/>
> ----- Original Message -----
> From: John Wright <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 10, 2001 12:12 AM
> Subject: Re: [JAVA3D] Creating shapes at runtime???
>
>
> > 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".
> >
>
>
===========================================================================
> 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".