Try putting a BranchGroup called root in the simple universe, then attaching your dynamic branchgroups to root, then using the detach() method to remove the dynamic branch groups from root.  Make sure you set the capabilities of the nodes to allow detaching.
 
Dave Yazel
----- Original Message -----
Sent: Wednesday, March 14, 2001 4:08 AM
Subject: [JAVA3D] How to repaint the J3D scene after an interactive input

Hi All,
 
I have met a problem in updating scence graph (display). In interactive computer graphics, we need to update the screen display after  adding a new graphics primitive. In Java 2D, we can use repaint() mothed. Now, I use SimpleUniverser to setup a virtualUniverse and a Locale, After adding the first 3D shape, I add a Branchgraph to the Universer. The screen can display the scene correctly. However, after inputting another 3D shape from menu, I can not romove the old BranchGraph, and can not update the scene to include the  newly input.  It seems that there is no removeBranchGraph() method in SimpleUniverser object. How can I use Java3D in an interactive way?
 
 
Thanks
 
 
Sheng Qin

Reply via email to