I would highly recommend NOT REMOVING the spheres if you can avoid it.  The reason is because of the POOR garbage
collection by Java3D....this removal and reinsertion will cost you a lot. And I speak from experience because I wrote a program
to display a 3D scatterplot using spheres which I would use picking on to remove and then I drew new ones.
 
Especially since you are using spheres you have no reason to remove them, because you can just change them. You can change their
appearance/color and change the size using scaling so you should have no reason to remove the sphere unless you are changing from solid to wireframe or something like that.
 
SO, instead of removing, I would suggest simply MOVING the sphere to some other place away from the main view....for example, I had a sphere at the center of the screen that was fixed so I just moved all my other spheres inside of it and they were hidden. But trust me,
removing and reinserting will really hurt you when you do a lot.
 

   Mario

Mariusz Zaczek
NASA - Johnson Space Center
Automated Vehicles and Orbit Analysis / DM35
Flight Design and Dynamics Division
Mission Operations Directorate
Bldg: 30A     Room: 3040A

Disclaimer: "The opinions, observations and comments expressed in my email
             are strictly my own and do not necessarily reflect those of NASA."

"Failure is never quite so frightening as regret." - Cliff's wife (The Dish)

-----Original Message-----
From: dafna gordon [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 8:00 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] removing childs

Hi All,
i use a behavior to draw spheres. this behavior updates from other class and draws the spheres recording to the data in the other class.
i want every time that the behavior is doing the updating it will remove all the spheres from the previous update and draw the new ones.
i tried doing removeAllChildren() to the related branch group but got a restrictedAccessException since this branch group is already compiled and live and his children aren't of type branch group.
the child of the branch group is a transform group.
the child of the transform group is the sphere that is drawn on the screen.
so how do i remove the sphere from the screen?
thanks a lot
Dafna
=========================================================================== 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".

Reply via email to