Right, but you need to also make sure that you set the permissions of the
BranchGroup that the Shape3D is in.

BranchGroup.ALLOW_DETACH

The Parent needs BranchGroup.ALLOW_CHILDREN_EXTEND and the child needs
BranchGroup.ALLOW_DETACH.




At 07:36 AM 12/04/2000 -0600, you wrote:
>Ravi,
>
>I believe your problem is that you are trying to remove a Shape3D
>(rather than a BranchGroup) from a live scenegraph. Try putting your
>Shape3D in a BranchGroup and attach and detach the BranchGroup.
>
>- John Wright
>Starfire Research
>
> > Ravi Goel wrote:
> >
> > hi all,
> >     i'm new to java3d...& i'm trying few examples with it...i have
> > created a simple class with my own behavior....on the click on the
> > INSERT button i'm adding a new Shape3D object...& on the click of the
> > DELETE button i'm removing the object...
> > Adding is workinf fine...but when i'm removing it...i'm getting
> > javax.media.j3d.RestrictedAccessException...can somebody tell me
> > why...i'm getting this...
> >
> > BG
> >   |
> >  TG( to this TransformGroup i'm adding a new
> > BranchGorup->TransformGroup->Shape3D)
> >   |
> > ColorCube
> >
> > I have set the follwoing capabilties to both the BranchGroup as well
> > as to the TransformGroup
> >
> > BranchGroup.ALLOW_CHILDREN_EXTEND
> > BranchGroup.ALLOW_CHILDREN_READ
> > BranchGroup.ALLOW_CHILDREN_WRITE
> >
> > A sample code would be very helpful.
> >
> > Thanks in advance
> > Ravi
> >
> >
>
>===========================================================================
>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".

***********************************************************************
Eric Reiss - http://www.sigda.acm.org/Eric/
Email: [EMAIL PROTECTED]

SIGDA Internet Server Manager - http://www.sigda.acm.org/

Assistant Systems Manager - School of Engineering
University of Pittsburgh
***********************************************************************

===========================================================================
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".

Reply via email to