Hi,
I have a main BranchGroup "objRoot" and I have a BranchGroup for adding each object. I 
also have a main TG and a TG for each object where all the rotation, scaling, etc info 
is. 
The code for adding and deleting is shown below.
Cheers,
Dave.
//////////////////////////////////////
public void addObject()
        {
                if(choice[0])
                {
                        addSofaBG.addChild(sofaTrans);
                        objScale.addChild(addSofaBG);
                        
                }
                else if(choice[1]) 
                {
                        addLightBG.addChild(lightTrans);
                        objScale.addChild(addLightBG);
                        
                }
                else if(choice[2]) 
                {
                        
                }
                else if(choice[3]) 
                {
                        addTVBG.addChild(tvTrans);
                        objScale.addChild(addTVBG);
                }
        }
        
        public void delete()
        {
                if(choice[0])
                {
                        addSofaBG.detach();
                        
                        
                }
                else if(choice[1]) 
                {
                                                
                }
                else if(choice[2]) 
                {
                        
                }
                else if(choice[3]) 
                {
                        
                }
        }

-----Original Message-----
From: "Brobbey,Isaac" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Wed, 3 Mar 2004 15:44:16 -0500
Subject: Re: [JAVA3D] removing object at run time

if you have more than one branch group involved,let's  pretend you add the object to 
branchgroup A and later added A to branchgroup B, you have to set AllowDetach for each 
of the branch group that are involved. send some code snippets to clarify your point.


Isaac Kwame

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