Hi

What is happening is that you are trying to assign the faces of the box to
two different parents- the Box and the BranchGroup (or TG) that you assign
the Shape3Ds to.

Your call to Box.getShape(i) returns a reference to the same face used in
the Box, not a seperate object. When you try to assign the shape3ds to
another group, it throws a multiple parent exception.

Try creating a new Shape3D with the reference that is returned in
getShape(i).

Shape3D boxshape = Box.getShape(i)
Shape3D shape = new Shape3D(boxshape.getGeometry())

B.D.


>From: Ashish Aggarwal <[EMAIL PROTECTED]>
>Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [JAVA3D] Plz Explain!
>Date: Tue, 17 Jul 2001 09:49:15 -0700
>
>
>Can some body explain me this:
>
>I have a Branch Scene Graph like this:
>
>objRoot-->objTran-->bg4-->objTrans4-->gp4-->Box
>
>if i do like this, I can see a box on the screen but
>if I change scene graph to:
>
>objRoot- >objTran-->bg4-->objTrans4-->gp4-->Shape(i)
>
>Where i=(1-6), represents 6 faces of the box, it
>throws multiple parent exception.
>
>I don't understand why is it doing like this.
>
>Please explain me this. I am attaching program with
>this mail.
>
>Thanks
>
>__________________________________________________
>Do You Yahoo!?
>Get personalized email addresses from Yahoo! Mail
>http://personal.mail.yahoo.com/
><< test.java >>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.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".

Reply via email to